2020-06-03 10:23:21 +00:00
|
|
|
/* Generated by ts-generator ver. 0.0.8 */
|
|
|
|
/* tslint:disable */
|
|
|
|
|
|
|
|
import { Contract, ContractFactory, Signer } from "ethers";
|
|
|
|
import { Provider } from "ethers/providers";
|
|
|
|
import { UnsignedTransaction } from "ethers/utils/transaction";
|
|
|
|
|
|
|
|
import { TransactionOverrides } from ".";
|
|
|
|
import { WalletBalanceProvider } from "./WalletBalanceProvider";
|
|
|
|
|
|
|
|
export class WalletBalanceProviderFactory extends ContractFactory {
|
|
|
|
constructor(signer?: Signer) {
|
|
|
|
super(_abi, _bytecode, signer);
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy(
|
|
|
|
_provider: string,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<WalletBalanceProvider> {
|
|
|
|
return super.deploy(_provider, overrides) as Promise<WalletBalanceProvider>;
|
|
|
|
}
|
|
|
|
getDeployTransaction(
|
|
|
|
_provider: string,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): UnsignedTransaction {
|
|
|
|
return super.getDeployTransaction(_provider, overrides);
|
|
|
|
}
|
|
|
|
attach(address: string): WalletBalanceProvider {
|
|
|
|
return super.attach(address) as WalletBalanceProvider;
|
|
|
|
}
|
|
|
|
connect(signer: Signer): WalletBalanceProviderFactory {
|
|
|
|
return super.connect(signer) as WalletBalanceProviderFactory;
|
|
|
|
}
|
|
|
|
static connect(
|
|
|
|
address: string,
|
|
|
|
signerOrProvider: Signer | Provider
|
|
|
|
): WalletBalanceProvider {
|
|
|
|
return new Contract(
|
|
|
|
address,
|
|
|
|
_abi,
|
|
|
|
signerOrProvider
|
|
|
|
) as WalletBalanceProvider;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const _abi = [
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
internalType: "contract LendingPoolAddressesProvider",
|
|
|
|
name: "_provider",
|
|
|
|
type: "address"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "constructor"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
internalType: "address",
|
|
|
|
name: "_token",
|
|
|
|
type: "address"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
name: "balanceOf",
|
|
|
|
outputs: [
|
|
|
|
{
|
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
internalType: "address[]",
|
|
|
|
name: "_users",
|
|
|
|
type: "address[]"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
internalType: "address[]",
|
|
|
|
name: "_tokens",
|
|
|
|
type: "address[]"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
name: "batchBalanceOf",
|
|
|
|
outputs: [
|
|
|
|
{
|
|
|
|
internalType: "uint256[]",
|
|
|
|
name: "",
|
|
|
|
type: "uint256[]"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
name: "getUserWalletBalances",
|
|
|
|
outputs: [
|
|
|
|
{
|
|
|
|
internalType: "address[]",
|
|
|
|
name: "",
|
|
|
|
type: "address[]"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
internalType: "uint256[]",
|
|
|
|
name: "",
|
|
|
|
type: "uint256[]"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
stateMutability: "payable",
|
|
|
|
type: "receive"
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const _bytecode =
|
2020-06-08 12:03:40 +00:00
|
|
|
"0x608060405234801561001057600080fd5b506040516109a33803806109a38339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561093e806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610079578063b59b28ef14610145578063f7888aec146102c957610074565b366100745760405162461bcd60e51b815260040180806020018281038252602e8152602001806108db602e913960400191505060405180910390fd5b600080fd5b34801561008557600080fd5b506100ac6004803603602081101561009c57600080fd5b50356001600160a01b0316610316565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100f05781810151838201526020016100d8565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561012f578181015183820152602001610117565b5050505090500194505050505060405180910390f35b34801561015157600080fd5b506102796004803603604081101561016857600080fd5b81019060208101813564010000000081111561018357600080fd5b82018360208201111561019557600080fd5b803590602001918460208302840111640100000000831117156101b757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561020757600080fd5b82018360208201111561021957600080fd5b8035906020019184602083028401116401000000008311171561023b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610644945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102b557818101518382015260200161029d565b505050509050019250505060405180910390f35b3480156102d557600080fd5b50610304600480360360408110156102ec57600080fd5b506001600160a01b03813581169160200135166107dc565b60408051918252519081900360200190f35b60608060008060009054906101000a90046001600160a01b03166001600160a01b031663ed6ff7606040518163ffffffff1660e01b815260040160206040518083038186803b15801561036857600080fd5b505afa15801561037c573d6000803e3d6000fd5b505050506040513d602081101561039257600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b1580156103da57600080fd5b505afa1580156103ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561041757600080fd5b810190808051604051939291908464010000000082111561043757600080fd5b90830190602082018581111561044c57600080fd5b825186602082028301116401000000008211171561046957600080fd5b82525081516020918201928201910280838360005b8381101561049657818101518382015260200161047e565b5050505090500160405250505090506060815167ffffffffffffffff811180156104bf57600080fd5b506040519080825280602002602001820160405280156104e9578160200160208202803683370190505b50905060005b825181101561063857836001600160a01b03166305075d6e84838151811061051357fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561056157600080fd5b505afa158015610575573d6000803e3d6000fd5b505050506040513d602081101561058b57600080fd5b50516105b057600082828151811061059f57fe5b602002602001018181525050610630565b6105b8610886565b6001600160a01b03168382815181106105cd57fe5b60200260200101516001600160a01b03161461060c57610600878483815181106105f357fe5b60200260200101516107dc565b82828151811061059f57fe5b866001600160a01b03163182828151811061062357fe5b6020026020010181815250505b6001016104ef565b50909350915050915091565b606080825184510267ffffffffffffffff8111801561066257600080fd5b5060405190808252806020026020018201604052801561068c578160200160208202803683370190505b50905060005b84518110156107d25760005b84518110156107c957845182026106b3610886565b6001600160a01b03168683815181106106c857fe5b60200260200101516001600160a01b0316141561071c578683815181106106eb57fe5b60200260200101516001600160a01b031631848383018151811061070b57fe5b6020026020010181815250506107c0565b61074186838151811061072b57fe5b60200260200101516001600160a01b031661089e565b610782576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b6107a587848151811061079157fe5b602002602001
|