Ethereum Standard Library
A standard contract library for Ethereum.
Use
All contracts contained in the library have two forms:
- Full Solidity contract code, in
./contracts
; and, - Abstract "header" files, which only include function signatures.
Depending on your project you'll need to use both. Import the full Solidity code into your contract when you need to extend one of the Standard Library classes or you need to put a new instance of that class on the blockchain; import the contract header file when you only need to make calls on an Standard Library class that already exists on the blockchain.
Contributing
Contributing classes to the Standard Library is easy.
- Write your contract you'd like to include.
- Drop that contract into the
./contracts
directory. - Compile the contract with
truffle compile
. Get Truffle. - Run
./make_headers.es6
to remake all the header files automatically, which includes a header file for the contract you just added. - Add tests for your contract in
./test
- Make sure the tests pass with
truffle test
- Submit a pull request with your new changes!