This crate is a global database that can be used to store common addresses and ABIs for each chain.
foo@bar:~$ cargo install --git https://github.com/iFrostizz/contract-book.git
foo@bar:~$ cbook --help
foo@bar:~$ cbook --name WETH9 --address 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 --abi '[{"constant":true,"inputs":[], ...}]' --chain mainnet
I wrote a foundry library to retrieve data in tests: https://github.com/iFrostizz/sbook
db.json structure:
{
"name": {
"abi": [
{
"constant": true,
"inputs": []
}
],
"address": {
"chain": "0x..."
}
}
}
cargo clippy
cargo +nightl fmt
- [x] Finish the contract-book implementation
- [ ] Write a foundry library that uses
ffi
(in progress) - [ ] Provide an API to find elements easily (in progress see
get
) - [ ] Let store local instances of cbook for solidity testing
- [ ] Allow database migrations
- [ ] Write tests (or not ;))