diff --git a/package-lock.json b/package-lock.json index f759c7fc..251a9920 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3651,9 +3651,9 @@ "link": true }, "node_modules/@tableland/evm": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@tableland/evm/-/evm-6.1.1.tgz", - "integrity": "sha512-6fQLM2YFTlFLIDgzvEITIqNpQoxyaD70l6KFBQEteU/wDy2bAz0d/N618H1U5faaG9cfOwyvDAYnmh3gyZdTEw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@tableland/evm/-/evm-6.2.0.tgz", + "integrity": "sha512-5lazGjkiggwQ4GjBgEoI/v3IG5uM4H6b9bcKoJ37mRySEaQtFKUMhrvK7juNUyLipc1XMrhMBbh0xSH6bUAbhA==", "dependencies": { "@openzeppelin/contracts": "4.9.6", "ethers": "^6.12.0" @@ -18291,11 +18291,11 @@ }, "packages/cli": { "name": "@tableland/cli", - "version": "7.0.0", + "version": "7.1.0", "license": "MIT AND Apache-2.0", "dependencies": { "@tableland/node-helpers": "^1.0.0", - "@tableland/sdk": "^7.0.0", + "@tableland/sdk": "^7.1.0", "@tableland/sqlparser": "^1.3.0", "@tableland/studio-cli": "^0.1.0-pre.4", "cli-select-2": "^2.0.0", @@ -18330,17 +18330,6 @@ "url": "https://paulmillr.com/funding/" } }, - "packages/cli/node_modules/@tableland/sdk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@tableland/sdk/-/sdk-7.0.0.tgz", - "integrity": "sha512-+eOa4fV9EAYI7dmpg0gkT7ltcpcB1RgW2j9MFYK1VlhxGlQsgS1R6RbHJqCgy4FFAcdnce58PHcPG/hQVv3B8w==", - "dependencies": { - "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.0", - "@tableland/sqlparser": "^1.3.0", - "ethers": "^6.12.0" - } - }, "packages/cli/node_modules/@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", @@ -18676,17 +18665,6 @@ "url": "https://paulmillr.com/funding/" } }, - "packages/local/node_modules/@tableland/sdk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@tableland/sdk/-/sdk-7.0.0.tgz", - "integrity": "sha512-+eOa4fV9EAYI7dmpg0gkT7ltcpcB1RgW2j9MFYK1VlhxGlQsgS1R6RbHJqCgy4FFAcdnce58PHcPG/hQVv3B8w==", - "dependencies": { - "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.0", - "@tableland/sqlparser": "^1.3.0", - "ethers": "^6.12.0" - } - }, "packages/local/node_modules/@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", @@ -18807,110 +18785,13 @@ "node": ">=14.0.0" } }, - "packages/node-helpers/node_modules/@adraffy/ens-normalize": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", - "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", - "dev": true - }, - "packages/node-helpers/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "dev": true, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "packages/node-helpers/node_modules/@tableland/sdk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@tableland/sdk/-/sdk-7.0.0.tgz", - "integrity": "sha512-+eOa4fV9EAYI7dmpg0gkT7ltcpcB1RgW2j9MFYK1VlhxGlQsgS1R6RbHJqCgy4FFAcdnce58PHcPG/hQVv3B8w==", - "dev": true, - "dependencies": { - "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.0", - "@tableland/sqlparser": "^1.3.0", - "ethers": "^6.12.0" - } - }, - "packages/node-helpers/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", - "dev": true - }, - "packages/node-helpers/node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", - "dev": true - }, - "packages/node-helpers/node_modules/ethers": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.12.1.tgz", - "integrity": "sha512-j6wcVoZf06nqEcBbDWkKg8Fp895SS96dSnTCjiXT+8vt2o02raTn4Lo9ERUuIVU5bAjoPYeA+7ytQFexFmLuVw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@adraffy/ens-normalize": "1.10.1", - "@noble/curves": "1.2.0", - "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", - "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "packages/node-helpers/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "packages/node-helpers/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "packages/sdk": { "name": "@tableland/sdk", - "version": "7.0.1", + "version": "7.1.0", "license": "MIT AND Apache-2.0", "dependencies": { "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.1", + "@tableland/evm": "^6.2.0", "@tableland/sqlparser": "^1.3.0", "ethers": "^6.12.1" } @@ -21394,7 +21275,7 @@ "version": "file:packages/cli", "requires": { "@tableland/node-helpers": "^1.0.0", - "@tableland/sdk": "^7.0.0", + "@tableland/sdk": "^7.1.0", "@tableland/sqlparser": "^1.3.0", "@tableland/studio-cli": "^0.1.0-pre.4", "cli-select-2": "^2.0.0", @@ -21421,8 +21302,7 @@ "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" }, "@tableland/sdk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@tableland/sdk/-/sdk-7.0.0.tgz", + "version": "https://registry.npmjs.org/@tableland/sdk/-/sdk-7.0.0.tgz", "integrity": "sha512-+eOa4fV9EAYI7dmpg0gkT7ltcpcB1RgW2j9MFYK1VlhxGlQsgS1R6RbHJqCgy4FFAcdnce58PHcPG/hQVv3B8w==", "requires": { "@async-generators/from-emitter": "^0.3.0", @@ -21595,9 +21475,9 @@ } }, "@tableland/evm": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@tableland/evm/-/evm-6.1.1.tgz", - "integrity": "sha512-6fQLM2YFTlFLIDgzvEITIqNpQoxyaD70l6KFBQEteU/wDy2bAz0d/N618H1U5faaG9cfOwyvDAYnmh3gyZdTEw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@tableland/evm/-/evm-6.2.0.tgz", + "integrity": "sha512-5lazGjkiggwQ4GjBgEoI/v3IG5uM4H6b9bcKoJ37mRySEaQtFKUMhrvK7juNUyLipc1XMrhMBbh0xSH6bUAbhA==", "requires": { "@openzeppelin/contracts": "4.9.6", "ethers": "^6.12.0" @@ -21673,17 +21553,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" }, - "@tableland/sdk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@tableland/sdk/-/sdk-7.0.0.tgz", - "integrity": "sha512-+eOa4fV9EAYI7dmpg0gkT7ltcpcB1RgW2j9MFYK1VlhxGlQsgS1R6RbHJqCgy4FFAcdnce58PHcPG/hQVv3B8w==", - "requires": { - "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.0", - "@tableland/sqlparser": "^1.3.0", - "ethers": "^6.12.0" - } - }, "@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", @@ -21754,79 +21623,13 @@ "requires": { "@tableland/sdk": "^7.0.0", "tempy": "^3.1.0" - }, - "dependencies": { - "@adraffy/ens-normalize": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", - "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", - "dev": true - }, - "@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "dev": true - }, - "@tableland/sdk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@tableland/sdk/-/sdk-7.0.0.tgz", - "integrity": "sha512-+eOa4fV9EAYI7dmpg0gkT7ltcpcB1RgW2j9MFYK1VlhxGlQsgS1R6RbHJqCgy4FFAcdnce58PHcPG/hQVv3B8w==", - "dev": true, - "requires": { - "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.0", - "@tableland/sqlparser": "^1.3.0", - "ethers": "^6.12.0" - } - }, - "@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", - "dev": true - }, - "aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", - "dev": true - }, - "ethers": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.12.1.tgz", - "integrity": "sha512-j6wcVoZf06nqEcBbDWkKg8Fp895SS96dSnTCjiXT+8vt2o02raTn4Lo9ERUuIVU5bAjoPYeA+7ytQFexFmLuVw==", - "dev": true, - "requires": { - "@adraffy/ens-normalize": "1.10.1", - "@noble/curves": "1.2.0", - "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", - "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" - } - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "dev": true, - "requires": {} - } } }, "@tableland/sdk": { "version": "file:packages/sdk", "requires": { "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.1", + "@tableland/evm": "^6.2.0", "@tableland/sqlparser": "^1.3.0", "ethers": "^6.12.1" }, diff --git a/packages/cli/package.json b/packages/cli/package.json index 00d65ece..2eced1e1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@tableland/cli", - "version": "7.0.0", + "version": "7.1.0", "description": "Tableland command line tools", "repository": { "type": "git", @@ -49,7 +49,7 @@ "license": "MIT AND Apache-2.0", "dependencies": { "@tableland/node-helpers": "^1.0.0", - "@tableland/sdk": "^7.0.0", + "@tableland/sdk": "^7.1.0", "@tableland/sqlparser": "^1.3.0", "@tableland/studio-cli": "^0.1.0-pre.4", "cli-select-2": "^2.0.0", diff --git a/packages/cli/src/utils.ts b/packages/cli/src/utils.ts index 7964343a..dd35dcd1 100644 --- a/packages/cli/src/utils.ts +++ b/packages/cli/src/utils.ts @@ -61,6 +61,8 @@ export function getLink(chain: helpers.ChainName, hash: string): string { return `https://nova.arbiscan.io/tx/${hash}`; } return `https://arbiscan.io/tx/${hash}`; + } else if (chain.includes("base")) { + return `https://sepolia.basescan.org/tx/${hash}`; } else if (chain.includes("filecoin")) { if (chain.includes("calibration")) { return `https://calibration.filfox.info/tx/${hash}`; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index f7407716..4dd1b34b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@tableland/sdk", - "version": "7.0.1", + "version": "7.1.0", "description": "A database client and helpers for the Tableland network", "repository": { "type": "git", @@ -82,7 +82,7 @@ "license": "MIT AND Apache-2.0", "dependencies": { "@async-generators/from-emitter": "^0.3.0", - "@tableland/evm": "^6.1.1", + "@tableland/evm": "^6.2.0", "@tableland/sqlparser": "^1.3.0", "ethers": "^6.12.1" } diff --git a/packages/sdk/src/helpers/chains.ts b/packages/sdk/src/helpers/chains.ts index 2c8ed10e..8afb411e 100644 --- a/packages/sdk/src/helpers/chains.ts +++ b/packages/sdk/src/helpers/chains.ts @@ -152,7 +152,7 @@ export function getChainPollingController( * Override the internal list of registry addresses and validator urls that will be used for Contract calls and read queries * @param chainNameOrId Either the chain name or chainId. For a list of chain names see the evm-tableland networks file * @param values The values you would like to use to override the defaults. - * Example: {contractAddress: "0x000deadbeef", baseUrl: "https://my.validator.mydomain.tld"} + * Example: `{contractAddress: "0x000deadbeef", baseUrl: "https://my.validator.mydomain.tld"}` * @returns void */ // TODO: It seems important to add this to the docs somewhere since it's the key diff --git a/packages/sdk/src/helpers/ethers.ts b/packages/sdk/src/helpers/ethers.ts index 48b4c3a0..6469faaf 100644 --- a/packages/sdk/src/helpers/ethers.ts +++ b/packages/sdk/src/helpers/ethers.ts @@ -115,8 +115,13 @@ export function isPolygon(chainId: number | bigint): boolean { */ export function chainCanGetFeeData(chainId: number | bigint): boolean { const chainIdNumber = typeof chainId === "bigint" ? Number(chainId) : chainId; - // Optimism Sepolia and Filecoin Calibration will log an RPC error - return !(chainIdNumber === 11155420 || chainIdNumber === 314159); + // Optimism Sepolia, Base Sepolia, and Filecoin Calibration will log an RPC + // error when calling `getFeeData` because they don't support the method. + return !( + chainIdNumber === 11155420 || + chainIdNumber === 84532 || + chainIdNumber === 314159 + ); } /** diff --git a/packages/sdk/src/validator/client/validator.ts b/packages/sdk/src/validator/client/validator.ts index 8e46f111..772195ec 100644 --- a/packages/sdk/src/validator/client/validator.ts +++ b/packages/sdk/src/validator/client/validator.ts @@ -154,6 +154,16 @@ export interface components { * @example select * from healthbot_80002_1 */ readonly statement?: string; + /** + * @description The values of query parameters + * @example [ + * 1, + * "hello", + * null, + * true + * ] + */ + readonly params?: readonly (string | number | boolean)[]; /** * @description The requested response format: * `objects` - Returns the query results as a JSON array of JSON objects. * `table` - Return the query results as a JSON object with columns and rows properties. * diff --git a/packages/sdk/test/chains.test.ts b/packages/sdk/test/chains.test.ts index 3c480163..08a2b4b5 100644 --- a/packages/sdk/test/chains.test.ts +++ b/packages/sdk/test/chains.test.ts @@ -52,6 +52,7 @@ describe("chains", function () { "arbitrum-sepolia", "polygon-amoy", "optimism-sepolia", + "base-sepolia", "local-tableland", "localhost", ]; @@ -94,6 +95,7 @@ describe("chains", function () { strictEqual(getChainId("polygon-amoy"), 80002); strictEqual(getChainId("optimism-sepolia"), 11155420); strictEqual(getChainId("arbitrum-sepolia"), 421614); + strictEqual(getChainId("base-sepolia"), 84532); strictEqual(getChainId("filecoin-calibration"), 314159); // Local strictEqual(getChainId("localhost"), 31337);