@goatfi/goat-address-book
v1.1.11
Published
This repository contains an up-to-date registry of all addresses of the Goat Protcol's smart contracts, for its usage in Solidity codebases.
Readme
Goat Address Book 📒
This repository contains an up-to-date registry of all addresses of the Goat Protocol's smart contracts, for its usage in Solidity codebases.
Usage with foundry
With Foundry installed and being in a Git repository:
forge install goatfi/goat-address-bookImport core protocol addresses from a certain network:
import { ProtocolArbitrum } from "goat-address-book/ProtocolArbitrum.sol";Usage with node
Install
npm i @goatfi/goat-address-bookUsage
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);Vault Registry
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.
Releases
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.
Production Recommendations
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.
Credits
This repository was heavily inspired by @bgd-lads's Aave Address Book repository.
