9419f0673c
Signed-off-by: T-Hax <>
460 lines
18 KiB
TypeScript
460 lines
18 KiB
TypeScript
/* Autogenerated file. Do not edit manually. */
|
|
/* tslint:disable */
|
|
/* eslint-disable */
|
|
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
|
import type { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
import type { PromiseOrValue } from "../common";
|
|
import type { ERC20Mock, ERC20MockInterface } from "../ERC20Mock";
|
|
|
|
const _abi = [
|
|
{
|
|
inputs: [],
|
|
payable: false,
|
|
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: "account",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "MinterAdded",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "account",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "MinterRemoved",
|
|
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",
|
|
},
|
|
{
|
|
constant: false,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "account",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "addMinter",
|
|
outputs: [],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: true,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "owner",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "spender",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "allowance",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: false,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "spender",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "amount",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "approve",
|
|
outputs: [
|
|
{
|
|
internalType: "bool",
|
|
name: "",
|
|
type: "bool",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: true,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "account",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "balanceOf",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: true,
|
|
inputs: [],
|
|
name: "decimals",
|
|
outputs: [
|
|
{
|
|
internalType: "uint8",
|
|
name: "",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: false,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "spender",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "subtractedValue",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "decreaseAllowance",
|
|
outputs: [
|
|
{
|
|
internalType: "bool",
|
|
name: "",
|
|
type: "bool",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: false,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "spender",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "addedValue",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "increaseAllowance",
|
|
outputs: [
|
|
{
|
|
internalType: "bool",
|
|
name: "",
|
|
type: "bool",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: true,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "account",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "isMinter",
|
|
outputs: [
|
|
{
|
|
internalType: "bool",
|
|
name: "",
|
|
type: "bool",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: false,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "account",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "amount",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "mint",
|
|
outputs: [
|
|
{
|
|
internalType: "bool",
|
|
name: "",
|
|
type: "bool",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: true,
|
|
inputs: [],
|
|
name: "name",
|
|
outputs: [
|
|
{
|
|
internalType: "string",
|
|
name: "",
|
|
type: "string",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: false,
|
|
inputs: [],
|
|
name: "renounceMinter",
|
|
outputs: [],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: true,
|
|
inputs: [],
|
|
name: "symbol",
|
|
outputs: [
|
|
{
|
|
internalType: "string",
|
|
name: "",
|
|
type: "string",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: true,
|
|
inputs: [],
|
|
name: "totalSupply",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: false,
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "recipient",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "amount",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "transfer",
|
|
outputs: [
|
|
{
|
|
internalType: "bool",
|
|
name: "",
|
|
type: "bool",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
constant: false,
|
|
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",
|
|
},
|
|
],
|
|
payable: false,
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
] as const;
|
|
|
|
const _bytecode =
|
|
"0x60806040523480156200001157600080fd5b5060408051808201825260078152664441494d6f636b60c81b6020808301918252835180850190945260048452634441494d60e01b908401528151919291601291620000619160009190620001ff565b50815162000077906001906020850190620001ff565b506002805460ff191660ff9290921691909117905550620000ac90506200009d620000b2565b6001600160e01b03620000b716565b620002a1565b335b90565b620000d28160066200010960201b62000c551790919060201c565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6200011e82826001600160e01b036200019616565b1562000171576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160a01b038216620001df5760405162461bcd60e51b8152600401808060200182810382526022815260200180620011976022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200024257805160ff191683800117855562000272565b8280016001018555821562000272579182015b828111156200027257825182559160200191906001019062000255565b506200028092915062000284565b5090565b620000b491905b808211156200028057600081556001016200028b565b610ee680620002b16000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146102db578063a9059cbb14610307578063aa271e1a14610333578063dd62ed3e14610359576100f5565b806370a082311461027d57806395d89b41146102a3578063983b2d56146102ab57806398650275146102d3576100f5565b806323b872dd116100d357806323b872dd146101d1578063313ce56714610207578063395093511461022557806340c10f1914610251576100f5565b806306fdde03146100fa578063095ea7b31461017757806318160ddd146101b7575b600080fd5b610102610387565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013c578181015183820152602001610124565b50505050905090810190601f1680156101695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a36004803603604081101561018d57600080fd5b506001600160a01b03813516906020013561041d565b604080519115158252519081900360200190f35b6101bf61043a565b60408051918252519081900360200190f35b6101a3600480360360608110156101e757600080fd5b506001600160a01b03813581169160208101359091169060400135610440565b61020f6104cd565b6040805160ff9092168252519081900360200190f35b6101a36004803603604081101561023b57600080fd5b506001600160a01b0381351690602001356104d6565b6101a36004803603604081101561026757600080fd5b506001600160a01b03813516906020013561052a565b6101bf6004803603602081101561029357600080fd5b50356001600160a01b0316610581565b61010261059c565b6102d1600480360360208110156102c157600080fd5b50356001600160a01b03166105fc565b005b6102d161064e565b6101a3600480360360408110156102f157600080fd5b506001600160a01b038135169060200135610660565b6101a36004803603604081101561031d57600080fd5b506001600160a01b0381351690602001356106ce565b6101a36004803603602081101561034957600080fd5b50356001600160a01b03166106e2565b6101bf6004803603604081101561036f57600080fd5b506001600160a01b03813581169160200135166106fb565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104135780601f106103e857610100808354040283529160200191610413565b820191906000526020600020905b8154815290600101906020018083116103f657829003601f168201915b5050505050905090565b600061043161042a610726565b848461072a565b50600192915050565b60055490565b600061044d848484610816565b6104c384610459610726565b6104be85604051806060016040528060288152602001610dfa602891396001600160a01b038a16600090815260046020526040812090610497610726565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61097416565b61072a565b5060019392505050565b60025460ff1690565b60006104316104e3610726565b846104be85600460006104f4610726565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff610a0b16565b600061053c610537610726565b6106e2565b6105775760405162461bcd60e51b8152600401808060200182810382526030815260200180610da96030913960400191505060405180910390fd5b6104318383610a6c565b6001600160a01b031660009081526003602052604090205490565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104135780601f106103e857610100808354040283529160200191610413565b610607610537610726565b6106425760405162461bcd60e51b8152600401808060200182810382526030815260200180610da96030913960400191505060405180910390fd5b61064b81610b5e565b50565b61065e610659610726565b610ba6565b565b600061043161066d610726565b846104be85604051806060016040528060258152602001610e8d6025913960046000610697610726565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61097416565b60006104316106db610726565b8484610816565b60006106f560068363ffffffff610bee16565b92915050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661076f5760405162461bcd60e51b8152600401808060200182810382526024815260200180610e696024913960400191505060405180910390fd5b6001600160a01b0382166107b45760405162461bcd60e51b8152600401808060200182810382526022815260200180610d616022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661085b5760405162461bcd60e51b8152600401808060200182810382526025815260200180610e446025913960400191505060405180910390fd5b6001600160a01b0382166108a05760405162461bcd60e51b8152600401808060200182810382526023815260200180610d3e6023913960400191505060405180910390fd5b6108e381604051806060016040528060268152602001610d83602691396001600160a01b038616600090815260036020526040902054919063ffffffff61097416565b6001600160a01b038085166000908152600360205260408082209390935590841681522054610918908263ffffffff610a0b16565b6001600160a01b0380841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610a035760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109c85781810151838201526020016109b0565b50505050905090810190601f1680156109f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610a65576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610ac7576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600554610ada908263ffffffff610a0b16565b6005556001600160a01b038216600090815260036020526040902054610b06908263ffffffff610a0b16565b6001600160a01b03831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b610b6f60068263ffffffff610c5516565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b610bb760068263ffffffff610cd616565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b038216610c355760405162461bcd60e51b8152600401808060200182810382526022815260200180610e226022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610c5f8282610bee565b15610cb1576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b610ce08282610bee565b610d1b5760405162461bcd60e51b8152600401808060200182810382526021815260200180610dd96021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff1916905556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c6545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820266dabb51a21c3ac1b53dce0ea5567b27fb5a63ceeee84f89d7cf299991cbc1c64736f6c63430005110032526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373";
|
|
|
|
type ERC20MockConstructorParams =
|
|
| [signer?: Signer]
|
|
| ConstructorParameters<typeof ContractFactory>;
|
|
|
|
const isSuperArgs = (
|
|
xs: ERC20MockConstructorParams
|
|
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
|
|
export class ERC20Mock__factory extends ContractFactory {
|
|
constructor(...args: ERC20MockConstructorParams) {
|
|
if (isSuperArgs(args)) {
|
|
super(...args);
|
|
} else {
|
|
super(_abi, _bytecode, args[0]);
|
|
}
|
|
this.contractName = "ERC20Mock";
|
|
}
|
|
|
|
override deploy(
|
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
): Promise<ERC20Mock> {
|
|
return super.deploy(overrides || {}) as Promise<ERC20Mock>;
|
|
}
|
|
override getDeployTransaction(
|
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
): TransactionRequest {
|
|
return super.getDeployTransaction(overrides || {});
|
|
}
|
|
override attach(address: string): ERC20Mock {
|
|
return super.attach(address) as ERC20Mock;
|
|
}
|
|
override connect(signer: Signer): ERC20Mock__factory {
|
|
return super.connect(signer) as ERC20Mock__factory;
|
|
}
|
|
static readonly contractName: "ERC20Mock";
|
|
|
|
public readonly contractName: "ERC20Mock";
|
|
|
|
static readonly bytecode = _bytecode;
|
|
static readonly abi = _abi;
|
|
static createInterface(): ERC20MockInterface {
|
|
return new utils.Interface(_abi) as ERC20MockInterface;
|
|
}
|
|
static connect(
|
|
address: string,
|
|
signerOrProvider: Signer | Provider
|
|
): ERC20Mock {
|
|
return new Contract(address, _abi, signerOrProvider) as ERC20Mock;
|
|
}
|
|
}
|