Contract implements the terms of the FDT -> BOND conversion as outlined here and ratified in a BarnBridge governance vote.
This contract is only safe to use for converting FDT to BOND tokens. Using this contract with other tokens may result in the loss of funds.
This repository uses Foundry for building and testing and Solhint for formatting the contracts. If you do not have Foundry already installed, you'll need to run the commands below.
curl -L https://foundry.paradigm.xyz | bash
foundryup
Copy and update contents from .env.example
to .env
After installing dependencies with make
, run make test
to run the tests.
Note that tests run on forked mainnet state so make sure the RPC endpoint is properly configured in the .env
file.
git clone https://github.com/ultrasound-labs/token-conversion.git
cd token-conversion
make # This installs the project's dependencies.
make test # This runs forked mainnet tests.
After building and testing you can deploy the contract with the following command
make deploy
This runs the ./scripts/deploy.sh
script. Make sure to define your environment variables in the .env
file first.