2020-06-03 10:23:21 +00:00
|
|
|
/* Generated by ts-generator ver. 0.0.8 */
|
|
|
|
/* tslint:disable */
|
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
import {Contract, ContractFactory, Signer} from 'ethers';
|
|
|
|
import {Provider} from 'ethers/providers';
|
|
|
|
import {UnsignedTransaction} from 'ethers/utils/transaction';
|
|
|
|
import {BigNumberish} from 'ethers/utils';
|
2020-06-03 10:23:21 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
import {TransactionOverrides} from '.';
|
|
|
|
import {MintableErc20} from './MintableErc20';
|
2020-06-03 10:23:21 +00:00
|
|
|
|
|
|
|
export class MintableErc20Factory extends ContractFactory {
|
|
|
|
constructor(signer?: Signer) {
|
|
|
|
super(_abi, _bytecode, signer);
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy(
|
|
|
|
name: string,
|
|
|
|
symbol: string,
|
|
|
|
decimals: BigNumberish,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<MintableErc20> {
|
2020-07-13 08:54:08 +00:00
|
|
|
return super.deploy(name, symbol, decimals, overrides) as Promise<MintableErc20>;
|
2020-06-03 10:23:21 +00:00
|
|
|
}
|
|
|
|
getDeployTransaction(
|
|
|
|
name: string,
|
|
|
|
symbol: string,
|
|
|
|
decimals: BigNumberish,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): UnsignedTransaction {
|
|
|
|
return super.getDeployTransaction(name, symbol, decimals, overrides);
|
|
|
|
}
|
|
|
|
attach(address: string): MintableErc20 {
|
|
|
|
return super.attach(address) as MintableErc20;
|
|
|
|
}
|
|
|
|
connect(signer: Signer): MintableErc20Factory {
|
|
|
|
return super.connect(signer) as MintableErc20Factory;
|
|
|
|
}
|
2020-07-13 08:54:08 +00:00
|
|
|
static connect(address: string, signerOrProvider: Signer | Provider): MintableErc20 {
|
2020-06-03 10:23:21 +00:00
|
|
|
return new Contract(address, _abi, signerOrProvider) as MintableErc20;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const _abi = [
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'string',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'string',
|
|
|
|
name: 'symbol',
|
|
|
|
type: 'string',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint8',
|
|
|
|
name: 'decimals',
|
|
|
|
type: 'uint8',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'constructor',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'owner',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'spender',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'value',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'Approval',
|
|
|
|
type: 'event',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'from',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'to',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'value',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'Transfer',
|
|
|
|
type: 'event',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'owner',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'spender',
|
|
|
|
type: 'address',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'allowance',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'view',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'spender',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'amount',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'approve',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bool',
|
|
|
|
name: '',
|
|
|
|
type: 'bool',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'account',
|
|
|
|
type: 'address',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'balanceOf',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'view',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'decimals',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint8',
|
|
|
|
name: '',
|
|
|
|
type: 'uint8',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'view',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'spender',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'subtractedValue',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'decreaseAllowance',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bool',
|
|
|
|
name: '',
|
|
|
|
type: 'bool',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'spender',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'addedValue',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'increaseAllowance',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bool',
|
|
|
|
name: '',
|
|
|
|
type: 'bool',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'value',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'mint',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bool',
|
|
|
|
name: '',
|
|
|
|
type: 'bool',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'name',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'string',
|
|
|
|
name: '',
|
|
|
|
type: 'string',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'view',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'symbol',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'string',
|
|
|
|
name: '',
|
|
|
|
type: 'string',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'view',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'totalSupply',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'view',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'recipient',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'amount',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'transfer',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bool',
|
|
|
|
name: '',
|
|
|
|
type: 'bool',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'sender',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: 'recipient',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: 'amount',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'transferFrom',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bool',
|
|
|
|
name: '',
|
|
|
|
type: 'bool',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const _bytecode =
|
2020-07-23 15:18:06 +00:00
|
|
|
'0x60806040523480156200001157600080fd5b5060405162000e1338038062000e13833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260209081015185519093508592508491620001bd9160039185019062000216565b508051620001d390600490602084019062000216565b50506005805460ff1916601217905550620001f7816001600160e01b036200020016565b505050620002bb565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200025957805160ff191683800117855562000289565b8280016001018555821562000289579182015b82811115620002895782518255916020019190600101906200026c565b50620002979291506200029b565b5090565b620002b891905b80821115620002975760008155600101620002a2565b90565b610b4880620002cb6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b84610418856040518060600160405280
|