Skip to content

Commit

Permalink
Merge pull request #147 from tablelandnetwork/dtb/add-base
Browse files Browse the repository at this point in the history
feat(sdk|cli): add Base Sepolia
  • Loading branch information
dtbuchholz authored Jun 4, 2024
2 parents f9f56a3 + 0c64b47 commit 1b2fc1d
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 217 deletions.
223 changes: 13 additions & 210 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tableland/cli",
"version": "7.0.0",
"version": "7.1.0",
"description": "Tableland command line tools",
"repository": {
"type": "git",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/helpers/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions packages/sdk/src/helpers/ethers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

/**
Expand Down
10 changes: 10 additions & 0 deletions packages/sdk/src/validator/client/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Loading

0 comments on commit 1b2fc1d

Please sign in to comment.