Skip to content

Commit

Permalink
add worldchain (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 authored Sep 12, 2024
1 parent 61352f5 commit 7af3d79
Show file tree
Hide file tree
Showing 13 changed files with 443 additions and 213 deletions.
3 changes: 1 addition & 2 deletions dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://cdn.ethers.io/lib/ethers-5.7.umd.min.js" type="application/javascript"></script>
<script crossorigin src="https://unpkg.com/@depay/solana-web3.js@1"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-blockchains@8"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-blockchains@9"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-client@10"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-wallets@15"></script>
<script src="tmp/index.dev.js"></script>
</head>
<body>
Expand Down
12 changes: 10 additions & 2 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,8 +823,8 @@ var symbolOnEVM = ({ blockchain, address, api })=>{
)
};

let supported = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
supported.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
let supported = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
supported.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
supported.solana = [];

function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
Expand Down Expand Up @@ -1005,4 +1005,12 @@ Token.base = {
WRAPPED: WETH,
};

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

export { Token as default };
12 changes: 10 additions & 2 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,8 @@ var symbolOnSolana = async ({ blockchain, address })=>{
return _optionalChain$1([metaData, 'optionalAccess', _ => _.symbol])
};

let supported = ['ethereum', 'bsc', 'polygon', 'solana', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
supported.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
let supported = ['ethereum', 'bsc', 'polygon', 'solana', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
supported.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
supported.solana = ['solana'];

function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
Expand Down Expand Up @@ -1286,6 +1286,14 @@ Token.base = {
WRAPPED: WETH,
};

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

Token.solana = {
MINT_LAYOUT,
METADATA_LAYOUT,
Expand Down
Loading

0 comments on commit 7af3d79

Please sign in to comment.