Giter Club home page Giter Club logo

snapshot-signer's Introduction

SnapshotSigner Open in Gitpod Github Actions Hardhat License: MIT

An adapter contract to plug in front of the Safe SignMessageLib, producing EIP-712 signatures for Snapshot votes

Audits

An audit has been performed by Côme du Crest for Gnosis. No issues have been identified in the audit.

The audit report is available at https://gnosischain.notion.site/Snapshot-Signer-f890f1f3dba74f11bdd1702d17d9e05c.

Security and Liability

All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Deployments

Address: 0xb0382209806345d27dFdAB5Bbc17B2AB553165ac

(forwarding to SignMessageLib at 0xd53cd0aB83D845Ac265BE939c57F53AD838012c9)

Usage

Pre Requisites

First, you need to install the dependencies:

$ bun install

Then, you need to set up all the required env variable. Create a .env file based on .env.example.

Compile

Compile the smart contracts with Hardhat:

$ bun run compile

TypeChain

Compile the smart contracts and generate TypeChain bindings:

$ bun run typechain

Test

Run the tests with Hardhat:

$ bun run test

Lint Solidity

Lint the Solidity code:

$ bun run lint:sol

Lint TypeScript

Lint the TypeScript code:

$ bun run lint:ts

Coverage

Generate the code coverage report:

$ bun run coverage

Report Gas

See the gas usage per unit test and average gas per method call:

$ REPORT_GAS=true bun run test

Clean

Delete the smart contract artifacts, the coverage reports and the Hardhat cache:

$ bun run clean

Deploy

Deploy the contract:

$ bun run deploy <network>

Currently the following values for <network> are supported:

  • hardhat
  • mainnet
  • sepolia
  • gnosis
  • arbitrum

License

This project is licensed under MIT.

snapshot-signer's People

Contributors

jfschwarz avatar

Watchers

samepant avatar Auryn Macmillan avatar

snapshot-signer's Issues

Audit Snapshot-signer

Audit SnapshotSigner.sol

The purpose of this simple contract is to allow one to scope the parameters of a message message to be signed onchain (using an EIP1271 signature) for a snapshot vote. This was not previously possible as Snapshot prompts voters to sign the hash of the data, rather than the data itself.

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.