Application Binary Interfaces

The ABI is an interface between two program modules, one of which is the smart contract and the other the machine code.‌

Depending on what web3 library you're using, you may need to get hold of the contract ABIs (Application Binary Interfaces). There are two ways to obtain them.

1. Install Node Package

We provide a node package called @hifi/protocol that contains the ABIs for the contracts deployed on mainnet:

Pro tip: use unpkg.com to browse the contents of the package before installing it.

2. Clone the Repo

Alternatively, you can clone our GitHub repository and compile the contracts yourself. The git commit that we used to deploy the contracts is b06eda9, which is also tagged as v1.0.0.

$ git clone [email protected]:hifi-finance/hifi-protocol.git
$ cd ./hifi-protocol
$ git checkout v1.0.0
$ yarn install
$ yarn compile

You should find the artifacts in the newly created artifacts/contracts folder.