aave-protocol-v2/types/VariableDebtTokenFactory.ts

533 lines
18 KiB
TypeScript
Raw Normal View History

2020-06-30 12:09:28 +00:00
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
2020-08-07 17:29:13 +00:00
import { Contract, ContractFactory, Signer } from "ethers";
import { Provider } from "ethers/providers";
import { UnsignedTransaction } from "ethers/utils/transaction";
2020-06-30 12:09:28 +00:00
2020-08-07 17:29:13 +00:00
import { TransactionOverrides } from ".";
import { VariableDebtToken } from "./VariableDebtToken";
2020-06-30 12:09:28 +00:00
export class VariableDebtTokenFactory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
2020-08-11 07:36:46 +00:00
deploy(
_pool: string,
_underlyingAsset: string,
overrides?: TransactionOverrides
): Promise<VariableDebtToken> {
return super.deploy(_pool, _underlyingAsset, overrides) as Promise<
VariableDebtToken
>;
2020-06-30 12:09:28 +00:00
}
2020-08-11 07:36:46 +00:00
getDeployTransaction(
_pool: string,
_underlyingAsset: string,
overrides?: TransactionOverrides
): UnsignedTransaction {
return super.getDeployTransaction(_pool, _underlyingAsset, overrides);
2020-06-30 12:09:28 +00:00
}
attach(address: string): VariableDebtToken {
return super.attach(address) as VariableDebtToken;
}
connect(signer: Signer): VariableDebtTokenFactory {
return super.connect(signer) as VariableDebtTokenFactory;
}
2020-08-07 17:29:13 +00:00
static connect(
address: string,
signerOrProvider: Signer | Provider
): VariableDebtToken {
2020-06-30 12:09:28 +00:00
return new Contract(address, _abi, signerOrProvider) as VariableDebtToken;
}
}
const _abi = [
2020-08-11 07:36:46 +00:00
{
inputs: [
{
internalType: "address",
name: "_pool",
type: "address"
},
{
internalType: "address",
name: "_underlyingAsset",
type: "address"
}
],
stateMutability: "nonpayable",
type: "constructor"
},
2020-06-30 12:09:28 +00:00
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "owner",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "spender",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "value",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "Approval",
type: "event"
2020-06-30 12:09:28 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "from",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "to",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "value",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "Transfer",
type: "event"
2020-06-30 12:09:28 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_previousBalance",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_currentBalance",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_balanceIncrease",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_index",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "burnDebt",
type: "event"
2020-06-30 12:09:28 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_previousBalance",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_currentBalance",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_balanceIncrease",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_index",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "mintDebt",
type: "event"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "owner",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "spender",
type: "address"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "allowance",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "spender",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "approve",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "",
type: "bool"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "balanceOf",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "burn",
2020-06-30 12:09:28 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "decimals",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint8",
name: "",
type: "uint8"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "spender",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "subtractedValue",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "decreaseAllowance",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "",
type: "bool"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
2020-07-03 21:20:02 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-07-03 21:20:02 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getUserIndex",
2020-07-03 21:20:02 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-07-03 21:20:02 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-07-03 21:20:02 +00:00
},
2020-06-30 12:09:28 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "spender",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "addedValue",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "increaseAllowance",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "",
type: "bool"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "string",
name: "_name",
type: "string"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "string",
name: "_symbol",
type: "string"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint8",
name: "_decimals",
type: "uint8"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "init",
2020-06-30 12:09:28 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "mint",
2020-06-30 12:09:28 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "name",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "string",
name: "",
type: "string"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "principalBalanceOf",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "symbol",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "string",
name: "",
type: "string"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "totalSupply",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "recipient",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "transfer",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "",
type: "bool"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "sender",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "recipient",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "transferFrom",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "",
type: "bool"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "underlyingAssetAddress",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "",
type: "address"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
}
2020-06-30 12:09:28 +00:00
];
const _bytecode =
2020-08-10 18:20:08 +00:00
"0x608060405234801561001057600080fd5b50611132806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806381e75277116100a2578063a457c2d711610071578063a457c2d71461023b578063a9059cbb1461045a578063c634dfaa14610486578063dd62ed3e146104ac578063ee9907a4146104da5761010b565b806381e75277146102bb57806389d1a0fc1461040257806395d89b41146104265780639dc29fac1461042e5761010b565b8063313ce567116100de578063313ce5671461021d578063395093511461023b57806340c10f191461026757806370a08231146102955761010b565b806306fdde0314610110578063095ea7b31461018d57806318160ddd146101cd57806323b872dd146101e7575b600080fd5b610118610500565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015257818101518382015260200161013a565b50505050905090810190601f16801561017f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b9600480360360408110156101a357600080fd5b506001600160a01b03813516906020013561058d565b604080519115158252519081900360200190f35b6101d56105d5565b60408051918252519081900360200190f35b6101b9600480360360608110156101fd57600080fd5b506001600160a01b038135811691602081013590911690604001356105db565b610225610623565b6040805160ff9092168252519081900360200190f35b6101b96004803603604081101561025157600080fd5b506001600160a01b03813516906020013561062c565b6102936004803603604081101561027d57600080fd5b506001600160a01b03813516906020013561067b565b005b6101d5600480360360208110156102ab57600080fd5b50356001600160a01b03166107db565b610293600480360360a08110156102d157600080fd5b8101906020810181356401000000008111156102ec57600080fd5b8201836020820111156102fe57600080fd5b8035906020019184600183028401116401000000008311171561032057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561037357600080fd5b82018360208201111561038557600080fd5b803590602001918460018302840111640100000000831117156103a757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505060ff8335169350506001600160a01b036020830135811692604001351690506108e8565b61040a6109cd565b604080516001600160a01b039092168252519081900360200190f35b6101186109e1565b6102936004803603604081101561044457600080fd5b506001600160a01b038135169060200135610a39565b6101b96004803603604081101561047057600080fd5b506001600160a01b0381351690602001356105db565b6101d56004803603602081101561049c57600080fd5b50356001600160a01b0316610bd4565b6101d5600480360360408110156104c257600080fd5b506001600160a01b038135811691602001351661062c565b6101d5600480360360208110156104f057600080fd5b50356001600160a01b0316610bef565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105855780601f1061055a57610100808354040283529160200191610585565b820191906000526020600020905b81548152906001019060200180831161056857829003601f168201915b505050505081565b6040805162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60005481565b6040805162461bcd60e51b81526020600482015260166024820152751514905394d1915497d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60035460ff1681565b6040805162461bcd60e51b815260206004820152601760248201527f414c4c4f57414e43455f4e4f545f535550504f525445440000000000000000006044820152905160009181900360640190fd5b6004546001600160a01b031633146106c45760405162461bcd60e51b81526004018080602001828103825260328152602001806110cb6032913960400191505060405180910390fd5b60008060006106d285610c0a565b9250925092506106e28585610c84565b600480546003546040805163386497fd60e01b81526001600160a01b036101009093048316948101949094525191169163386497fd916024808301926020929190829003018186803b15801561073757600080fd5b505afa15801561074b573d6000803e3d6000fd5b505050506040513d602081101561076157600080fd5b50516001600160a01b03861660008181526006602090815260409182902084905581519283528201879052818101869052606082018590526080820184905260a082019290925290517f94ba3ac5ed6fee7b49ed817c5ee964eed9bd5da6860344f95fc56997e920381d9181900360c00190a15050505050565b60