Skip to content

An escrow contract that allows for the conversion of one token to a stream of another token applying fixed conversion terms

License

Notifications You must be signed in to change notification settings

BarnBridge/token-conversion

 
 

Repository files navigation

Token Conversion 💱

Contract implements the terms of the FDT -> BOND conversion as outlined here and ratified in a BarnBridge governance vote.

Warning ⚠️

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.

Installation

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.

Install Foundry

curl -L https://foundry.paradigm.xyz | bash
foundryup

Set .env

Copy and update contents from .env.example to .env

Tests

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.

Building and testing

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.

Deployment

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.

About

An escrow contract that allows for the conversion of one token to a stream of another token applying fixed conversion terms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 94.8%
  • Makefile 3.0%
  • Shell 2.2%