Skip to content

Latest commit

 

History

History

hyperdrive-artifacts

@delvtech/hyperdrive-artifacts

Strongly typed build artifacts, including ABIs and Bytecodes, for the Hyperdrive AMM contracts.

Install

npm i @delvtech/hyperdrive-artifacts

Usage

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;

Generating TypeScript Files

The generate 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:

  "generate": "sh scripts/generate.sh v1.0.20"

Then run:

yarn workspace @delvtech/hyperdrive-artifacts generate