feat: update contract ABI

This commit is contained in:
bartosz-lipinski 2021-04-12 21:12:04 -05:00
parent 35f96871c2
commit 28e1231cc5
24 changed files with 129729 additions and 31635 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,600 @@
{
"contractName": "Context",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/utils/Context.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/utils/Context.sol",
"exportedSymbols": {
"Context": [
3618
]
},
"id": 3619,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3597,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "33:31:9"
},
{
"abstract": true,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 3618,
"linearizedBaseContracts": [
3618
],
"name": "Context",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 3605,
"nodeType": "Block",
"src": "668:34:9",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3602,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "685:3:9",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "685:10:9",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"functionReturnParameters": 3601,
"id": 3604,
"nodeType": "Return",
"src": "678:17:9"
}
]
},
"documentation": null,
"id": 3606,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_msgSender",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3598,
"nodeType": "ParameterList",
"parameters": [],
"src": "617:2:9"
},
"returnParameters": {
"id": 3601,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3600,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3606,
"src": "651:15:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 3599,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "651:15:9",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "650:17:9"
},
"scope": 3618,
"src": "598:104:9",
"stateMutability": "view",
"virtual": true,
"visibility": "internal"
},
{
"body": {
"id": 3616,
"nodeType": "Block",
"src": "773:165:9",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3611,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "783:4:9",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Context_$3618",
"typeString": "contract Context"
}
},
"id": 3612,
"nodeType": "ExpressionStatement",
"src": "783:4:9"
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3613,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "923:3:9",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3614,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "923:8:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
"functionReturnParameters": 3610,
"id": 3615,
"nodeType": "Return",
"src": "916:15:9"
}
]
},
"documentation": null,
"id": 3617,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_msgData",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3607,
"nodeType": "ParameterList",
"parameters": [],
"src": "725:2:9"
},
"returnParameters": {
"id": 3610,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3609,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3617,
"src": "759:12:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3608,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "759:5:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "758:14:9"
},
"scope": 3618,
"src": "708:230:9",
"stateMutability": "view",
"virtual": true,
"visibility": "internal"
}
],
"scope": 3619,
"src": "566:374:9"
}
],
"src": "33:908:9"
},
"legacyAST": {
"attributes": {
"absolutePath": "@openzeppelin/contracts/utils/Context.sol",
"exportedSymbols": {
"Context": [
3618
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
]
},
"id": 3597,
"name": "PragmaDirective",
"src": "33:31:9"
},
{
"attributes": {
"abstract": true,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
3618
],
"name": "Context",
"scope": 3619
},
"children": [
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "_msgSender",
"overrides": null,
"scope": 3618,
"stateMutability": "view",
"virtual": true,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3598,
"name": "ParameterList",
"src": "617:2:9"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 3606,
"stateVariable": false,
"storageLocation": "default",
"type": "address payable",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "payable",
"type": "address payable"
},
"id": 3599,
"name": "ElementaryTypeName",
"src": "651:15:9"
}
],
"id": 3600,
"name": "VariableDeclaration",
"src": "651:15:9"
}
],
"id": 3601,
"name": "ParameterList",
"src": "650:17:9"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 3601
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 3602,
"name": "Identifier",
"src": "685:3:9"
}
],
"id": 3603,
"name": "MemberAccess",
"src": "685:10:9"
}
],
"id": 3604,
"name": "Return",
"src": "678:17:9"
}
],
"id": 3605,
"name": "Block",
"src": "668:34:9"
}
],
"id": 3606,
"name": "FunctionDefinition",
"src": "598:104:9"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "_msgData",
"overrides": null,
"scope": 3618,
"stateMutability": "view",
"virtual": true,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3607,
"name": "ParameterList",
"src": "725:2:9"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 3617,
"stateVariable": false,
"storageLocation": "memory",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 3608,
"name": "ElementaryTypeName",
"src": "759:5:9"
}
],
"id": 3609,
"name": "VariableDeclaration",
"src": "759:12:9"
}
],
"id": 3610,
"name": "ParameterList",
"src": "758:14:9"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -28,
"type": "contract Context",
"value": "this"
},
"id": 3611,
"name": "Identifier",
"src": "783:4:9"
}
],
"id": 3612,
"name": "ExpressionStatement",
"src": "783:4:9"
},
{
"attributes": {
"functionReturnParameters": 3610
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "data",
"referencedDeclaration": null,
"type": "bytes calldata"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 3613,
"name": "Identifier",
"src": "923:3:9"
}
],
"id": 3614,
"name": "MemberAccess",
"src": "923:8:9"
}
],
"id": 3615,
"name": "Return",
"src": "916:15:9"
}
],
"id": 3616,
"name": "Block",
"src": "773:165:9"
}
],
"id": 3617,
"name": "FunctionDefinition",
"src": "708:230:9"
}
],
"id": 3618,
"name": "ContractDefinition",
"src": "566:374:9"
}
],
"id": 3619,
"name": "SourceUnit",
"src": "33:908:9"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.3.4",
"updatedAt": "2021-04-12T21:53:29.929Z",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -102,6 +102,7 @@
"arweave-deploy": "^1.9.1",
"gh-pages": "^3.1.0",
"npm-link-shared": "0.5.6",
"typechain": "^4.0.3",
"prettier": "^2.1.2"
},
"peerDependencies": {

View File

@ -1,5 +1,6 @@
/* Generated by ts-generator ver. 0.0.8 */
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
@ -10,8 +11,24 @@ import {
TypedFunctionDescription,
} from '.';
interface Erc20Interface extends Interface {
interface ERC20Interface extends Interface {
functions: {
name: TypedFunctionDescription<{ encode([]: []): string }>;
symbol: TypedFunctionDescription<{ encode([]: []): string }>;
decimals: TypedFunctionDescription<{ encode([]: []): string }>;
totalSupply: TypedFunctionDescription<{ encode([]: []): string }>;
balanceOf: TypedFunctionDescription<{
encode([account]: [string]): string;
}>;
transfer: TypedFunctionDescription<{
encode([recipient, amount]: [string, BigNumberish]): string;
}>;
allowance: TypedFunctionDescription<{
encode([owner, spender]: [string, string]): string;
}>;
@ -20,30 +37,6 @@ interface Erc20Interface extends Interface {
encode([spender, amount]: [string, BigNumberish]): string;
}>;
balanceOf: TypedFunctionDescription<{
encode([account]: [string]): string;
}>;
decimals: TypedFunctionDescription<{ encode([]: []): string }>;
decreaseAllowance: TypedFunctionDescription<{
encode([spender, subtractedValue]: [string, BigNumberish]): string;
}>;
increaseAllowance: TypedFunctionDescription<{
encode([spender, addedValue]: [string, BigNumberish]): string;
}>;
name: TypedFunctionDescription<{ encode([]: []): string }>;
symbol: TypedFunctionDescription<{ encode([]: []): string }>;
totalSupply: TypedFunctionDescription<{ encode([]: []): string }>;
transfer: TypedFunctionDescription<{
encode([recipient, amount]: [string, BigNumberish]): string;
}>;
transferFrom: TypedFunctionDescription<{
encode([sender, recipient, amount]: [
string,
@ -51,6 +44,14 @@ interface Erc20Interface extends Interface {
BigNumberish,
]): string;
}>;
increaseAllowance: TypedFunctionDescription<{
encode([spender, addedValue]: [string, BigNumberish]): string;
}>;
decreaseAllowance: TypedFunctionDescription<{
encode([spender, subtractedValue]: [string, BigNumberish]): string;
}>;
};
events: {
@ -72,106 +73,133 @@ interface Erc20Interface extends Interface {
};
}
export class Erc20 extends Contract {
connect(signerOrProvider: Signer | Provider | string): Erc20;
attach(addressOrName: string): Erc20;
deployed(): Promise<Erc20>;
export class ERC20 extends Contract {
connect(signerOrProvider: Signer | Provider | string): ERC20;
attach(addressOrName: string): ERC20;
deployed(): Promise<ERC20>;
on(event: EventFilter | string, listener: Listener): Erc20;
once(event: EventFilter | string, listener: Listener): Erc20;
addListener(eventName: EventFilter | string, listener: Listener): Erc20;
removeAllListeners(eventName: EventFilter | string): Erc20;
removeListener(eventName: any, listener: Listener): Erc20;
on(event: EventFilter | string, listener: Listener): ERC20;
once(event: EventFilter | string, listener: Listener): ERC20;
addListener(eventName: EventFilter | string, listener: Listener): ERC20;
removeAllListeners(eventName: EventFilter | string): ERC20;
removeListener(eventName: any, listener: Listener): ERC20;
interface: Erc20Interface;
interface: ERC20Interface;
functions: {
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
name(overrides?: TransactionOverrides): Promise<string>;
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
'name()'(overrides?: TransactionOverrides): Promise<string>;
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
symbol(overrides?: TransactionOverrides): Promise<string>;
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
decimals(overrides?: TransactionOverrides): Promise<number>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
/**
* See {IERC20-totalSupply}.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
decimals(overrides?: TransactionOverrides): Promise<number>;
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
name(overrides?: TransactionOverrides): Promise<string>;
'name()'(overrides?: TransactionOverrides): Promise<string>;
symbol(overrides?: TransactionOverrides): Promise<string>;
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-allowance}.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
transferFrom(
sender: string,
recipient: string,
@ -179,100 +207,166 @@ export class Erc20 extends Contract {
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
};
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
name(overrides?: TransactionOverrides): Promise<string>;
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
'name()'(overrides?: TransactionOverrides): Promise<string>;
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
symbol(overrides?: TransactionOverrides): Promise<string>;
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
decimals(overrides?: TransactionOverrides): Promise<number>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
/**
* See {IERC20-totalSupply}.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
decimals(overrides?: TransactionOverrides): Promise<number>;
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
name(overrides?: TransactionOverrides): Promise<string>;
'name()'(overrides?: TransactionOverrides): Promise<string>;
symbol(overrides?: TransactionOverrides): Promise<string>;
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-allowance}.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
transferFrom(
sender: string,
recipient: string,
@ -280,6 +374,9 @@ export class Erc20 extends Contract {
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
@ -287,6 +384,42 @@ export class Erc20 extends Contract {
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
filters: {
Approval(
owner: string | null,
@ -298,92 +431,119 @@ export class Erc20 extends Contract {
};
estimate: {
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
name(overrides?: TransactionOverrides): Promise<BigNumber>;
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
'name()'(overrides?: TransactionOverrides): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
symbol(overrides?: TransactionOverrides): Promise<BigNumber>;
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
'symbol()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
decimals(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
'decimals()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
decimals(overrides?: TransactionOverrides): Promise<BigNumber>;
'decimals()'(overrides?: TransactionOverrides): Promise<BigNumber>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
name(overrides?: TransactionOverrides): Promise<BigNumber>;
'name()'(overrides?: TransactionOverrides): Promise<BigNumber>;
symbol(overrides?: TransactionOverrides): Promise<BigNumber>;
'symbol()'(overrides?: TransactionOverrides): Promise<BigNumber>;
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
transferFrom(
sender: string,
recipient: string,
@ -391,11 +551,50 @@ export class Erc20 extends Contract {
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
};
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,388 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils';
import {
TransactionOverrides,
TypedEventDescription,
TypedFunctionDescription,
} from '.';
interface IERC20Interface extends Interface {
functions: {
totalSupply: TypedFunctionDescription<{ encode([]: []): string }>;
balanceOf: TypedFunctionDescription<{
encode([account]: [string]): string;
}>;
transfer: TypedFunctionDescription<{
encode([recipient, amount]: [string, BigNumberish]): string;
}>;
allowance: TypedFunctionDescription<{
encode([owner, spender]: [string, string]): string;
}>;
approve: TypedFunctionDescription<{
encode([spender, amount]: [string, BigNumberish]): string;
}>;
transferFrom: TypedFunctionDescription<{
encode([sender, recipient, amount]: [
string,
string,
BigNumberish,
]): string;
}>;
};
events: {
Approval: TypedEventDescription<{
encodeTopics([owner, spender, value]: [
string | null,
string | null,
null,
]): string[];
}>;
Transfer: TypedEventDescription<{
encodeTopics([from, to, value]: [
string | null,
string | null,
null,
]): string[];
}>;
};
}
export class IERC20 extends Contract {
connect(signerOrProvider: Signer | Provider | string): IERC20;
attach(addressOrName: string): IERC20;
deployed(): Promise<IERC20>;
on(event: EventFilter | string, listener: Listener): IERC20;
once(event: EventFilter | string, listener: Listener): IERC20;
addListener(eventName: EventFilter | string, listener: Listener): IERC20;
removeAllListeners(eventName: EventFilter | string): IERC20;
removeListener(eventName: any, listener: Listener): IERC20;
interface: IERC20Interface;
functions: {
/**
* Returns the amount of tokens in existence.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
};
/**
* Returns the amount of tokens in existence.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
filters: {
Approval(
owner: string | null,
spender: string | null,
value: null,
): EventFilter;
Transfer(from: string | null, to: string | null, value: null): EventFilter;
};
estimate: {
/**
* Returns the amount of tokens in existence.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
};
}

View File

@ -0,0 +1,200 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer } from 'ethers';
import { Provider } from 'ethers/providers';
import { IERC20 } from './IERC20';
export class IERC20Factory {
static connect(address: string, signerOrProvider: Signer | Provider): IERC20 {
return new Contract(address, _abi, signerOrProvider) as IERC20;
}
}
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',
},
{
inputs: [],
name: 'totalSupply',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
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: '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: '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: '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',
},
];

436
packages/bridge/src/contracts/WETH.d.ts vendored Normal file
View File

@ -0,0 +1,436 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils';
import {
TransactionOverrides,
TypedEventDescription,
TypedFunctionDescription,
} from '.';
interface WETHInterface extends Interface {
functions: {
allowance: TypedFunctionDescription<{
encode([owner, spender]: [string, string]): string;
}>;
approve: TypedFunctionDescription<{
encode([spender, amount]: [string, BigNumberish]): string;
}>;
balanceOf: TypedFunctionDescription<{
encode([account]: [string]): string;
}>;
totalSupply: TypedFunctionDescription<{ encode([]: []): string }>;
transfer: TypedFunctionDescription<{
encode([recipient, amount]: [string, BigNumberish]): string;
}>;
transferFrom: TypedFunctionDescription<{
encode([sender, recipient, amount]: [
string,
string,
BigNumberish,
]): string;
}>;
deposit: TypedFunctionDescription<{ encode([]: []): string }>;
withdraw: TypedFunctionDescription<{
encode([amount]: [BigNumberish]): string;
}>;
};
events: {
Approval: TypedEventDescription<{
encodeTopics([owner, spender, value]: [
string | null,
string | null,
null,
]): string[];
}>;
Transfer: TypedEventDescription<{
encodeTopics([from, to, value]: [
string | null,
string | null,
null,
]): string[];
}>;
};
}
export class WETH extends Contract {
connect(signerOrProvider: Signer | Provider | string): WETH;
attach(addressOrName: string): WETH;
deployed(): Promise<WETH>;
on(event: EventFilter | string, listener: Listener): WETH;
once(event: EventFilter | string, listener: Listener): WETH;
addListener(eventName: EventFilter | string, listener: Listener): WETH;
removeAllListeners(eventName: EventFilter | string): WETH;
removeListener(eventName: any, listener: Listener): WETH;
interface: WETHInterface;
functions: {
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the amount of tokens owned by `account`.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
deposit(overrides?: TransactionOverrides): Promise<ContractTransaction>;
'deposit()'(overrides?: TransactionOverrides): Promise<ContractTransaction>;
withdraw(
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'withdraw(uint256)'(
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
};
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the amount of tokens owned by `account`.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
deposit(overrides?: TransactionOverrides): Promise<ContractTransaction>;
'deposit()'(overrides?: TransactionOverrides): Promise<ContractTransaction>;
withdraw(
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'withdraw(uint256)'(
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
filters: {
Approval(
owner: string | null,
spender: string | null,
value: null,
): EventFilter;
Transfer(from: string | null, to: string | null, value: null): EventFilter;
};
estimate: {
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens owned by `account`.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the amount of tokens in existence.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
deposit(overrides?: TransactionOverrides): Promise<BigNumber>;
'deposit()'(overrides?: TransactionOverrides): Promise<BigNumber>;
withdraw(
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'withdraw(uint256)'(
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
};
}

View File

@ -0,0 +1,220 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer } from 'ethers';
import { Provider } from 'ethers/providers';
import { WETH } from './WETH';
export class WETHFactory {
static connect(address: string, signerOrProvider: Signer | Provider): WETH {
return new Contract(address, _abi, signerOrProvider) as WETH;
}
}
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',
},
{
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: [],
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: 'deposit',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: 'amount',
type: 'uint256',
},
],
name: 'withdraw',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
];

View File

@ -1,5 +1,6 @@
/* Generated by ts-generator ver. 0.0.8 */
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
@ -34,6 +35,10 @@ interface WormholeInterface extends Interface {
submitVAA: TypedFunctionDescription<{ encode([vaa]: [Arrayish]): string }>;
parseAndVerifyVAA: TypedFunctionDescription<{
encode([vaa]: [Arrayish]): string;
}>;
lockAssets: TypedFunctionDescription<{
encode([asset, amount, recipient, target_chain, nonce, refund_dust]: [
string,
@ -184,6 +189,42 @@ export class Wormhole extends Contract {
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
parseAndVerifyVAA(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<{
version: number;
hash: string;
guardian_set_index: number;
timestamp: number;
action: number;
payload: string;
0: number;
1: string;
2: number;
3: number;
4: number;
5: string;
}>;
'parseAndVerifyVAA(bytes)'(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<{
version: number;
hash: string;
guardian_set_index: number;
timestamp: number;
action: number;
payload: string;
0: number;
1: string;
2: number;
3: number;
4: number;
5: string;
}>;
lockAssets(
asset: string,
amount: BigNumberish,
@ -301,6 +342,42 @@ export class Wormhole extends Contract {
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
parseAndVerifyVAA(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<{
version: number;
hash: string;
guardian_set_index: number;
timestamp: number;
action: number;
payload: string;
0: number;
1: string;
2: number;
3: number;
4: number;
5: string;
}>;
'parseAndVerifyVAA(bytes)'(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<{
version: number;
hash: string;
guardian_set_index: number;
timestamp: number;
action: number;
payload: string;
0: number;
1: string;
2: number;
3: number;
4: number;
5: string;
}>;
lockAssets(
asset: string,
amount: BigNumberish,
@ -432,6 +509,16 @@ export class Wormhole extends Contract {
overrides?: TransactionOverrides,
): Promise<BigNumber>;
parseAndVerifyVAA(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'parseAndVerifyVAA(bytes)'(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
lockAssets(
asset: string,
amount: BigNumberish,

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
/* Generated by ts-generator ver. 0.0.8 */
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
@ -21,7 +22,11 @@ interface WrappedAssetInterface extends Interface {
initialized: TypedFunctionDescription<{ encode([]: []): string }>;
initialize: TypedFunctionDescription<{
encode([_assetChain, _assetAddress]: [BigNumberish, Arrayish]): string;
encode([_assetChain, _assetAddress, decimals]: [
BigNumberish,
Arrayish,
BigNumberish,
]): string;
}>;
mint: TypedFunctionDescription<{
@ -128,12 +133,14 @@ export class WrappedAsset extends Contract {
initialize(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
decimals: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'initialize(uint8,bytes32)'(
'initialize(uint8,bytes32,uint8)'(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
decimals: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
@ -347,12 +354,14 @@ export class WrappedAsset extends Contract {
initialize(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
decimals: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'initialize(uint8,bytes32)'(
'initialize(uint8,bytes32,uint8)'(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
decimals: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
@ -576,12 +585,14 @@ export class WrappedAsset extends Contract {
initialize(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
decimals: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'initialize(uint8,bytes32)'(
'initialize(uint8,bytes32,uint8)'(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
decimals: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
/* Generated by ts-generator ver. 0.0.8 */
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
BigNumberish,
EventDescription,

105
yarn.lock
View File

@ -2947,7 +2947,7 @@
dependencies:
cross-fetch "^3.0.6"
"@solana/spl-token-swap@0.1.0", "@solana/spl-token-swap@^0.1.0":
"@solana/spl-token-swap@0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@solana/spl-token-swap/-/spl-token-swap-0.1.0.tgz#a1bc2b0c96edae8b31bb2cc000ebacdc36e131c8"
integrity sha512-h0ntp6xwRZBEKDd6oNhJTbPISjIfeGm0eqQqAccTkeluo1zHve4dnUChTKF4MQ+JqXjfqd6z6DJjfa0+dGA37w==
@ -3710,6 +3710,13 @@
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256"
integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==
"@types/mkdirp@^0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f"
integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==
dependencies:
"@types/node" "*"
"@types/node@*", "@types/node@>= 8":
version "14.14.28"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.28.tgz#cade4b64f8438f588951a6b35843ce536853f25b"
@ -3737,6 +3744,11 @@
dependencies:
"@types/node" "*"
"@types/prettier@^2.1.1":
version "2.2.3"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0"
integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==
"@types/prop-types@*":
version "15.7.3"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7"
@ -3812,6 +3824,13 @@
"@types/prop-types" "*"
csstype "^3.0.2"
"@types/resolve@^0.0.8":
version "0.0.8"
resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194"
integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==
dependencies:
"@types/node" "*"
"@types/secp256k1@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz#fb3aa61a1848ad97d7425ff9dcba784549fca5a4"
@ -4856,6 +4875,20 @@ arr-union@^3.1.0:
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
array-back@^1.0.3, array-back@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b"
integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=
dependencies:
typical "^2.6.0"
array-back@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022"
integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==
dependencies:
typical "^2.6.1"
array-differ@^2.0.3:
version "2.1.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
@ -6868,6 +6901,15 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"
command-line-args@^4.0.7:
version "4.0.7"
resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46"
integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA==
dependencies:
array-back "^2.0.0"
find-replace "^1.0.3"
typical "^2.6.1"
commander@2, commander@^2.11.0, commander@^2.18.0, commander@^2.20.0, commander@^2.20.3:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
@ -9944,6 +9986,14 @@ find-cache-dir@^3.3.1:
make-dir "^3.0.2"
pkg-dir "^4.1.0"
find-replace@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0"
integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A=
dependencies:
array-back "^1.0.4"
test-value "^2.1.0"
find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
@ -18856,6 +18906,14 @@ test-exclude@^5.2.3:
read-pkg-up "^4.0.0"
require-main-filename "^2.0.0"
test-value@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291"
integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=
dependencies:
array-back "^1.0.3"
typical "^2.6.0"
text-extensions@^1.0.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26"
@ -19106,6 +19164,31 @@ trough@^1.0.0:
resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406"
integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==
ts-essentials@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a"
integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ==
ts-essentials@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.1.tgz#d205508cae0cdadfb73c89503140cf2228389e2d"
integrity sha512-8lwh3QJtIc1UWhkQtr9XuksXu3O0YQdEE5g79guDfhCaU1FWTDIEDZ1ZSx4HTHUmlJZ8L812j3BZQ4a0aOUkSA==
ts-generator@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.1.1.tgz#af46f2fb88a6db1f9785977e9590e7bcd79220ab"
integrity sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ==
dependencies:
"@types/mkdirp" "^0.5.2"
"@types/prettier" "^2.1.1"
"@types/resolve" "^0.0.8"
chalk "^2.4.1"
glob "^7.1.2"
mkdirp "^0.5.1"
prettier "^2.1.2"
resolve "^1.8.1"
ts-essentials "^1.0.0"
ts-jest@^24.0.0:
version "24.3.0"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.3.0.tgz#b97814e3eab359ea840a1ac112deae68aa440869"
@ -19122,7 +19205,7 @@ ts-jest@^24.0.0:
semver "^5.5"
yargs-parser "10.x"
ts-node@^9.0.0, ts-node@^9.1.1:
ts-node@^9.0.0:
version "9.1.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
@ -19243,6 +19326,19 @@ type@^2.0.0:
resolved "https://registry.yarnpkg.com/type/-/type-2.2.0.tgz#3edd448793f517d8b9dd108b486a043f5befd91f"
integrity sha512-M/u37b4oSGlusaU8ZB96BfFPWQ8MbsZYXB+kXGMiDj6IKinkcNaQvmirBuWj8mAXqP6LYn1rQvbTYum3yPhaOA==
typechain@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/typechain/-/typechain-4.0.3.tgz#e8fcd6c984676858c64eeeb155ea783a10b73779"
integrity sha512-tmoHQeXZWHxIdeLK+i6dU0CU0vOd9Cndr3jFTZIMzak5/YpFZ8XoiYpTZcngygGBqZo+Z1EUmttLbW9KkFZLgQ==
dependencies:
command-line-args "^4.0.7"
debug "^4.1.1"
fs-extra "^7.0.0"
js-sha3 "^0.8.0"
lodash "^4.17.15"
ts-essentials "^7.0.1"
ts-generator "^0.1.1"
typedarray-to-buffer@3.1.5, typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
@ -19260,6 +19356,11 @@ typescript@^4.1.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
typical@^2.6.0, typical@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d"
integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=
uglify-js@^3.1.4:
version "3.12.8"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.8.tgz#a82e6e53c9be14f7382de3d068ef1e26e7d4aaf8"