GitXplorerGitXplorer
i

contract-book

public
4 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
2b71db68f340a623d7e7094f16f330d5b1c36aa7

compiled happy

iiFrostizz committed 2 years ago
Unverified
05e58fd00b095a33ceecaa6aa59c96f9e0382452

add new api

iiFrostizz committed 2 years ago
Verified
9fb042e65a681e1a36cd34f0c98fddfd6572152d

Update README.md

iiFrostizz committed 2 years ago
Unverified
817ad3dec5f57d87199a2d6bc9fe9bc8c0c8c782

todo

iiFrostizz committed 2 years ago
Unverified
cb622dd656e66a55f1d4a7ea59111ec5bc16fbb2

parse address

iiFrostizz committed 2 years ago
Unverified
c582a764dc26e9c74087ca2b23cb4f015590746b

formatting & clipping

iiFrostizz committed 2 years ago

README

The README file for this repository.

This is my improvement of the ethers-rs address book

This crate is a global database that can be used to store common addresses and ABIs for each chain.

Download

foo@bar:~$ cargo install --git https://github.com/iFrostizz/contract-book.git
foo@bar:~$ cbook --help

Usage

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

Info

db.json structure:

{
  "name": {
    "abi": [
	{
	    "constant": true,
	    "inputs": []
	}
    ],
    "address": {
      "chain": "0x..."
    }
  }
}

Code style

cargo clippy cargo +nightl fmt

TODO

  • [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 ;))