Skip to content
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

Use filecoin test chain not hardhat #6

Open
lalexgap opened this issue Jun 2, 2023 · 3 comments
Open

Use filecoin test chain not hardhat #6

lalexgap opened this issue Jun 2, 2023 · 3 comments
Assignees

Comments

@lalexgap
Copy link

lalexgap commented Jun 2, 2023

Currently we rely on spinning up a seperate instance of hardhat for nitro-rpc-client, we're not actually communicating with the filecoin test chain that gets started with a the devnet command.

I'm not sure if the filecoin test chain exposes an EVM-comptable JSON-RPC API, but we should investigate and use it, if it exists.

@lalexgap
Copy link
Author

lalexgap commented Jun 2, 2023

Depending on how your have setup devnet (docker vs non-docker), we can enable contract event listening on Boost.
If non-docker, then just edit the config.toml and set ContractDealsConfig.Enable = true . Restart boostd
If running in docker then, edit the file docker/devnet/boost/entrypoint.sh and add the below commands after sed -i 's|127.0.0.1|0.0.0.0|g' $BOOST_PATH/config.toml line and reinit devnet.
awk '/ContractDeals/{ rl = NR + 1 } NR == rl { gsub( /"Enabled = false"/,"Enabled = true") } 1' $BOOST_PATH/config.toml > $BOOST_PATH/config.toml.tmp
mv $BOOST_PATH/config.toml.tmp $BOOST_PATH/config.toml
For the running devnet, shut edit config.toml and set ContractDeals.Enabled = true and restart the container (edited)

From https://statechannels.slack.com/archives/C0269MSDP34/p1685617963225049?thread_ts=1685557531.275429&cid=C0269MSDP34

@lalexgap lalexgap self-assigned this Jun 6, 2023
@lalexgap lalexgap transferred this issue from statechannels/nitro-gui Jun 8, 2023
@lalexgap
Copy link
Author

lalexgap commented Jun 9, 2023

We need to enable FEVM in the lotus config file.

Currently getting a permission error, probably need to do this https://lotus.filecoin.io/reference/basics/api-access/

@geoknee geoknee self-assigned this Jun 13, 2023
@lalexgap
Copy link
Author

lalexgap commented Jun 13, 2023

Note: I’m assuming we’re using a restartable devnet from this [branch](#7)

# Update this with token you generated from before
chainauthtoken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.PyJt3GZtJrLu-bs_3Kmy1VrFpcGoCZEZ8JhX-YWQ4Pc"
# This is the default RPC endpoint for the lotus daemon
chainurl = "ws://127.0.0.1:1234/rpc/v1"
  • Run the go-nitro test script go run ./scripts/start-rpc-servers.go
  • Currently we’ll get an error when we try to deploy the contract. Sending funds to the account doesn’t seem to help 😟
Found chain id: 31415926
panic: failed to estimate gas: CallWithGas failed: call raw get actor: resolution lookup failed (t410f6op5nzi2vwepn5gonk4ie4tzz773sitggxp4hiy): resolve address t410f6op5nzi2vwepn5gonk4ie4tzz773sitggxp4hiy: actor not found

goroutine 1 [running]:
main.main()
	/Users/lagap/code/go-nitro/scripts/start-rpc-servers.go:60 +0x444
exit status 2

Note:

@geoknee geoknee changed the title Investigate using the same chain Use filecoin test chain not hardhat Jun 13, 2023
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

No branches or pull requests

2 participants