@boostxyz/cli
A command line interface simplifying Boost protocol deployment, and Boost creation.
Features
- Deploy Boost Protocol and register all valid base implementations
- Deploy and fund basic ERC20's to use with Boost budgets and incentives
- Generate Boost creation templates
- Create Boosts given JSON templates, with option to automatically mint and allocate funds to new or existing budgets
- Configurable, supports any Viem chain
- Secure, keys do not leave your machine
Installation
Via Package Manager
npm install -g @boostxyz/cli
npx boost --help
Manual Installation
git clone https://github.com/boostxyz/boost-protocol.git
cd boost-protocol
pnpm install
turbo build --filter="./packages/cli"
npx boost seed generate
Usage
Basic usage pattern:
boost --help
boost deploy --privateKey="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" --chain="hardhat"
boost seed generate --privateKey="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" --chain="hardhat"
boost seed PATH/TO/seed.json PATH/TO/another.json --privateKey="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" --chain="hardhat"
boost seed erc20 --privateKey="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" --chain="hardhat"
Options
Seeding
Here is an example seed template.
Tips
- By default the owner, will be
test...junk
's 0 account unless --privateKey
or --mnemonic
is provided. - For
action
signatures
, While you generally need to manually supply the byte selector, you have the option of supplying a plain english signature, which will be converted into the bytes selector for you when passed into the seed
command. - If you supply a
"shouldMintAndAllocate": true
to an ERC20 incentive, the seed command will automatically call mint
on the referenced asset with the total amount required to allocate and fund the Boosts's budget, so make sure the privateKey
or mnemonic
option is correctly supplied to make this call.
{
"protocolFee": 0,
"maxParticipants": 10,
"budget": {
"type": "ManagedBudget",
"owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"authorized": [
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
],
"roles": [
1
]
},
"action": {
"type": "EventAction",
"actionClaimant": {
"signatureType": 1,
"signature": "function mint(address to, uint256 amount)",
"fieldIndex": 0,
"targetContract": "0x0000000000000000000000000000000000000000",
"chainid": 31337
},
"actionSteps": [
{
"signature": "event Minted(address to, uint256 amount)",
"signatureType": 1,
"actionType": 0,
"targetContract": "0x0000000000000000000000000000000000000000",
"chainid": 31337,
"actionParameter": {
"filterType": 0,
"fieldType": 1,
"fieldIndex": 0,
"filterData": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
}
}
]
},
"validator": {
"type": "SignerValidator",
"signers": [
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
],
"validatorCaller": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
},
"allowList": {
"type": "SimpleDenyList",
"owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"denied": []
},
"incentives": [
{
"type": "ERC20Incentive",
"asset": "0xf3B2d0E4f2d8F453DBCc278b10e88b20d7f19f8D",
"shouldMintAndAllocate": true,
"strategy": 0,
"reward": 1,
"limit": 1,
"manager": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
}
]
}
Contributing
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
Development Setup
git clone https://github.com/boostxyz/boost-protocol.git
cd boost-protocol
pnpm install