A simple ownable contract that allows for on-chain keeping of "bonds," denominated in Ether. The usage of bonds is not specific, but, for example, can be used to whitelist wallets to interact with dApps (e.g., LayerZero Sybil Reporting).
- Git - Install Git
- Check if you have Git installed with
git --version
- Check if you have Git installed with
- Foundry - Install Foundry
- Check if you have Foundry installed with
forge --version
- Check if you have Foundry installed with
- Python - Install Python (see pyenv)
- Check if you have Python installed with
python --version - Required for Slither
- Check if you have Python installed with
- Slither - Install Slither (preferably with pipx)
- Check if you have Slither installed with
slither --version
- Check if you have Slither installed with
- Rust - Install Rust
- Check if you have Rust installed with
rustc --version - Required for Aderyn
- Check if you have Rust installed with
- Aderyn - Install Aderyn
- Check if you have Aderyn installed with
aderyn --version
- Check if you have Aderyn installed with
- 4naly3er - Install 4naly3er
- This is an external tool, ensure to export a scope file,
make scopefile, before use
- This is an external tool, ensure to export a scope file,
- Act - Install Act
- Check if you have Act installed with
act --version - Refer to this project's Makefile (
sudo-act) for usage
- Check if you have Act installed with
- Markdownlint - Install Markdownlint
git clone https://github.com/vile/eth-bonds.git
cd eth-bonds
makemake test
make test-ext # Includes coverage report, slither, & aderynRun individual tests with:
forge test --mt test_name -vvvvvEnsure you have your intended deployment wallet imported as a keystore for Foundry.
If not, create a new wallet using cast, and import it as a keystore.
cast wallet list
cast wallet new
cast wallet import [your_new_wallet]
cast wallet address --account [your_new_wallet]Then, input your keystore name and wallet address in .env.
In addition to this, include your RPC URL and Etherscan API key.
mv .env.example .envFuthermore in .env, include deployment parameters.
If you are unsure what the deployment parameters mean (or intend to do), refer to the .env comments and the NatSpec of Bond's constructor.
Finally, push a live deployment (or dryrun):
make script-deploy-live # OR
make script-deploy-dry