Skip to content

feat: create two deployment script#68

Merged
0xChin merged 1 commit into
sc-feat/revshare-setupfrom
feat/create2-deployment-script
Nov 13, 2025
Merged

feat: create two deployment script#68
0xChin merged 1 commit into
sc-feat/revshare-setupfrom
feat/create2-deployment-script

Conversation

@0xDiscotech
Copy link
Copy Markdown

Overview

Using CREATE2 and mimicking the createDeterministic() function logic, but without using vm.getCode() since it fails due to linked libraries.

Deployments

First command deploying:

forge script src/script/DeployRevSharesUpgrader.s.sol:DeployRevSharesUpgrader \         
          --rpc-url https://ethereum-sepolia.rpc.subquery.network/public \
          --broadcast \
          --verify --private-key $PRIVATE_KEY --verifier custom \
          --verifier-url 'https://api.etherscan.io/v2/api?chainid=11155111&apikey={$API_KEY}'
          
          
[⠊] Compiling...
No files changed, compilation skipped
Script ran successfully.

== Return ==
upgrader: contract RevShareContractsUpgrader 0x343312031f639B9e68D7E01535E4c5FAD9c76D42

== Logs ==
  ---
  RevShareContractsUpgrader deployed at: 0x343312031f639B9e68D7E01535E4c5FAD9c76D42
  ---

## Setting up 1 EVM.

==========================

Chain 11155111

Estimated gas price: 0.00100002 gwei

Estimated total gas used for script: 5419966

Estimated amount required: 0.00000542007439932 ETH

==========================

##### sepolia
✅  [Success] Hash: 0x5cdabdcd09f4709d4b71ae9b4e4e9d502ed0c5ae16136ba02f50007ef2c69e6f
Block: 9623515
Paid: 0.00000296351563486 ETH (2963486 gas * 0.00100001 gwei)


##### sepolia
✅  [Success] Hash: 0x5bdb8cc7da80e05e2da0fa050225fe351e88c1796649ff59feaf599fc1bbf541
Block: 9623517
Paid: 0.00000090712307114 ETH (907114 gas * 0.00100001 gwei)

✅ Sequence #1 on sepolia | Total Paid: 0.000003870638706 ETH (3870600 gas * avg 0.00100001 gwei)
                                                                                                                                                                                                                                 

==========================

ONCHAIN EXECUTION COMPLETE & SUCCESSFUL.
##
Start verification for (2) contracts
Start verifying contract `0xDA742Cd6D68f95FccbdCB60dE9f5157fFaE8Fd79` deployed on sepolia
EVM version: cancun
Compiler version: 0.8.15

Submitting verification for [src/libraries/FeeSplitterSetup.sol:FeeSplitterSetup] 0xDA742Cd6D68f95FccbdCB60dE9f5157fFaE8Fd79.
Error: Encountered an error verifying this contract:
Response: `NOTOK`
Details:
`Invalid API Key (#err2)|SEPOLIA-`

Second command after deploying:

forge script src/script/DeployRevSharesUpgrader.s.sol:DeployRevSharesUpgrader \
          --rpc-url https://ethereum-sepolia.rpc.subquery.network/public \
          --broadcast \
          --verify --private-key $PRIVATE_KEY --verifier custom \
          --verifier-url 'https://api.etherscan.io/v2/api?chainid=11155111&apikey={$API_KEY}'
[⠊] Compiling...
No files changed, compilation skipped
Script ran successfully.

== Return ==
upgrader: contract RevShareContractsUpgrader 0x343312031f639B9e68D7E01535E4c5FAD9c76D42

== Logs ==
  ---
  RevShareContractsUpgrader already deployed at: 0x343312031f639B9e68D7E01535E4c5FAD9c76D42
  ---

@0xDiscotech 0xDiscotech requested a review from 0xChin November 13, 2025 20:06
@0xDiscotech 0xDiscotech self-assigned this Nov 13, 2025
@0xChin 0xChin merged commit a2d749d into sc-feat/revshare-setup Nov 13, 2025
1 check passed
@0xChin 0xChin deleted the feat/create2-deployment-script branch November 13, 2025 22:10
0xDiscotech added a commit that referenced this pull request Nov 18, 2025
…ethereum-optimism#1257)

* feat: add Revenue Share Upgrade Path (#8)

* feat: Deploy FeesDepositor (#15)

* feat: late opt-in template (#21)

* refactor: contracts update creationcode (#23)

* fix: sync (#24)

* test: add require tests for fields on Revenue Sharing templates (#26)

* fix: L2 target ProxyAdmin (#27)

* chore: update cost of upgrades and deployments (#29)

* test: revenue sharing upgrade unit tests (#22)

* test: add basic validation for fees depositor template (#32)

* chore: updates the bytecode for vaults, using initialize (#31)

* test: integration supersim revshare (#30)

* fix: broken simulations

* fix: wrong location of synced regression tests

* test: integration revshare late opt in (#33)

* fix: ir fixes (#38)

* chore: gas costs (#39)

* fix: minors (#46)

* fix: remove vm usage for getCreate2Address utils function (#48)

* feat: descope late opt in (#51)

* feat: add rev share upgrader (#53)

* fix: bash on comment

* fix: forge fmt

* refactor: reduce code size by splitting logic between lib and contract (#59)

* refactor: reduce code size by splitting logic between lib and contract

* chore: remove comment

* chore: remove prefix

* refactor: split library (#60)

* refactor: reduce code size by splitting logic between lib and contract

* chore: remove comment

* chore: remove prefix

* refactor: split library in two to avoid code size error

* feat: regression tests (#61)

* fix: relay typo

* fix: improve template validation checks (#62)

* fix: wrong fee splitter bytecode (#63)

* fix: skip comment

* fix: rename test create two deployer

* chore: add commit

* feat: add upgrader deployment script (#64)

* chore: update gas limits

* refactor: use create two to get a deterministic deployment of the upgrader (#68)

* chore: add todos (#66)

* chore: remove tenderly simulations (#65)

* chore: deploy and update new contract (#67)

* fix: forge fmt (#69)

* chore: fuzz init code on get create2 test (#70)

* feat: deploy revshare mainnet (#71)

* fix: forge fmt (#72)

* chore: add todo comments (#73)

* chore: reduce tenderly gas

Co-authored-by: Maurelian <john@oplabs.co>

* fix: reduce tenderly gas limit on sepolia (#77)

---------

Co-authored-by: IamFlux <175354924+0xiamflux@users.noreply.github.com>
Co-authored-by: Chiin <77933451+0xChin@users.noreply.github.com>
Co-authored-by: 0xchin <alanracciatti1220@gmail.com>
Co-authored-by: Maurelian <john@oplabs.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants