GitXplorerGitXplorer
i

contract-book

public
4 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
300f96a7b328aea9b6ada3fafafedb870024e32e

add get

iiFrostizz committed 2 years ago
Unverified
d2df0de4927ff50459141db95b657f7b5bd393fe

easier install

iiFrostizz committed 2 years ago
Unverified
0d1f5fde262317670e7a04f50f098b2e007765ef

fat fingers

iiFrostizz committed 2 years ago
Unverified
01bf4e814a6028b93f0d5ab17e776c5c1d0dfd7d

usage format

iiFrostizz committed 2 years ago
Unverified
230db0bc08c18431d4e3b7dd0f87780d3cf5eed2

add change directory

iiFrostizz committed 2 years ago
Unverified
3eb3aeea929d9ac224625ef40bdf1806e841dbaa

better console format

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