2020-06-03 10:23:21 +00:00
|
|
|
/* Generated by ts-generator ver. 0.0.8 */
|
|
|
|
/* tslint:disable */
|
|
|
|
|
2020-08-19 12:23:41 +00:00
|
|
|
import { Signer } from "ethers";
|
|
|
|
import { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
|
|
import { Contract, ContractFactory, Overrides } from "@ethersproject/contracts";
|
2020-06-03 10:23:21 +00:00
|
|
|
|
2020-08-17 19:28:50 +00:00
|
|
|
import { AToken } from "./AToken";
|
2020-06-03 10:23:21 +00:00
|
|
|
|
|
|
|
export class ATokenFactory extends ContractFactory {
|
|
|
|
constructor(signer?: Signer) {
|
|
|
|
super(_abi, _bytecode, signer);
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy(
|
2020-08-08 17:21:23 +00:00
|
|
|
_pool: string,
|
|
|
|
_underlyingAssetAddress: string,
|
2020-08-07 17:29:13 +00:00
|
|
|
_tokenName: string,
|
|
|
|
_tokenSymbol: string,
|
2020-08-19 12:23:41 +00:00
|
|
|
overrides?: Overrides
|
2020-06-03 10:23:21 +00:00
|
|
|
): Promise<AToken> {
|
2020-08-08 17:21:23 +00:00
|
|
|
return super.deploy(
|
|
|
|
_pool,
|
|
|
|
_underlyingAssetAddress,
|
|
|
|
_tokenName,
|
|
|
|
_tokenSymbol,
|
2020-08-19 12:23:41 +00:00
|
|
|
overrides || {}
|
2020-08-08 17:21:23 +00:00
|
|
|
) as Promise<AToken>;
|
2020-06-03 10:23:21 +00:00
|
|
|
}
|
|
|
|
getDeployTransaction(
|
2020-08-08 17:21:23 +00:00
|
|
|
_pool: string,
|
|
|
|
_underlyingAssetAddress: string,
|
2020-08-07 17:29:13 +00:00
|
|
|
_tokenName: string,
|
|
|
|
_tokenSymbol: string,
|
2020-08-19 12:23:41 +00:00
|
|
|
overrides?: Overrides
|
|
|
|
): TransactionRequest {
|
2020-08-08 17:21:23 +00:00
|
|
|
return super.getDeployTransaction(
|
|
|
|
_pool,
|
|
|
|
_underlyingAssetAddress,
|
|
|
|
_tokenName,
|
|
|
|
_tokenSymbol,
|
2020-08-19 12:23:41 +00:00
|
|
|
overrides || {}
|
2020-08-08 17:21:23 +00:00
|
|
|
);
|
2020-06-03 10:23:21 +00:00
|
|
|
}
|
|
|
|
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: [
|
2020-08-08 17:21:23 +00:00
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "contract LendingPool",
|
|
|
|
name: "_pool",
|
|
|
|
type: "address"
|
2020-08-08 17:21:23 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_underlyingAssetAddress",
|
|
|
|
type: "address"
|
2020-08-08 17:21:23 +00:00
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "_tokenName",
|
|
|
|
type: "string"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "_tokenSymbol",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "constructor"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "owner",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "value",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "Approval",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_to",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_value",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromBalanceIncrease",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_toBalanceIncrease",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromIndex",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_toIndex",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "BalanceTransfer",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
2020-08-19 12:53:00 +00:00
|
|
|
{
|
|
|
|
indexed: true,
|
|
|
|
internalType: "address",
|
|
|
|
name: "_target",
|
|
|
|
type: "address"
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_value",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromBalanceIncrease",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromIndex",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-19 12:53:00 +00:00
|
|
|
name: "Burn",
|
2020-08-17 19:28:50 +00:00
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_to",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "InterestRedirectionAllowanceChanged",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_to",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_redirectedBalance",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromBalanceIncrease",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromIndex",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "InterestStreamRedirected",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_value",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromBalanceIncrease",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_fromIndex",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-19 12:53:00 +00:00
|
|
|
name: "Mint",
|
2020-08-17 19:28:50 +00:00
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_targetAddress",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_targetBalanceIncrease",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_targetIndex",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_redirectedBalanceAdded",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_redirectedBalanceRemoved",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "RedirectedBalanceUpdated",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "to",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "value",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "Transfer",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "ATOKEN_REVISION",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-08-07 17:29:13 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-08-07 17:29:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "UINT_MAX_VALUE",
|
2020-08-07 17:29:13 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_to",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "allowInterestRedirectionTo",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "owner",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "allowance",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "approve",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "balanceOf",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
2020-08-19 12:53:00 +00:00
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
internalType: "address",
|
|
|
|
name: "_underlyingTarget",
|
2020-08-17 19:28:50 +00:00
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
2020-08-19 12:53:00 +00:00
|
|
|
name: "_amount",
|
2020-08-17 19:28:50 +00:00
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-19 12:53:00 +00:00
|
|
|
name: "burn",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "decimals",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint8",
|
|
|
|
name: "",
|
|
|
|
type: "uint8"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "subtractedValue",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "decreaseAllowance",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "getInterestRedirectionAddress",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "getRedirectedBalance",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "getUserIndex",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "addedValue",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "increaseAllowance",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
2020-08-07 17:29:13 +00:00
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint8",
|
|
|
|
name: "_underlyingAssetDecimals",
|
|
|
|
type: "uint8"
|
2020-07-13 08:54:08 +00:00
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "_tokenName",
|
|
|
|
type: "string"
|
2020-07-13 08:54:08 +00:00
|
|
|
},
|
2020-08-07 17:29:13 +00:00
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "_tokenSymbol",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "initialize",
|
2020-08-07 17:29:13 +00:00
|
|
|
outputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-08-07 17:29:13 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "isTransferAllowed",
|
2020-08-07 17:29:13 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-08-07 17:29:13 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-08-07 17:29:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
2020-07-13 08:54:08 +00:00
|
|
|
},
|
2020-08-07 17:29:13 +00:00
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-19 12:53:00 +00:00
|
|
|
name: "mint",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "name",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "principalBalanceOf",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_to",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "redirectInterestStream",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_to",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "redirectInterestStreamOf",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "symbol",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "totalSupply",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "recipient",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "transfer",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "sender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "recipient",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "transferFrom",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_to",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_value",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "transferOnLiquidation",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
2020-07-23 15:18:06 +00:00
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_target",
|
|
|
|
type: "address"
|
2020-07-23 15:18:06 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-07-23 15:18:06 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "transferUnderlyingTo",
|
2020-07-23 15:18:06 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-07-23 15:18:06 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-07-23 15:18:06 +00:00
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-17 19:28:50 +00:00
|
|
|
name: "underlyingAssetAddress",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-07-13 08:54:08 +00:00
|
|
|
},
|
2020-07-23 15:18:06 +00:00
|
|
|
{
|
2020-08-17 19:28:50 +00:00
|
|
|
stateMutability: "payable",
|
|
|
|
type: "receive"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const _bytecode =
|
2020-08-19 12:53:00 +00:00
|
|
|
"0x60c0604052600080553480156200001557600080fd5b5060405162002de638038062002de6833981810160405260808110156200003b57600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200006757600080fd5b9083019060208201858111156200007d57600080fd5b82516401000000008111828201881017156200009857600080fd5b82525081516020918201929091019080838360005b83811015620000c7578181015183820152602001620000ad565b50505050905090810190601f168015620000f55780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011957600080fd5b9083019060208201858111156200012f57600080fd5b82516401000000008111828201881017156200014a57600080fd5b82525081516020918201929091019080838360005b83811015620001795781810151838201526020016200015f565b50505050905090810190601f168015620001a75780820380516001836020036101000a031916815260200191505b50604052505082518391508290620001c79060379060208501906200020e565b508051620001dd9060389060208401906200020e565b50506039805460ff191660121790555050506001600160601b0319606092831b811660a052911b16608052620002b3565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200025157805160ff191683800117855562000281565b8280016001018555821562000281579182015b828111156200028157825182559160200191906001019062000264565b506200028f92915062000293565b5090565b620002b091905b808211156200028f57600081556001016200029a565b90565b60805160601c60a05160601c612ab462000332600039806109a75280610cc55280610d345280610ec25280610fb25280611247528061132052806114985280611cc5528061210d5250806109d65280610d635280610f2b5280610f7652806110e0528061134f528061140b5280611cf4528061213c5250612ab46000f3fe6080604052600436106101a05760003560e01c8063445e8010116100ec578063a9059cbb1161008a578063dd62ed3e11610064578063dd62ed3e14610729578063ee9907a414610764578063f6b911bc14610797578063f866c319146107da576101aa565b8063a9059cbb146106a8578063c634dfaa146106e1578063d0fc81d214610714576101aa565b806370a08231116100c657806370a082311461061257806389d1a0fc1461064557806395d89b411461065a578063a457c2d71461066f576101aa565b8063445e8010146105515780634efecaa5146105a05780635eae177c146105d9576101aa565b80631d51e7cf11610159578063313ce56711610133578063313ce56714610479578063325a9b13146104a457806339509351146104df57806340c10f1914610518576101aa565b80631d51e7cf1461032a57806323b872dd1461035d5780633118724e146103a0576101aa565b806306fdde03146101af578063095ea7b3146102395780630bd7ad3b146102865780630e49072d146102ad57806312c87c2d146102e257806318160ddd14610315576101aa565b366101aa57600080fd5b600080fd5b3480156101bb57600080fd5b506101c461081d565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101fe5781810151838201526020016101e6565b50505050905090810190601f16801561022b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024557600080fd5b506102726004803603604081101561025c57600080fd5b506001600160a01b0381351690602001356108b4565b604080519115158252519081900360200190f35b34801561029257600080fd5b5061029b6108d2565b60408051918252519081900360200190f35b3480156102b957600080fd5b506102e0600480360360208110156102d057600080fd5b50356001600160a01b03166108d7565b005b3480156102ee57600080fd5b506102e06004803603602081101561030557600080fd5b50356001600160a01b03166108e4565b34801561032157600080fd5b5061029b610983565b34801561033657600080fd5b5061029b6004803603602081101561034d57600080fd5b50356001600160a01b0316610a87565b34801561036957600080fd5b506102726004803603606081101561038057600080fd5b506001600160a01b03813581169160208101359091169060400135610aa6565b3480156103ac57600080fd5b506102e0600480360360608110156103c357600080fd5b60ff82351691908101906040810160208201356401000000008111156103e857600080fd5b8201836020820111156103fa57600080fd5b8035906020019184600183028401116401000000008311171561041c57600080fd5b91939092909160208101903564010000000081111561043a57600080fd5b82018360208201111561044c57600080fd5b8035906020019184600183028401116401000000008311171561046e57600080fd5b509092509050610b33565b34801561048557600080fd5b5061048e610bf7565b6040805160ff9092168252519081900360200190f35b3480156104b057600080fd5b506102e0600480360360408110156104c757600080fd5b506001
|