Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Rey committed May 29, 2024
1 parent c353274 commit a78d891
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/massa-web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"build-esm": "tsc --project tsconfig.esm.json",
"build-commonjs": "tsc --project tsconfig.commonjs.json",
"build": "npm-run-all clean-dist build-*",
"generate:client": "open-rpc-generator generate -c open_rpc/openrpc.config.json && mv tmp/client/typescript/src/index.ts src/experimental/generated/client.ts && rm -r tmp",
"generate:test": "ts-interface-builder src/experimental/generated/client.ts",
"generate:deployer": "ts-node ./deployer_generation/generate-deployer.ts",
"generate:client": "open-rpc-generator generate -c open_rpc/openrpc.config.json && mv tmp/client/typescript/src/index.ts src/generated/client.ts && rm -r tmp",
"generate:test": "ts-interface-builder src/generated/client.ts",
"generate:deployer": "ts-node src/deployerGeneration/generate-deployer.ts",
"generate": "npm-run-all generate:*",
"test": "jest --detectOpenHandles --forceExit ./test/unit",
"test:cov": "jest --detectOpenHandles --coverage --forceExit",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import path from 'path'
import fs from 'fs'

console.log('Generating deployer bytecode...')
function populateDeployer(src?: string, dst?: string): void {
const wasmPath = src ?? path.join(__dirname, 'deployer.wasm')
const wasmData = fs.readFileSync(wasmPath)

const output = `export const deployer: Uint8Array = new Uint8Array([${[...wasmData]}]);\n`

const outputDir =
dst ?? path.join(__dirname, '../src/generated/deployer-bytecode.ts')
dst ?? path.join(__dirname, '../generated/deployer-bytecode.ts')

fs.writeFileSync(outputDir, output)
}
Expand Down

1 comment on commit a78d891

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report for experimental massa-web3

St.
Category Percentage Covered / Total
🟢 Statements 83.81% 911/1087
🟡 Branches 73.87% 164/222
🟢 Functions 84.21% 176/209
🟢 Lines 83.96% 911/1085

Test suite run success

118 tests passing in 12 suites.

Report generated by 🧪jest coverage report action from a78d891

Please sign in to comment.