-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: deploying Farcaster on a local Anvil instance #408
Comments
I think it is a little hard to deploy the whole contracts on a local env, when you run the command |
attempt: anvil start deployed $ anvil -f https://opt-mainnet.g.alchemy.com/v2/sTru65GqAhyu5j5lkOI1lzhzROIauekD \
--fork-block-number 108869000 \
--auto-impersonate next. $ forge script -v script/DeployL2.s.sol --rpc-url http://localhost:8545 --unlocked --broadcast --sender 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
[⠊] Compiling...
No files changed, compilation skipped
Script ran successfully.
== Logs ==
State Name Address Initcode hash
Deploying StorageRegistry 0xbd9ac3cb5ebc90a539bc3c90cfb121f9ba447830 0xad7b40016dfac0d4890bed8c174756dc1fdfc89dbd067ef15bf3e06b3ca56168
Deploying IdRegistry 0x2e6bb0cfca31949032dfbead0e35d8d3481eeb63 0xbd39a8a153c7243ece992d9a2880010099036634f3dd595f4ec2f9bd392bc33d
Deploying IdGateway 0xffaee5162459ade621fb07394ab56daf31e5ddcf 0x415bbc9621d309d7725c27ad2514bb5728e35c81d9d39326868681b6e305c8da
Deploying KeyRegistry 0xf8ce9186abd669bc9ff7de7dbcb783f13fb808fd 0x7a3e678802ac02873dd0e5ef874d7935234fb090cb689e76e8113b797980a33e
Deploying KeyGateway 0x50458f276e929d9432ee12325bb4396eabb72a52 0x8b70c5586f0f098e90c3acc59ea5e7e48451e687e49eae41f50b413b5a48cd26
Deploying SignedKeyRequestValidator 0xe565f4f285d7318bede674e503bced1faa4e1bdf 0x8b1dd2ec3bd1d271b6b98faa3cb668a53de4fac712d3547e418257f6e72e90ef
Deploying Bundler 0x644e5ea544ba5d035cd9bd97054b9a34b5dbe8eb 0x5924d0188d3752809199da357e87ef1008149f0c0cf12baedf4ecb473d9435c3
Deploying RecoveryProxy 0x0386afdf47d45becde81bd1cd1d1744199321851 0xf362dc0da661cd04230be078e8177065d139b5fafcbd84900b96b6a4f565d383
Running setup
## Setting up 1 EVM.
==========================
Chain 10
Estimated gas price: 3.00000011 gwei
Estimated total gas used for script: 23763453
Estimated amount required: 0.07129036161397983 ETH
==========================
##
Sending transactions [0 - 16].
⠤ [00:00:09] [#############################################################################################################################################################################################] 17/17 txes (0.0s)##
Waiting for receipts.
⠄ [00:00:00] [##################################################################################################################################>------------------------------------------------------] 12/17 receipts (0.0s)
##### optimism
✅ [Success]Hash: 0xf8fe5e1c473aab52211e196d4243fe72b5c1f92f3dac3298f97df391e9771229
Block: 108869001
Paid: 0.011450238187020554 ETH (3816746 gas * 3.000000049 gwei)
##### optimism
✅ [Success]Hash: 0xfff9c87603b61a87b12a735a16f120824f944d7dd8dc7863258b4841dcdb72f8
Block: 108869002
Paid: 0.0094155001412325 ETH (3138500 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x0f2171160f74b263b3dd3f9c49971b5a70e21588b5197d99087e45e44f81b263
Block: 108869002
Paid: 0.0147583202213748 ETH (4919440 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x4a488422c704f3d3f858b1f643ae11bbb526475f1f8a6f23ae5ddb2b86bd660b
Block: 108869002
Paid: 0.02554888838323332 ETH (8516296 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x0cf9f515fe2218d7b3b6a2523869d467c396d2b67144eaffd71169f28b251a0a
Block: 108869002
Paid: 0.030156645452349675 ETH (10052215 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x0922870426150dd77acfeccaebafb411cde795c9b5f37581788ea00593e4624a
Block: 108869002
Paid: 0.03372494450587416 ETH (11241648 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x8a52010f6e7ce3b922454c8683bca5028821326c503a7577e9b01d67399cbeba
Block: 108869002
Paid: 0.035490345532355175 ETH (11830115 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x85a224559aa2265cfce0e1296fcc517c8683c4abc10c75f2f7696fd3aacd4dc8
Block: 108869002
Paid: 0.03701122855516842 ETH (12337076 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x2118adb6b2fd50700cb3a48f49aeb46d233c7ddb08c5b90386df56a19f2684fe
Block: 108869003
Paid: 0.00014308200214623 ETH (47694 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0xb20b9f4f8f679e3409892df286e3895aeaa6a5616dd6b9cf4b2cc667db721630
Block: 108869003
Paid: 0.00023499600352494 ETH (78332 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x513b488b031a3b44ccf919c0107ee6f1e7183d3d09dd447eba86caddf4c85aab
Block: 108869003
Paid: 0.00037821000567315 ETH (126070 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x49de92acdfa6b6ee04afe3311d0dae0d6688456ce9bb3d9e041bad5652f1178f
Block: 108869003
Paid: 0.00052508400787626 ETH (175028 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0xcc4f3c8750fb2a15cca8fbc12fc43dfa96e3c5f5f1bb64cd44b84766514d05ad
Block: 108869003
Paid: 0.000668073010021095 ETH (222691 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0xfd0fe368e2e401cb47179a6ff46c65fcced65052219653bd417d2a3816086d9a
Block: 108869003
Paid: 0.000760035011400525 ETH (253345 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0xf6aee034ad7dc2674eb1ab4747d1e4867d05d67ce9d2d469c6db99d04566f015
Block: 108869003
Paid: 0.001063359015950385 ETH (354453 gas * 3.000000045 gwei)
##### optimism
✅ [Success]Hash: 0x284cc31cf36fee1d8495a1cbaeec454ae13824e4ab6a49fb9cda2786405ecf8d
Block: 108869005
Paid: 0.000087459001020355 ETH (29153 gas * 3.000000035 gwei)
##### optimism
✅ [Success]Hash: 0x271318d8ec78b4ad0730f3e1736a92f422d85fcd6dda931e165a244cc6d4cbd4
Block: 108869005
Paid: 0.00019586400228508 ETH (65288 gas * 3.000000035 gwei)
==========================
ONCHAIN EXECUTION COMPLETE & SUCCESSFUL.
Total Paid: 0.201612273038506624 ETH (67204090 gas * avg 3.000000044 gwei)
Transactions saved to: /Users/jeongtaepark/Desktop/contracts/broadcast/DeployL2.s.sol/10/run-latest.json
Sensitive values saved to: /Users/jeongtaepark/Desktop/contracts/cache/DeployL2.s.sol/10/run-latest.json |
What is the bug?
I couldn't deploy Farcaster locally using the instructions available on https://github.com/farcasterxyz/contracts/blob/main/CONTRIBUTING.md#24-deploying-contracts.
How can it be reproduced? (optional)
anvil
)ff80
)source .env
From the logs, I assume there is a problem with env_var
ID_REGISTRY_OWNER_ADDRESS
. Please note that, in my.env
,ID_REGISTRY_OWNER_ADDRESS = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
(Anvil account #0, same index as the private key.)Additional context (optional)
Please find error message below
Traces:
[4324802] → new IdRegistryScript@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
└─ ← 21439 bytes of code
[10817455] IdRegistryScript::run()
├─ [0] VM::envAddress("ID_REGISTRY_OWNER_ADDRESS") [staticcall]
│ └─ ←
├─ [0] console::log("State ", "Name ", "Address ", "Initcode hash") [staticcall]
│ └─ ← ()
├─ [0] 0x0000000000FFe8B47B3e2130213B802212439497::hasBeenDeployed(0x6dE7074bb25960c678F0fF4Ab92A55A6350434bB) [staticcall]
│ └─ ← ()
└─ ← EvmError: Revert
== Logs ==
State Name Address Initcode hash
Error:
script failed:
The text was updated successfully, but these errors were encountered: