Coder Social home page Coder Social logo

sam-goldman / llama-periphery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from llamaxyz/llama-periphery

0.0 0.0 0.0 5.04 MB

๐Ÿฆ™ Peripheral smart contracts for operating Llama instances ๐Ÿฆ™

License: MIT License

Shell 0.06% Solidity 99.52% Just 0.42%

llama-periphery's Introduction

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

Llama modules are extensions to Llama instances that can be adopted by using a Llama action to configure and deploy.

  • Token Voting: smart contract policies that allow voting token holders 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.

Deployments

Name Ethereum Optimism Arbitrum Base Polygon
Factory
LlamaTokenVotingFactory 0xFBE17545dffD75A92A5A72926AE581478973FE65 0xFBE17545dffD75A92A5A72926AE581478973FE65 0xFBE17545dffD75A92A5A72926AE581478973FE65 0xFBE17545dffD75A92A5A72926AE581478973FE65 0xFBE17545dffD75A92A5A72926AE581478973FE65
Governor
LlamaTokenGovernor (logic contract) 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A
Token Adapters
LlamaTokenAdapterVotesTimestamp (logic contract) 0x088C268cb00226D6A9b29e5488905Aa94D2f0239 0x088C268cb00226D6A9b29e5488905Aa94D2f0239 0x088C268cb00226D6A9b29e5488905Aa94D2f0239 0x088C268cb00226D6A9b29e5488905Aa94D2f0239 0x088C268cb00226D6A9b29e5488905Aa94D2f0239

Testnet deployments

Name Sepolia Goerli Optimism Goerli Base Goerli
Factory
LlamaTokenVotingFactory 0xFBE17545dffD75A92A5A72926AE581478973FE65 0xFBE17545dffD75A92A5A72926AE581478973FE65 0xFBE17545dffD75A92A5A72926AE581478973FE65 0xFBE17545dffD75A92A5A72926AE581478973FE65
Governor
LlamaTokenGovernor (logic contract) 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A 0x3f3DAB3ab8cEc2FBd06767c2A5F66Cb6BFF21A4A
Token Adapters
LlamaTokenAdapterVotesTimestamp (logic contract) 0x088C268cb00226D6A9b29e5488905Aa94D2f0239 0x088C268cb00226D6A9b29e5488905Aa94D2f0239 0x088C268cb00226D6A9b29e5488905Aa94D2f0239 0x088C268cb00226D6A9b29e5488905Aa94D2f0239

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

Security

Audit

We received an audit from Spearbit. You can find the link to the report below:

Bug bounty program

This repository is subject to the Llama bug bounty program.

Slither

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

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

llama-periphery's People

Contributors

austingreen avatar dd0sxx avatar 0xrajath avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.