Skip to content

bug: deploying Farcaster on a local Anvil instance #408

Description

@gabrielfior

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)

  • Start anvil locally (anvil)
  • Copy the private key # 0 that Anvil prints to the console (public key 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, private key ends with ff80)
  • Run source .env
  • Run the deploy script below
  • Rename .env.local to .env
forge script script/IdRegistry.s.sol:IdRegistryScript --private-key $PRIVATE_KEY1 --broadcast --verify --fork-url http://127.0.0.1:8545

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:

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions