Skip to content

Commit

Permalink
v10.1.0: adds Token[blockchain].WRAPPED for WETH abi
Browse files Browse the repository at this point in the history
  • Loading branch information
10xSebastian committed Jun 19, 2023
1 parent 0faba4d commit 038160a
Show file tree
Hide file tree
Showing 10 changed files with 1,455 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ Token.bsc['20'] // [...] <XYZ>20 standard
Token.ethereum.ERC20 // [...] ERC20 ABI
Token.bsc.BEP20 // [...] BEP20 ABI

Token.ethereum.WRAPPED // [...] WETH ABI
Token.bsc.WRAPPED // [...] WETH ABI

```

`DEFAULT` references the broad default token standard on the respective blockchain:
Expand Down
288 changes: 288 additions & 0 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,286 @@ var ERC20 = [
},
];

var WETH = [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "guy",
"type": "address"
},
{
"name": "wad",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "src",
"type": "address"
},
{
"name": "dst",
"type": "address"
},
{
"name": "wad",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "wad",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dst",
"type": "address"
},
{
"name": "wad",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "deposit",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "src",
"type": "address"
},
{
"indexed": true,
"name": "guy",
"type": "address"
},
{
"indexed": false,
"name": "wad",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "src",
"type": "address"
},
{
"indexed": true,
"name": "dst",
"type": "address"
},
{
"indexed": false,
"name": "wad",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "dst",
"type": "address"
},
{
"indexed": false,
"name": "wad",
"type": "uint256"
}
],
"name": "Deposit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "src",
"type": "address"
},
{
"indexed": false,
"name": "wad",
"type": "uint256"
}
],
"name": "Withdrawal",
"type": "event"
}
];

const uriAPI = [{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}];

const uriToName = (tokenURI)=>{
Expand Down Expand Up @@ -657,34 +937,39 @@ Token.ethereum = {
ERC20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

Token.bsc = {
DEFAULT: ERC20,
BEP20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

Token.polygon = {
DEFAULT: ERC20,
ERC20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

Token.fantom = {
DEFAULT: ERC20,
FTM20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

Token.arbitrum = {
DEFAULT: ERC20,
ERC20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

Token.avalanche = {
Expand All @@ -693,20 +978,23 @@ Token.avalanche = {
ARC20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

Token.gnosis = {
DEFAULT: ERC20,
ERC20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

Token.optimism = {
DEFAULT: ERC20,
ERC20: ERC20,
20: ERC20,
1155: ERC1155,
WRAPPED: WETH,
};

export { Token as default };
Loading

0 comments on commit 038160a

Please sign in to comment.