Skip to content

A huff implementation of a contract that calls the sunrise function on the beanstalk protocol.

License

Notifications You must be signed in to change notification settings

nickkatsios/huff-sunrise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

huff-sunrise • ci license solidity

A Huff contract that calls the sunrise function on the Beanstalk Protocol, written in low level evm assembly.

Getting Started

Requirements

The following will need to be installed in order to build this project:

  • Git
    • You'll know you've done it right if you can run git --version
  • Foundry / Foundryup
    • This will install forge, cast, and anvil
    • You can test you've installed them right by running forge --version and get an output like: forge 0.2.0 (92f8951 2022-08-06T00:09:32.96582Z)
    • To get the latest of each, just run foundryup
  • Huff Compiler
    • You'll know you've done it right if you can run huffc --version and get an output like: huffc 0.3.0

Quickstart

  1. Clone this repo
git clone https://github.com/nickkatsios/huff-sunrise.git
cd huff-sunrise
  1. Install dependencies

Once you've cloned and entered into your repository, you need to install the necessary dependencies. In order to do so, simply run:

forge install
  1. Export the RPC urls
export RPC_ARBITRUM=<YOUR-ARB-RPC>
export RPC_MAINNET=<YOUR-ETH-MAINNET-RPC>
  1. Build & Test

To build and test your contracts, you can run:

forge build
forge test

For more information on how to use Foundry, check out the Foundry Github Repository and the foundry-huff library repository.

Blueprint

lib
├─ forge-std — https://github.com/foundry-rs/forge-std
├─ foundry-huff — https://github.com/huff-language/foundry-huff
scripts
├─ Deploy.s.sol — Deployment Script to deploy the Huff Sunrise contract
src
├─ Sunrise.sol — A solidity contract to call the sunrise function with identical logic to the huff contract
└─ Sunrise.huff — A huff contract to call the sunrise function
test
└─ Sunrise.t.solA test script to test the Sunrise contracts in forks of ETH mainnet and Arbitrum

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.

About

A huff implementation of a contract that calls the sunrise function on the beanstalk protocol.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published