Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
/ llama-periphery Public archive

πŸ¦™ Peripheral smart contracts for operating Llama instances πŸ¦™

License

Notifications You must be signed in to change notification settings

llamaxyz/llama-periphery

Repository files navigation

Llama

CI License: MIT

Llama Periphery

Llama is an onchain governance and access control framework for smart contracts. This repository contains supporting modules for operating Llama instances. For the core contracts, see the Llama repository.

Modules

  • Token Voting: smart contract policies that allow ERC20Votes or ERC721Votes tokenholders to create actions enforced by delegated token thresholds or collectively approve or disapprove an action through token voting.

Prerequisites

Foundry must be installed. You can find installation instructions in the Foundry docs.

We use just to save and run a few larger, more complex commands. You can find installation instructions in the just docs. All commands can be listed by running just -l from the repo root, or by viewing the justfile.

VS Code

You can get Solidity support for Visual Studio Code by installing the Hardhat Solidity extension.

Installation

$ git clone https://github.com/llamaxyz/llama-periphery.git
$ cd llama
$ forge install

Setup

Copy .env.example and rename it to .env. The comments in that file explain what each variable is for and when they're needed:

  • The MAINNET_RPC_URL variable is the only one that is required for running tests.
  • You may also want a mainnet ETHERSCAN_API_KEY for better traces when running fork tests.
  • The rest are only needed for deployment verification with forge scripts. An anvil default private key is provided in the .env.example file to facilitate testing.

Commands

  • forge build - build the project
  • forge test - run tests

Deploy and Verify

  • just deploy - deploy and verify payload on mainnet
  • Run just -l or see the justfile for other commands such as dry runs.

Smart contract reference

Run the following command to generate smart contract reference documentation from our NatSpec comments and serve those static files locally:

$ forge doc -o reference/ -b -s

Bug bounty program

This repository is subject to the Llama bug bounty program. Details can be found here.

Slither

Use our bash script to prevent slither from analyzing the test and script directories.

$ chmod +x slither.sh
$ ./slither.sh

About

πŸ¦™ Peripheral smart contracts for operating Llama instances πŸ¦™

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages