aave-protocol-v2/types/ATokenFactory.ts

845 lines
35 KiB
TypeScript
Raw Normal View History

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 { BigNumberish } from "ethers/utils";
import { TransactionOverrides } from ".";
import { AToken } from "./AToken";
export class ATokenFactory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
deploy(
_addressesProvider: string,
_underlyingAsset: string,
_underlyingAssetDecimals: BigNumberish,
_name: string,
_symbol: string,
overrides?: TransactionOverrides
): Promise<AToken> {
return super.deploy(
_addressesProvider,
_underlyingAsset,
_underlyingAssetDecimals,
_name,
_symbol,
overrides
) as Promise<AToken>;
}
getDeployTransaction(
_addressesProvider: string,
_underlyingAsset: string,
_underlyingAssetDecimals: BigNumberish,
_name: string,
_symbol: string,
overrides?: TransactionOverrides
): UnsignedTransaction {
return super.getDeployTransaction(
_addressesProvider,
_underlyingAsset,
_underlyingAssetDecimals,
_name,
_symbol,
overrides
);
}
attach(address: string): AToken {
return super.attach(address) as AToken;
}
connect(signer: Signer): ATokenFactory {
return super.connect(signer) as ATokenFactory;
}
static connect(address: string, signerOrProvider: Signer | Provider): AToken {
return new Contract(address, _abi, signerOrProvider) as AToken;
}
}
const _abi = [
{
inputs: [
{
internalType: "contract LendingPoolAddressesProvider",
name: "_addressesProvider",
type: "address"
},
{
internalType: "address",
name: "_underlyingAsset",
type: "address"
},
{
internalType: "uint8",
name: "_underlyingAssetDecimals",
type: "uint8"
},
{
internalType: "string",
name: "_name",
type: "string"
},
{
internalType: "string",
name: "_symbol",
type: "string"
}
],
stateMutability: "nonpayable",
type: "constructor"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address"
},
{
indexed: true,
internalType: "address",
name: "spender",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256"
}
],
name: "Approval",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_from",
type: "address"
},
{
indexed: true,
internalType: "address",
name: "_to",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_value",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromBalanceIncrease",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_toBalanceIncrease",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromIndex",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_toIndex",
type: "uint256"
}
],
name: "BalanceTransfer",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_from",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_value",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromBalanceIncrease",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromIndex",
type: "uint256"
}
],
name: "BurnOnLiquidation",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_from",
type: "address"
},
{
indexed: true,
internalType: "address",
name: "_to",
type: "address"
}
],
name: "InterestRedirectionAllowanceChanged",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_from",
type: "address"
},
{
indexed: true,
internalType: "address",
name: "_to",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_redirectedBalance",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromBalanceIncrease",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromIndex",
type: "uint256"
}
],
name: "InterestStreamRedirected",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_from",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_value",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromBalanceIncrease",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromIndex",
type: "uint256"
}
],
name: "MintOnDeposit",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_from",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_value",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromBalanceIncrease",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fromIndex",
type: "uint256"
}
],
name: "Redeem",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_targetAddress",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_targetBalanceIncrease",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_targetIndex",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_redirectedBalanceAdded",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_redirectedBalanceRemoved",
type: "uint256"
}
],
name: "RedirectedBalanceUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address"
},
{
indexed: true,
internalType: "address",
name: "to",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256"
}
],
name: "Transfer",
type: "event"
},
{
inputs: [],
name: "UINT_MAX_VALUE",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_to",
type: "address"
}
],
name: "allowInterestRedirectionTo",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "owner",
type: "address"
},
{
internalType: "address",
name: "spender",
type: "address"
}
],
name: "allowance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address"
},
{
internalType: "uint256",
name: "amount",
type: "uint256"
}
],
name: "approve",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address"
}
],
name: "balanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_account",
type: "address"
},
{
internalType: "uint256",
name: "_value",
type: "uint256"
}
],
name: "burnOnLiquidation",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "decimals",
outputs: [
{
internalType: "uint8",
name: "",
type: "uint8"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address"
},
{
internalType: "uint256",
name: "subtractedValue",
type: "uint256"
}
],
name: "decreaseAllowance",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address"
}
],
name: "getInterestRedirectionAddress",
outputs: [
{
internalType: "address",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address"
}
],
name: "getRedirectedBalance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address"
}
],
name: "getUserIndex",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address"
},
{
internalType: "uint256",
name: "addedValue",
type: "uint256"
}
],
name: "increaseAllowance",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address"
},
{
internalType: "uint256",
name: "_amount",
type: "uint256"
}
],
name: "isTransferAllowed",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_account",
type: "address"
},
{
internalType: "uint256",
name: "_amount",
type: "uint256"
}
],
name: "mintOnDeposit",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "name",
outputs: [
{
internalType: "string",
name: "",
type: "string"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address"
}
],
name: "principalBalanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "_amount",
type: "uint256"
}
],
name: "redeem",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_to",
type: "address"
}
],
name: "redirectInterestStream",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_from",
type: "address"
},
{
internalType: "address",
name: "_to",
type: "address"
}
],
name: "redirectInterestStreamOf",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "symbol",
outputs: [
{
internalType: "string",
name: "",
type: "string"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "totalSupply",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "recipient",
type: "address"
},
{
internalType: "uint256",
name: "amount",
type: "uint256"
}
],
name: "transfer",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address"
},
{
internalType: "address",
name: "recipient",
type: "address"
},
{
internalType: "uint256",
name: "amount",
type: "uint256"
}
],
name: "transferFrom",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_from",
type: "address"
},
{
internalType: "address",
name: "_to",
type: "address"
},
{
internalType: "uint256",
name: "_value",
type: "uint256"
}
],
name: "transferOnLiquidation",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "underlyingAssetAddress",
outputs: [
{
internalType: "address",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
}
];
const _bytecode =
"0x60806040523480156200001157600080fd5b506040516200266a3803806200266a833981810160405260a08110156200003757600080fd5b8151602083015160408085015160608601805192519496939591949391820192846401000000008211156200006b57600080fd5b9083019060208201858111156200008157600080fd5b82516401000000008111828201881017156200009c57600080fd5b82525081516020918201929091019080838360005b83811015620000cb578181015183820152602001620000b1565b50505050905090810190601f168015620000f95780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011d57600080fd5b9083019060208201858111156200013357600080fd5b82516401000000008111828201881017156200014e57600080fd5b82525081516020918201929091019080838360005b838110156200017d57818101518382015260200162000163565b50505050905090810190601f168015620001ab5780820380516001836020036101000a031916815260200191505b50604052505082518391508290620001cb906003906020850190620003fb565b508051620001e1906004906020840190620003fb565b50506005805460ff191660121790555062000205836001600160e01b03620003e516565b600a80546001600160a01b0319166001600160a01b0387811691909117918290556040805163076b7fbb60e51b81529051929091169163ed6ff76091600480820192602092909190829003018186803b1580156200026257600080fd5b505afa15801562000277573d6000803e3d6000fd5b505050506040513d60208110156200028e57600080fd5b5051600b80546001600160a01b0319166001600160a01b03928316179055600a5460408051630261bf8b60e01b815290519190921691630261bf8b916004808301926020929190829003018186803b158015620002ea57600080fd5b505afa158015620002ff573d6000803e3d6000fd5b505050506040513d60208110156200031657600080fd5b5051600c80546001600160a01b0319166001600160a01b03928316179055600a5460408051632f58b80d60e01b815290519190921691632f58b80d916004808301926020929190829003018186803b1580156200037257600080fd5b505afa15801562000387573d6000803e3d6000fd5b505050506040513d60208110156200039e57600080fd5b5051600d80546001600160a01b0319166001600160a01b0392831617905560058054610100600160a81b03191661010096909216959095021790935550620004a092505050565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200043e57805160ff19168380011785556200046e565b828001600101855582156200046e579182015b828111156200046e57825182559160200191906001019062000451565b506200047c92915062000480565b5090565b6200049d91905b808211156200047c576000815560010162000487565b90565b6121ba80620004b06000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635eae177c116100de578063a9059cbb11610097578063db006a7511610071578063db006a75146104f3578063dd62ed3e14610510578063ee9907a41461053e578063f866c3191461056457610173565b8063a9059cbb14610499578063c634dfaa146104c5578063d0fc81d2146104eb57610173565b80635eae177c146103df57806370a082311461040b57806389d1a0fc1461043157806394362e8b1461043957806395d89b4114610465578063a457c2d71461046d57610173565b806323b872dd1161013057806323b872dd146102c3578063313ce567146102f9578063325a9b131461031757806339509351146103455780633edb7cb814610371578063445e80101461039d57610173565b806306fdde0314610178578063095ea7b3146101f55780630e49072d1461023557806312c87c2d1461025d57806318160ddd146102835780631d51e7cf1461029d575b600080fd5b61018061059a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b038135169060200135610631565b604080519115158252519081900360200190f35b61025b6004803603602081101561024b57600080fd5b50356001600160a01b031661064f565b005b61025b6004803603602081101561027357600080fd5b50356001600160a01b031661065c565b61028b6106fb565b60408051918252519081900360200190f35b61028b600480360360208110156102b357600080fd5b50356001600160a01b03166107bd565b610221600480360360608110156102d957600080fd5b506001600160a01b038135811691602081013590911690604001356107dc565b610301610869565b6040805160ff9092168252519081900360200190f35b61025b6004803603604081101561032d57600080fd5b506001600160a01b0381358116916020013516610872565b61022160048036