This repository contains an up-to-date registry of all addresses of the Goat Protocol's smart contracts, for its usage in Solidity codebases.
With Foundry installed and being in a Git repository:
forge install goatfi/goat-address-book
Import core protocol addresses from a certain network:
import { ProtocolArbitrum } from "goat-address-book/ProtocolArbitrum.sol";
npm i @goatfi/goat-address-book
import * as pools from "@goatfi/goat-address-book";
import { ProtocolArbitrum } from "@goatfi/goat-address-book";
// all variables available on solidity version are available in javascript as well
console.log(ProtocolArbitrum.TREASURY);
Other repositories like our api or DefiLlama Adapters, read the vault registry to build data. The vault registry must be up to date with the vaults on the app.
New package releases will happen when new protocol addresses or chain assets are added. New vaults added to the address-book won't trigger a new relase, but they will be added to the next version.
While there is a index import available in "GoatAddressBook.sol", we only recommend using it in tests.
Foundry currently does not eliminate unused code for verification.
This results in rather gigantic verifications when using the index file import from GoatAddressBook.sol.
For production code we therefore recommend to use specific libraries exported from goat-address-book
like ProtocolArbitrum
for the protocol addresses on Arbitrum.
This repository was heavily inspired by @bgd-lads's Aave Address Book repository.