-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pablo Maldonado <[email protected]>
- Loading branch information
Showing
4 changed files
with
707 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,6 @@ yarn-error.log | |
yarn-debug.log* | ||
gasReporterOutput.json | ||
logs | ||
|
||
# generated clients | ||
clients/js/src/generated/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'", | ||
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir ./dist/esm && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'", | ||
"build:types": "tsc --project tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", | ||
"generate-clients": "yarn ts-node ./scripts/generate-clients.ts", | ||
"test": "hardhat test", | ||
"test:watch": "hardhat watch test", | ||
"test:run:arweave": "npx -y arlocal", | ||
|
@@ -99,17 +100,22 @@ | |
}, | ||
"dependencies": { | ||
"@across-protocol/across-token": "^1.0.0", | ||
"@across-protocol/constants": "^3.1.28", | ||
"@across-protocol/constants": "^3.1.27", | ||
"@across-protocol/contracts": "^3.0.24", | ||
"@codama/nodes-from-anchor": "^1.1.0", | ||
"@codama/renderers-js": "^1.1.1", | ||
"@coral-xyz/borsh": "^0.30.1", | ||
"@eth-optimism/sdk": "^3.3.1", | ||
"@ethersproject/bignumber": "^5.7.0", | ||
"@pinata/sdk": "^2.1.0", | ||
"@solana/web3.js": "2", | ||
"@types/mocha": "^10.0.1", | ||
"@uma/sdk": "^0.34.10", | ||
"arweave": "^1.14.4", | ||
"async": "^3.2.5", | ||
"axios": "^0.27.2", | ||
"big-number": "^2.0.0", | ||
"codama": "^1.2.0", | ||
"decimal.js": "^10.3.1", | ||
"ethers": "^5.7.2", | ||
"lodash": "^4.17.21", | ||
|
@@ -159,4 +165,4 @@ | |
"[email protected]": "4.0.4", | ||
"[email protected]": "5.0.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { createFromRoot } from 'codama'; | ||
import { rootNodeFromAnchor, AnchorIdl } from '@codama/nodes-from-anchor'; | ||
import { renderVisitor as renderJavaScriptVisitor } from "@codama/renderers-js"; | ||
import { SvmSpokeIdl } from "@across-protocol/contracts" | ||
import path from 'path'; | ||
|
||
const codama = createFromRoot(rootNodeFromAnchor(SvmSpokeIdl as AnchorIdl)); | ||
|
||
const jsClient = path.join(__dirname, "..", "clients", "js"); | ||
codama.accept( | ||
renderJavaScriptVisitor(path.join(jsClient, "src", "generated")) | ||
); |
Oops, something went wrong.