Skip to content

gnosisguild/eip712-signer

Repository files navigation

Eip712Signer 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

Todo

The integrity checks implemented in the Roles Modifier contract require all branches of logical expressions to have identical type trees. Due to this limitation any role can only scope EIP-712 messages of a single structure.

A potential workaround for this could be adding a fallback() function to the Eip712Signer contract so we can use a dedicated selector for signing each message type.

Audits

⚠️ This project is unaudited.

Security and Liability

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

Deployments

Address: 0x

(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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published