Skip to content

A starter template for writing your own custom allocation strategy

License

Notifications You must be signed in to change notification settings

allo-protocol/strategy-starter

Repository files navigation

Strategy Starter Kit

A starter template for building allocation strategies on Allo Protocol.

Usage

Building & Testing

Build the foundry project with forge build. Then you can run tests with 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).

I'm new, how do I get started?

We created a guide to get you started with: GETTING_STARTED.md.

Blueprint

.
├── lib
│   ├── allo-v2
│   ├── forge-std
│   ├── openzeppelin-contracts
│   └── solmate
├── script
│   └── Deploy.s.sol
├── src
│   └── Strategy.sol
└── test
    └── Strategy.t.sol

About this Starter Template

This template is a fork of femplate that has been modified to suite building allocation strategies for Allo Protocol. It uses foundry and comes with allo-v2, solmate, and openzeppelin pre-installed.

The strategy you write should go in src/Strategy.sol. We've set up basic testing infrastructure for you in test/.

If you're looking for examples of how to build and/or test a strategy, check out the strategy library

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.

See LICENSE for more details.

About

A starter template for writing your own custom allocation strategy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published