mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
529 lines
19 KiB
TypeScript
529 lines
19 KiB
TypeScript
|
/* 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 { StableDebtToken } from "./StableDebtToken";
|
||
|
|
||
|
export class StableDebtTokenFactory extends ContractFactory {
|
||
|
constructor(signer?: Signer) {
|
||
|
super(_abi, _bytecode, signer);
|
||
|
}
|
||
|
|
||
|
deploy(overrides?: TransactionOverrides): Promise<StableDebtToken> {
|
||
|
return super.deploy(overrides) as Promise<StableDebtToken>;
|
||
|
}
|
||
|
getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction {
|
||
|
return super.getDeployTransaction(overrides);
|
||
|
}
|
||
|
attach(address: string): StableDebtToken {
|
||
|
return super.attach(address) as StableDebtToken;
|
||
|
}
|
||
|
connect(signer: Signer): StableDebtTokenFactory {
|
||
|
return super.connect(signer) as StableDebtTokenFactory;
|
||
|
}
|
||
|
static connect(
|
||
|
address: string,
|
||
|
signerOrProvider: Signer | Provider
|
||
|
): StableDebtToken {
|
||
|
return new Contract(address, _abi, signerOrProvider) as StableDebtToken;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const _abi = [
|
||
|
{
|
||
|
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"
|
||
|
}
|
||
|
],
|
||
|
name: "Transfer",
|
||
|
type: "event"
|
||
|
},
|
||
|
{
|
||
|
anonymous: false,
|
||
|
inputs: [
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "address",
|
||
|
name: "_user",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_amount",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_previousBalance",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_currentBalance",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_balanceIncrease",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
name: "burnDebt",
|
||
|
type: "event"
|
||
|
},
|
||
|
{
|
||
|
anonymous: false,
|
||
|
inputs: [
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "address",
|
||
|
name: "_user",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_amount",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_previousBalance",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_currentBalance",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_balanceIncrease",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
indexed: false,
|
||
|
internalType: "uint256",
|
||
|
name: "_newRate",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
name: "mintDebt",
|
||
|
type: "event"
|
||
|
},
|
||
|
{
|
||
|
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: "account",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "balanceOf",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_account",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "_amount",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
name: "burn",
|
||
|
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: [],
|
||
|
name: "getAverageStableRate",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_user",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "getUserStableRate",
|
||
|
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: "string",
|
||
|
name: "_name",
|
||
|
type: "string"
|
||
|
},
|
||
|
{
|
||
|
internalType: "string",
|
||
|
name: "_symbol",
|
||
|
type: "string"
|
||
|
},
|
||
|
{
|
||
|
internalType: "uint8",
|
||
|
name: "_decimals",
|
||
|
type: "uint8"
|
||
|
},
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_underlying",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
internalType: "contract ILendingPoolAddressesProvider",
|
||
|
name: "_addressesProvider",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "init",
|
||
|
outputs: [],
|
||
|
stateMutability: "nonpayable",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "account",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "amount",
|
||
|
type: "uint256"
|
||
|
},
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "rate",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
name: "mint",
|
||
|
outputs: [],
|
||
|
stateMutability: "nonpayable",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [],
|
||
|
name: "name",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "string",
|
||
|
name: "",
|
||
|
type: "string"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "account",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "principalBalanceOf",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
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: [],
|
||
|
name: "underlyingAssetAddress",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
}
|
||
|
];
|
||
|
|
||
|
const _bytecode =
|
||
|
"0x608060405234801561001057600080fd5b506111d8806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806389d1a0fc116100a2578063a457c2d711610071578063a457c2d71461027a578063a9059cbb14610473578063c634dfaa1461049f578063dd62ed3e146104c5578063e78c9b3b146104f357610116565b806389d1a0fc1461041357806390f6fcf21461043757806395d89b411461043f5780639dc29fac1461044757610116565b806323b872dd116100e957806323b872dd14610226578063313ce5671461025c578063395093511461027a57806370a08231146102a657806381e75277146102cc57610116565b806306fdde031461011b578063095ea7b314610198578063156e29f6146101d857806318160ddd1461020c575b600080fd5b610123610519565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b0381351690602001356105a6565b604080519115158252519081900360200190f35b61020a600480360360608110156101ee57600080fd5b506001600160a01b0381351690602081013590604001356105ee565b005b6102146107da565b60408051918252519081900360200190f35b6101c46004803603606081101561023c57600080fd5b506001600160a01b038135811691602081013590911690604001356107e0565b610264610828565b6040805160ff9092168252519081900360200190f35b6101c46004803603604081101561029057600080fd5b506001600160a01b038135169060200135610831565b610214600480360360208110156102bc57600080fd5b50356001600160a01b0316610880565b61020a600480360360a08110156102e257600080fd5b8101906020810181356401000000008111156102fd57600080fd5b82018360208201111561030f57600080fd5b8035906020019184600183028401116401000000008311171561033157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561038457600080fd5b82018360208201111561039657600080fd5b803590602001918460018302840111640100000000831117156103b857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505060ff8335169350506001600160a01b03602083013581169260400135169050610901565b61041b6109e6565b604080516001600160a01b039092168252519081900360200190f35b6102146109fa565b610123610a01565b61020a6004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610a59565b6101c46004803603604081101561048957600080fd5b506001600160a01b0381351690602001356107e0565b610214600480360360208110156104b557600080fd5b50356001600160a01b0316610bac565b610214600480360360408110156104db57600080fd5b506001600160a01b0381358116916020013516610831565b6102146004803603602081101561050957600080fd5b50356001600160a01b0316610bc7565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561059e5780601f106105735761010080835404028352916020019161059e565b820191906000526020600020905b81548152906001019060200180831161058157829003601f168201915b505050505081565b6040805162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b6004546001600160a01b031633146106375760405162461bcd60e51b81526004018080602001828103825260328152602001806111716032913960400191505060405180910390fd5b600080600061064586610be2565b925092509250600061066286600054610c3890919063ffffffff16565b9050600061066f87610c9b565b90506106e861068c610687868a63ffffffff610c3816565b610c9b565b6106dc61069f848a63ffffffff610cb116565b6106d06106ab89610c9b565b6001600160a01b038e166000908152600760205260409020549063ffffffff610cf716565b9063ffffffff610c3816565b9063ffffffff610d3016565b6001600160a01b0389166000908152600760205260409020908155600101805464ffffffffff19164264ffffffffff1617905561075761072783610c9b565b6106dc61073a898563ffffffff610cf716565b6106d0610748600054610c9b565b6006549063ffffffff610cf716565b6006556107648888610d60565b6001600160a01b0388166000818152600760209081526040918290205482519384529083018a9052828201889052606083018790526080830186905260a0830152517f94ba3ac5ed6fee7b49ed817c5ee964eed9bd5da6860344f95fc56997e920381d9181900360c00190a15050505050505050565b6000
|