Creates a bridge of SNT into Optimism
Go to file
Ricardo Guilherme Schmidt c597216905
Merge bf5a2c572c into dc28b89d6a
2023-11-02 08:27:13 -06:00
.github refactor: move to foundry template 2023-09-26 16:58:36 +02:00
.vscode refactor: move to foundry template 2023-09-26 16:58:36 +02:00
contracts Improve claimTokens 2023-10-06 12:59:54 -03:00
lib chore(deps): update minime dependency (#14) 2023-10-06 08:26:32 +02:00
script fix(DeplopyBridge): change token symbol so it matches L1 token symbol (#27) 2023-11-02 11:26:59 +01:00
scripts ran prettier 2023-10-06 13:52:40 -03:00
test Improve coverage 2023-10-06 13:39:34 -03:00
.editorconfig refactor: move to foundry template 2023-09-26 16:58:36 +02:00
.env.example refactor: move to foundry template 2023-09-26 16:58:36 +02:00
.gas-snapshot Improve coverage 2023-10-06 13:39:34 -03:00
.gitattributes refactor: move to foundry template 2023-09-26 16:58:36 +02:00
.gitignore refactor: move to foundry template 2023-09-26 16:58:36 +02:00
.gitmodules refactor: move to foundry template 2023-09-26 16:58:36 +02:00
.prettierignore chore: prettier ignore `contracts.json` 2023-10-05 12:37:16 +02:00
.prettierrc.yml refactor: move to foundry template 2023-09-26 16:58:36 +02:00
.solhint.json refactor: move to foundry template 2023-09-26 16:58:36 +02:00
PROPERTIES.md refactor: move to foundry template 2023-09-26 16:58:36 +02:00
README.md Merge bf5a2c572c into dc28b89d6a 2023-11-02 08:27:13 -06:00
codecov.yml refactor: move to foundry template 2023-09-26 16:58:36 +02:00
contracts.json chore: prettier ignore `contracts.json` 2023-10-05 12:37:16 +02:00
foundry.toml chore(foundry.toml): comment out unused etherscan and rpcs (#25) 2023-10-30 15:31:07 +01:00
index.js ran prettier 2023-10-06 13:52:40 -03:00
package.json refactor: move to foundry template 2023-09-26 16:58:36 +02:00
pnpm-lock.yaml refactor: move to foundry template 2023-09-26 16:58:36 +02:00
remappings.txt refactor: move to foundry template 2023-09-26 16:58:36 +02:00
slither.config.json refactor: move to foundry template 2023-09-26 16:58:36 +02:00

README.md

codecov

Bridging SNT with the Optimism SDK

This repository contains code to deploy SNT in Ethereum and bridge it to optimism.

Deployments

Contract Address Snapshot
Optimism Mainnet
OptimismMintableMiniMeToken 0x650AF3C15AF43dcB218406d30784416D64Cfb6B2 1b3159a
SNTOptimismController 0x76352764590378011CAE677b50110Ae02eDE2b62 1b3159a

Scripts:

$ MNEMONIC=$YOUR_MNEMONIC forge script script/DeployBridge.s.sol --fork-url $YOUR_RPC_URL --broadcast

Where

  • $YOUR_MNEMONIC is the mnemonic that contains the account from which you want to deploy. The deploy script will use the first account derived from the mnemonic by default.
  • $YOUR_RPC_URL is the RPC endpoint of the node you're connecting to.

You can omit the --broadcast option to simulate the deployment before actually performing it.

All tokens, even on Optimism, are MiniMeToken variant, meaning they save all account's balance change on Ethereum state for democracy contract ballots. Learn more about MiniMeToken on the official repository vacpp2p/minime.

Differences from regular MiniMeToken

The MiniMeToken used in this repository is a fork of the original. To learn about the differences between the fork and the upstream repository, head over to its documentation.

  1. MiniMeToken uses generateTokens and destroyTokens operated by controller for mint and burn. OptimismMintableMiniMeToken uses mint and burn operated by bridge.
  2. MiniMeToken version() had to be renamed to token_version() due a conflict on inheritance and requirements of Optimism. Semver inheritance uses version() and this seems a requirement for Optimism.