Skip to content

Commit

Permalink
worldchain (#36)
Browse files Browse the repository at this point in the history
* worldchain

* fix tests
  • Loading branch information
0xNe0x1 authored Sep 12, 2024
1 parent f3b2a23 commit 29c49a6
Show file tree
Hide file tree
Showing 12 changed files with 378 additions and 208 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Run Playwright tests
run: yarn test:playwright

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
257 changes: 171 additions & 86 deletions dist/esm/index.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ let confirm$1 = (transaction) => {
return transaction
};

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$f(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
4 changes: 2 additions & 2 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ let confirm$1 = (transaction) => {
return transaction
};

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$k(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
257 changes: 171 additions & 86 deletions dist/umd/index.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@
return transaction
};

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$f(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
4 changes: 2 additions & 2 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@
return transaction
};

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$k(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
4 changes: 2 additions & 2 deletions package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-mock-evm",
"moduleName": "Web3Mock",
"version": "14.18.0",
"version": "14.19.0",
"description": "JavaScript library to mock web3 responses either by emulating web3 wallets or web3 RPC requests.",
"main": "./dist/umd/index.evm.js",
"module": "./dist/esm/index.evm.js",
Expand All @@ -25,7 +25,7 @@
"homepage": "https://depay.com",
"private": false,
"dependencies": {
"@depay/web3-blockchains": "^9.1.4",
"@depay/web3-blockchains": "^9.6.0",
"ethers": "^5.7.1"
},
"peerDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-mock",
"moduleName": "Web3Mock",
"version": "14.18.0",
"version": "14.19.0",
"description": "JavaScript library to mock web3 responses either by emulating web3 wallets or web3 RPC requests.",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
"private": false,
"dependencies": {
"@depay/solana-web3.js": "^1.26.0",
"@depay/web3-blockchains": "^9.1.4",
"@depay/web3-blockchains": "^9.6.0",
"ethers": "^5.7.1"
},
"engines": {
Expand All @@ -48,9 +48,9 @@
"@babel/preset-env": "^7.12.7",
"@babel/runtime": "^7.18.6",
"@depay/solana-web3.js": "^1.26.0",
"@depay/web3-blockchains": "^9.1.4",
"@depay/web3-client": "^10.15.0",
"@depay/web3-tokens": "^10.2.0",
"@depay/web3-blockchains": "^9.6.0",
"@depay/web3-client": "^10.18.16",
"@depay/web3-tokens": "^10.3.0",
"@playwright/test": "^1.24.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-json": "^4.1.0",
Expand Down
4 changes: 2 additions & 2 deletions package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-mock-solana",
"moduleName": "Web3Mock",
"version": "14.18.0",
"version": "14.19.0",
"description": "JavaScript library to mock web3 responses either by emulating web3 wallets or web3 RPC requests.",
"main": "./dist/umd/index.solana.js",
"module": "./dist/esm/index.solana.js",
Expand All @@ -26,7 +26,7 @@
"private": false,
"dependencies": {
"@depay/solana-web3.js": "^1.26.0",
"@depay/web3-blockchains": "^9.1.4",
"@depay/web3-blockchains": "^9.6.0",
"ethers": "^5.7.1"
},
"peerDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/blockchains.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*#if _EVM
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 = []
/*#elif _SOLANA
Expand All @@ -12,8 +12,8 @@ supported.solana = ['solana']
//#else */

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']

//#endif
Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1028,20 +1028,20 @@
dependencies:
bs58 "^5.0.0"

"@depay/web3-blockchains@^9.1.4":
version "9.1.4"
resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-9.1.4.tgz#f006c29c887c433e1824e2bfabf8f39ad13da907"
integrity sha512-CQnXCNAt3sA1MphZDMPbrhAPtemzeQ/NKeHcd2aBF61nTjJCRUmSh1Ox8Z6rlSjgDP66842iy6JAoRiFDtlmFw==

"@depay/web3-client@^10.15.0":
version "10.15.0"
resolved "https://registry.yarnpkg.com/@depay/web3-client/-/web3-client-10.15.0.tgz#5751f8548361a6328abc333111e8b77c98a62081"
integrity sha512-JA+duRpwGigfiIm3zqo872UX7mSUpxcmMO4eVfENdeaHN/NotBPSAM17OFpux9Ikmh29MTWQ7El3apUr9BUIXQ==

"@depay/web3-tokens@^10.2.0":
version "10.2.0"
resolved "https://registry.yarnpkg.com/@depay/web3-tokens/-/web3-tokens-10.2.0.tgz#450a43cfed89ae0854665b2c794fc69f8956f06c"
integrity sha512-nPtj+0B+M8AKb/sOJ8sUq4GxHTVgarg82AGWd35IIEyv2Z8YU7gp2g68e4WHLp/EtRuXpWNBS2S2J9fMmAt0wQ==
"@depay/web3-blockchains@^9.6.0":
version "9.6.0"
resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-9.6.0.tgz#51bcd4cd6bcc9542b61f7792eabdccbe6385b476"
integrity sha512-+REyl5vva1e6t4yvSJKJE2IgidTNDPB7imn4xxAqqeVOFJryLBwaPddyh5C9pnX9GMpLhR6s6Su4AgrdLSZ/JQ==

"@depay/web3-client@^10.18.16":
version "10.18.16"
resolved "https://registry.yarnpkg.com/@depay/web3-client/-/web3-client-10.18.16.tgz#d9ba8608621766f8a779c837daba1ae7b9f2e2e9"
integrity sha512-wY/k5FP7HqLbWJZvEo0Owu5Cjzdzm2wQqjv3UsGUuGioAEfa7jI+6VXxADWLmR8vIwZAtcC3PSryMBZakVxdRw==

"@depay/web3-tokens@^10.3.0":
version "10.3.0"
resolved "https://registry.yarnpkg.com/@depay/web3-tokens/-/web3-tokens-10.3.0.tgz#11f19ed154c65329739afc29e74cd254030f811f"
integrity sha512-r/98yZx+j0NLm5Z6wiUwyJvsWE/sq4//B1j4S4q1zzm62S3kLs3+H/5XEVEcInzekvr2NruC0oFgV+1Lfvwmtw==

"@eslint/eslintrc@^0.4.3":
version "0.4.3"
Expand Down

0 comments on commit 29c49a6

Please sign in to comment.