2020-06-03 10:23:21 +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-03 10:23:21 +00:00
|
|
|
|
2020-08-07 17:29:13 +00:00
|
|
|
import { TransactionOverrides } from ".";
|
|
|
|
import { Erc20 } from "./Erc20";
|
2020-06-03 10:23:21 +00:00
|
|
|
|
|
|
|
export class Erc20Factory extends ContractFactory {
|
|
|
|
constructor(signer?: Signer) {
|
|
|
|
super(_abi, _bytecode, signer);
|
|
|
|
}
|
|
|
|
|
2020-08-07 17:29:13 +00:00
|
|
|
deploy(
|
|
|
|
name: string,
|
|
|
|
symbol: string,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<Erc20> {
|
2020-06-03 10:23:21 +00:00
|
|
|
return super.deploy(name, symbol, overrides) as Promise<Erc20>;
|
|
|
|
}
|
|
|
|
getDeployTransaction(
|
|
|
|
name: string,
|
|
|
|
symbol: string,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): UnsignedTransaction {
|
|
|
|
return super.getDeployTransaction(name, symbol, overrides);
|
|
|
|
}
|
|
|
|
attach(address: string): Erc20 {
|
|
|
|
return super.attach(address) as Erc20;
|
|
|
|
}
|
|
|
|
connect(signer: Signer): Erc20Factory {
|
|
|
|
return super.connect(signer) as Erc20Factory;
|
|
|
|
}
|
|
|
|
static connect(address: string, signerOrProvider: Signer | Provider): Erc20 {
|
|
|
|
return new Contract(address, _abi, signerOrProvider) as Erc20;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const _abi = [
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "name",
|
|
|
|
type: "string"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "symbol",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "constructor"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "owner",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "value",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "Approval",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "from",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "to",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "value",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "Transfer",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "owner",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "allowance",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "approve",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "account",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "balanceOf",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "decimals",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint8",
|
|
|
|
name: "",
|
|
|
|
type: "uint8"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "subtractedValue",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "decreaseAllowance",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "spender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "addedValue",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "increaseAllowance",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "name",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "symbol",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "totalSupply",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "recipient",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "transfer",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "sender",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "recipient",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "amount",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "transferFrom",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "nonpayable",
|
|
|
|
type: "function"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const _bytecode =
|
2020-08-07 17:29:13 +00:00
|
|
|
"0x60806040523480156200001157600080fd5b5060405162000ca538038062000ca5833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405250508251620001b491506003906020850190620001e0565b508051620001ca906004906020840190620001e0565b50506005805460ff191660121790555062000285565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200022357805160ff191683800117855562000253565b8280016001018555821562000253579182015b828111156200025357825182559160200191906001019062000236565b506200026192915062000265565b5090565b6200028291905b808211156200026157600081556001016200026c565b90565b610a1080620002956000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103ff565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610408565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661045c565b6100b6610477565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104d8565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610546565b610173600480360360408110156102a157600080fd5b506001600160a01b038135811691602001351661055a565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610585565b8484610589565b50600192915050565b60025490565b600061037f848484610675565b6103f58461038b610585565b6103f085604051806060016040528060288152602001610945602891396001600160a01b038a166000908152600160205260408120906103c9610585565b6001600160a01b03168152602081019190915260400160002054919063ffffffff6107dc16565b610589565b5060019392505050565b60055460ff1690565b6000610363610415610585565b846103f08560016000610426610585565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61087316565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104e5610585565b846103f0856040518060600160405280602581526020016109b6602591396001600061050f610585565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff6107dc16565b6000610363610553610585565b8484610675565b6001600160a01b039182166000
|