mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
601 lines
22 KiB
TypeScript
601 lines
22 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 { MockStableDebtToken } from "./MockStableDebtToken";
|
||
|
|
||
|
export class MockStableDebtTokenFactory extends ContractFactory {
|
||
|
constructor(signer?: Signer) {
|
||
|
super(_abi, _bytecode, signer);
|
||
|
}
|
||
|
|
||
|
deploy(
|
||
|
_pool: string,
|
||
|
_underlyingAssetAddress: string,
|
||
|
_tokenName: string,
|
||
|
_tokenSymbol: string,
|
||
|
overrides?: TransactionOverrides
|
||
|
): Promise<MockStableDebtToken> {
|
||
|
return super.deploy(
|
||
|
_pool,
|
||
|
_underlyingAssetAddress,
|
||
|
_tokenName,
|
||
|
_tokenSymbol,
|
||
|
overrides
|
||
|
) as Promise<MockStableDebtToken>;
|
||
|
}
|
||
|
getDeployTransaction(
|
||
|
_pool: string,
|
||
|
_underlyingAssetAddress: string,
|
||
|
_tokenName: string,
|
||
|
_tokenSymbol: string,
|
||
|
overrides?: TransactionOverrides
|
||
|
): UnsignedTransaction {
|
||
|
return super.getDeployTransaction(
|
||
|
_pool,
|
||
|
_underlyingAssetAddress,
|
||
|
_tokenName,
|
||
|
_tokenSymbol,
|
||
|
overrides
|
||
|
);
|
||
|
}
|
||
|
attach(address: string): MockStableDebtToken {
|
||
|
return super.attach(address) as MockStableDebtToken;
|
||
|
}
|
||
|
connect(signer: Signer): MockStableDebtTokenFactory {
|
||
|
return super.connect(signer) as MockStableDebtTokenFactory;
|
||
|
}
|
||
|
static connect(
|
||
|
address: string,
|
||
|
signerOrProvider: Signer | Provider
|
||
|
): MockStableDebtToken {
|
||
|
return new Contract(address, _abi, signerOrProvider) as MockStableDebtToken;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const _abi = [
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_pool",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_underlyingAssetAddress",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
internalType: "string",
|
||
|
name: "_tokenName",
|
||
|
type: "string"
|
||
|
},
|
||
|
{
|
||
|
internalType: "string",
|
||
|
name: "_tokenSymbol",
|
||
|
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"
|
||
|
}
|
||
|
],
|
||
|
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: [],
|
||
|
name: "DEBT_TOKEN_REVISION",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
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: "account",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "balanceOf",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_user",
|
||
|
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: "getUserLastUpdated",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint40",
|
||
|
name: "",
|
||
|
type: "uint40"
|
||
|
}
|
||
|
],
|
||
|
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: "uint8",
|
||
|
name: "_decimals",
|
||
|
type: "uint8"
|
||
|
},
|
||
|
{
|
||
|
internalType: "string",
|
||
|
name: "_name",
|
||
|
type: "string"
|
||
|
},
|
||
|
{
|
||
|
internalType: "string",
|
||
|
name: "_symbol",
|
||
|
type: "string"
|
||
|
}
|
||
|
],
|
||
|
name: "initialize",
|
||
|
outputs: [],
|
||
|
stateMutability: "nonpayable",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_user",
|
||
|
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: "_user",
|
||
|
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 =
|
||
|
"0x60c0604052600080553480156200001557600080fd5b506040516200172238038062001722833981810160405260808110156200003b57600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200006757600080fd5b9083019060208201858111156200007d57600080fd5b82516401000000008111828201881017156200009857600080fd5b82525081516020918201929091019080838360005b83811015620000c7578181015183820152602001620000ad565b50505050905090810190601f168015620000f55780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011957600080fd5b9083019060208201858111156200012f57600080fd5b82516401000000008111828201881017156200014a57600080fd5b82525081516020918201929091019080838360005b83811015620001795781810151838201526020016200015f565b50505050905090810190601f168015620001a75780820380516001836020036101000a031916815260200191505b506040525050506001600160601b0319606085811b821660a05284901b16608052815184908490849084908490849084908490620001ed90603590602085019062000216565b5080516200020390603690602084019062000216565b50505050505050505050505050620002bb565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200025957805160ff191683800117855562000289565b8280016001018555821562000289579182015b82811115620002895782518255916020019190600101906200026c565b50620002979291506200029b565b5090565b620002b891905b80821115620002975760008155600101620002a2565b90565b60805160601c60a05160601c611438620002ea600039806106485280610b5f525080610ad052506114386000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806389d1a0fc116100ad578063a9059cbb11610071578063a9059cbb146104b9578063b9a7b622146104e5578063c634dfaa146104ed578063dd62ed3e14610513578063e78c9b3b146105415761012c565b806389d1a0fc1461045957806390f6fcf21461047d57806395d89b41146104855780639dc29fac1461048d578063a457c2d7146103c75761012c565b80633118724e116100f45780633118724e14610272578063313ce567146103a957806339509351146103c757806370a08231146103f357806379ce6b8c146104195761012c565b806306fdde0314610131578063095ea7b3146101ae578063156e29f6146101ee57806318160ddd1461022257806323b872dd1461023c575b600080fd5b610139610567565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360408110156101c457600080fd5b506001600160a01b0381351690602001356105f5565b604080519115158252519081900360200190f35b6102206004803603606081101561020457600080fd5b506001600160a01b03813516906020810135906040013561063d565b005b61022a610883565b60408051918252519081900360200190f35b6101da6004803603606081101561025257600080fd5b506001600160a01b03813581169160208101359091169060400135610889565b6102206004803603606081101561028857600080fd5b60ff82351691908101906040810160208201356401000000008111156102ad57600080fd5b8201836020820111156102bf57600080fd5b803590602001918460018302840111640100000000831117156102e157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561033457600080fd5b82018360208201111561034657600080fd5b8035906020019184600183028401116401000000008311171561036857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506108d1945050505050565b6103b16109a7565b6040805160ff9092168252519081900360200190f35b6101da600480360360408110156103dd57600080fd5b506001600160a01b0381351690602001356109b0565b61022a6004803603602081101561040957600080fd5b50356001600160a01b03166109ff565b61043f6004803603602081101561042f57600080fd5b50356001600160a01b0316610aa9565b6040805164ffffffffff9092168252519081900360200190f35b610461610ace565b604080516001600160a01b039092168252519081900360200190f35b61022a610af2565b610139610af9565b610220600480360360408110156104a357600080fd5b506001600160a01b038135169060200135610b54565b6101da600480360360408110156104cf57600080fd5b506001600160a01b038135169060200135610889565b61022a610d59565b61022a6004803603602081101561050357600080fd5b50356001600160a01b0316610d5e56
|