1.0.20 • Published 11 months ago
@delvtech/hyperdrive-artifacts v1.0.20
@delvtech/hyperdrive-artifacts
Build artifacts, including ABIs and Bytecodes, for the Hyperdrive AMM contracts.
Install
npm i @delvtech/hyperdrive-artifactsUsage
Each contract has a corresponding export path located at
@delvtech/hyperdrive-artifacts/ContractName which includes an export named
after the contract with the its ABI and bytecode.
import { IHyperdrive } from "@delvtech/hyperdrive-artifacts/IHyperdrive";
const hyperdriveAbi = IHyperdrive.abi;
const hyperdriveBytecode = IHyperdrive.bytecode;Building
The build script takes the git ref to clone and compile as the first positional
argument. This means you can change the version of the contract to generate
artifacts for in the package.json:
"build:src": "sh scripts/build_src.sh v0.9.0"Then run:
yarn workspace @delvtech/hyperdrive-artifacts build:srcIf the src directory already exists from a previous build, you can force a new
build by running:
yarn workspace @delvtech/hyperdrive-artifacts build:new