Skip to content

kalidao/rage-router

Repository files navigation

🔥Rage Router⚡ • ci license solidity

A common router contract for performing moloch-style redemption of all tokens (ERC20/721/1155).

Blueprint

lib
├─ forge-std — https://github.com/foundry-rs/forge-std
├─ solbase — https://github.com/Sol-DAO/solbase
scripts
├─ Deploy.s.sol — Simple Deployment Script
src
├─ RageRouterFair share redemptions for treasury token (ERC20/721/1155) burns
test
└─ RageRouter.t — Exhaustive Tests

Development

Setup

forge install

Building

forge build

Testing

forge test

Deployment & Verification

Inside the utils/ directory are a few preconfigured scripts that can be used to deploy and verify contracts.

Scripts take inputs from the cli, using silent mode to hide any sensitive information.

NOTE: These scripts are required to be executable meaning they must be made executable by running chmod +x ./utils/*.

NOTE: these scripts will prompt you for the contract name and deployed addresses (when verifying). Also, they use the -i flag on forge to ask for your private key for deployment. This uses silent mode which keeps your private key from being printed to the console (and visible in logs).

First time with Forge/Foundry?

See the official Foundry installation instructions.

Then, install the foundry toolchain installer (foundryup) with:

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

Now that you've installed the foundryup binary, anytime you need to get the latest forge or cast binaries, you can run foundryup.

So, simply execute:

foundryup

🎉 Foundry is installed! 🎉

Writing Tests with Foundry

With Foundry, all tests are written in Solidity! 🥳

Create a test file for your contract in the test/ directory.

Configure Foundry

Using foundry.toml, Foundry is easily configurable.

For a full list of configuration options, see the Foundry configuration documentation.

License

MIT

Acknowledgements

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.

Releases

No releases published

Packages

No packages published