aave-protocol-v2/types/StableDebtTokenFactory.ts
2020-07-03 23:20:02 +02:00

548 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: "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: "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 =
"0x608060405234801561001057600080fd5b50611278806100206000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806381e75277116100ad578063a457c2d711610071578063a457c2d714610285578063a9059cbb146104be578063c634dfaa146104ea578063dd62ed3e14610510578063e78c9b3b1461053e57610121565b806381e752771461031757806389d1a0fc1461045e57806390f6fcf21461048257806395d89b411461048a5780639dc29fac1461049257610121565b806323b872dd116100f457806323b872dd14610231578063313ce56714610267578063395093511461028557806370a08231146102b157806379ce6b8c146102d757610121565b806306fdde0314610126578063095ea7b3146101a3578063156e29f6146101e357806318160ddd14610217575b600080fd5b61012e610564565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b0381351690602001356105f1565b604080519115158252519081900360200190f35b610215600480360360608110156101f957600080fd5b506001600160a01b038135169060208101359060400135610639565b005b61021f610825565b60408051918252519081900360200190f35b6101cf6004803603606081101561024757600080fd5b506001600160a01b0381358116916020810135909116906040013561082b565b61026f610873565b6040805160ff9092168252519081900360200190f35b6101cf6004803603604081101561029b57600080fd5b506001600160a01b03813516906020013561087c565b61021f600480360360208110156102c757600080fd5b50356001600160a01b03166108cb565b6102fd600480360360208110156102ed57600080fd5b50356001600160a01b0316610975565b6040805164ffffffffff9092168252519081900360200190f35b610215600480360360a081101561032d57600080fd5b81019060208101813564010000000081111561034857600080fd5b82018360208201111561035a57600080fd5b8035906020019184600183028401116401000000008311171561037c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156103cf57600080fd5b8201836020820111156103e157600080fd5b8035906020019184600183028401116401000000008311171561040357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505060ff8335169350506001600160a01b0360208301358116926040013516905061099a565b610466610a7f565b604080516001600160a01b039092168252519081900360200190f35b61021f610a93565b61012e610a9a565b610215600480360360408110156104a857600080fd5b506001600160a01b038135169060200135610af2565b6101cf600480360360408110156104d457600080fd5b506001600160a01b03813516906020013561082b565b61021f6004803603602081101561050057600080fd5b50356001600160a01b0316610c67565b61021f6004803603604081101561052657600080fd5b506001600160a01b038135811691602001351661087c565b61021f6004803603602081101561055457600080fd5b50356001600160a01b0316610c82565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105e95780601f106105be576101008083540402835291602001916105e9565b820191906000526020600020905b8154815290600101906020018083116105cc57829003601f168201915b505050505081565b6040805162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b6004546001600160a01b031633146106825760405162461bcd60e51b81526004018080602001828103825260328152602001806112116032913960400191505060405180910390fd5b600080600061069086610c9d565b92509250925060006106ad86600054610d0b90919063ffffffff16565b905060006106ba87610d6e565b90506107336106d76106d2868a63ffffffff610d0b16565b610d6e565b6107276106ea848a63ffffffff610d8416565b61071b6106f689610d6e565b6001600160a01b038e166000908152600760205260409020549063ffffffff610d8416565b9063ffffffff610d0b16565b9063ffffffff610dc816565b6001600160a01b0389166000908152600760205260409020908155600101805464ffffffffff19164264ffffffffff161790556107a261077283610d6e565b610727610785898563ffffffff610d8416565b61071b610793600054610d6e565b6006549063ffffffff610d8416565b6006556107af8888610e00565b6001600160a01b0388166000818152600760209081526040918290205482519384529083018a9052828201889052606083018790526080830186905260a0830152517f94ba3ac5ed6fee7b49ed817c5ee964eed9bd5da6860344f95fc56997e920381d9181900360c00190a15050505050505050565b60005481565b6040805162461bcd60e51b81526020600482015260166024820152751514905394d1915497d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60035460ff1681565b6040805162461bcd60e51b815260206004820152601760248201527f414c4c4f57414e43455f4e4f545f535550504f525445440000000000000000006044820152905160009181900360640190fd5b6001600160a01b0381166000908152600560205260408120546108f057506000610970565b6001600160a01b038216600090815260076020526040812080546001820154919291610923919064ffffffffff16610e5e565b905061096b6109668261095a60056000896001600160a01b03166001600160a01b0316815260200190815260200160002054610d6e565b9063ffffffff610d8416565b610eb6565b925050505b919050565b6001600160a01b031660009081526007602052604090206001015464ffffffffff1690565b84516109ad906001906020880190611157565b5083516109c1906002906020870190611157565b506003805460ff191660ff851617610100600160a81b0319166101006001600160a01b03858116919091029190911790915560408051630261bf8b60e01b8152905191831691630261bf8b91600480820192602092909190829003018186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d6020811015610a5757600080fd5b5051600480546001600160a01b0319166001600160a01b039092169190911790555050505050565b60035461010090046001600160a01b031681565b6006545b90565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156105e95780601f106105be576101008083540402835291602001916105e9565b6004546001600160a01b03163314610b3b5760405162461bcd60e51b81526004018080602001828103825260328152602001806112116032913960400191505060405180910390fd5b6000806000610b4985610c9d565b9250925092506000610b6685600054610ed690919063ffffffff16565b90506000610b7386610d6e565b905081610b84576000600655610bdb565b610bd7610b9083610d6e565b6001600160a01b03891660009081526007602052604090205461072790610bbd908563ffffffff610d8416565b610bcb610793600054610d6e565b9063ffffffff610ed616565b6006555b83861415610bfd576001600160a01b0387166000908152600760205260408120555b610c078787610f18565b604080516001600160a01b038916815260208101889052808201879052606081018690526080810185905290517fecde08620c30706a4d7ba53e9163327f2e12a6cea2709dd6a9226fed28c2bb729181900360a00190a150505050505050565b6001600160a01b031660009081526005602052604090205490565b6001600160a01b031660009081526007602052604090205490565b6001600160a01b0381166000908152600560205260408120548190819080610ccf575060009250829150819050610d04565b6000610cde82610bcb886108cb565b9050610cea8682610e00565b81610cfb818363ffffffff610d0b16565b90955093509150505b9193909250565b600082820183811015610d65576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000610d6882633b9aca0063ffffffff610f5616565b6000610d656b033b2e3c9fd0803ce8000000610dbc610da9868663ffffffff610f5616565b6b019d971e4fe8401e7400000090610d0b565b9063ffffffff610faf16565b600060028204610df883610dbc610deb876b033b2e3c9fd0803ce8000000610f56565b849063ffffffff610d0b16565b949350505050565b600054610e13908263ffffffff610d0b16565b60009081556001600160a01b038316815260056020526040902054610e3e908263ffffffff610d0b16565b6001600160a01b0390921660009081526005602052604090209190915550565b600080610e784264ffffffffff851663ffffffff610ed616565b90506000610e90856301e1338063ffffffff610faf16565b9050610ead82610ea1610deb610ff1565b9063ffffffff61100116565b95945050505050565b6000631dcd6500610ecf633b9aca00610dbc8386610d0b565b9392505050565b6000610d6583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061105b565b600054610f2b908263ffffffff610ed616565b60009081556001600160a01b038316815260056020526040902054610e3e908263ffffffff610ed616565b600082610f6557506000610d68565b82820282848281610f7257fe5b0414610d655760405162461bcd60e51b81526004018080602001828103825260218152602001806111f06021913960400191505060405180910390fd5b6000610d6583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110f2565b6b033b2e3c9fd0803ce800000090565b60006002820661101d576b033b2e3c9fd0803ce800000061101f565b825b90506002820491505b8115610d68576110388384610d84565b925060028206156110505761104d8184610d84565b90505b600282049150611028565b600081848411156110ea5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156110af578181015183820152602001611097565b50505050905090810190601f1680156110dc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836111415760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156110af578181015183820152602001611097565b50600083858161114d57fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061119857805160ff19168380011785556111c5565b828001600101855582156111c5579182015b828111156111c55782518255916020019190600101906111aa565b506111d19291506111d5565b5090565b610a9791905b808211156111d157600081556001016111db56fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468652063616c6c6572206f6620746869732066756e6374696f6e206d7573742062652061206c656e64696e6720706f6f6ca264697066735822122037001880c09492f82ed6b600e67543cbe9c07a8fc5c63de3eca25a77ecaf868464736f6c63430006080033";