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

ETH settlement #9

Closed
wants to merge 34 commits into from
Closed

ETH settlement #9

wants to merge 34 commits into from

Conversation

0xmovses
Copy link
Contributor

@0xmovses 0xmovses commented Mar 7, 2024

Notes [WIP]

Testing

Prerequisites

  1. Eth Private Key
  2. RPC API Key (I used alchemy)
  3. Bonsai API key and URL

Testing Steps

  1. export RUST_LOG=info

  2. Set the env var export ETH_WALLET_PRIVATE_KEY=<eth-priv-key>

  3. Set the Bonsai env vars export BONSAI_API_KEY=<key> export BONSAI_API_URL=url

  4. cd protocol-units/eth-settlement, Deploy Settlement.sol :
    forge script script/DeploySettlement.s.sol:DeploySettlement --rpc-url https://eth-sepolia.g.alchemy.com/v2/<alchemy-api-key> --private-key <priv_key> --broadcast --verify --etherscan-api-key <alchemy-api-key> -vvvv

  5. Run the publisher
    cargo run --bin publisher -- --chain-id 11155111 --eth-wallet-private-key <priv-key> --rpc-url https://eth-s epolia.g.alchemy.com/v2/<api-url> --contract <even-number-contract-address> --input 42

My deployments:
Settlement 0x931112D48A657001be6Ebd46CeC3B86658fa7f35
EvenNumber: 0x931112D48A657001be6Ebd46CeC3B86658fa7f35

If successful final info log should be something like:

[2024-03-11T15:38:53Z INFO  publisher] Transaction request: TransactionRequest { from: Some(0x931112d48a657001be6ebd46cec3b86658fa7f35), to: Some(Address(0x931112d48a657001be6ebd46cec3b86658fa7f35)), gas: None, gas_price: None, value: None, data: Some(Bytes(0x614d4090000000000000000000000000000000000000000000000000000000000000002afaf62a2908468e146c5f502f040c04fb1036dacc9f893f500d29df8746f4963a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000100116aebefbeeb70024f635c2e79a01ecb5ffb35bffc340caf178ae5a76c595ea00528b6f8812148c07a714b90e24c3a17758b6355efe78abeb56925c9b1e91abd180f28439c39731271f2bab6001ccf6ce7c55cae19e4b0c11e41ecdebe2872411639c54f8022015685928b8f3199fbacca99ff389bb64e5029c74e3f79d1ff251de2680c48b9cededa8f23469fb93730ee2df4e363daf9d847144fe2f003ae320c94faa0667604d107354149853c702b909be3800877687f7c937e732099782514c2f12bc2afdb206dda217f010fb573fef96a82d98e6de60ff147e5856aaf8b11c94632833f6d0b25544d7b69bc965f9eefffe4ce9511cee7c8ac349bf70ae8)), nonce: None, chain_id: Some(11155111) }
[2024-03-11T15:39:02Z INFO  publisher] Transaction receipt: Some(TransactionReceipt { transaction_hash: 0xe60214871cd5754fc07343423ca85ce1f4207856f5002639be0c60c36ed48b7d, transaction_index: 86, block_hash: Some(0xa482e0711f6f95fc8bd7b0aa75c010f0c282e3cbb8d45405feea41e3d1d11f9a), block_number: Some(5464411), from: 0x931112d48a657001be6ebd46cec3b86658fa7f35, to: Some(0x931112d48a657001be6ebd46cec3b86658fa7f35), cumulative_gas_used: 10231757, gas_used: Some(26080), contract_address: None, logs: [], status: Some(1), root: None, logs_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, transaction_type: Some(0), effective_gas_price: Some(30247298882), other: OtherFields { inner: {} } })

@0xmovses 0xmovses marked this pull request as draft March 11, 2024 17:35
@0xmovses
Copy link
Contributor Author

0xmovses commented Mar 12, 2024

@andyjsbell I've submitted this PR to risc0-ethereum which will make our testing code lighter. Ideally it gets merged, otherwise I have to design some workarounds. Other than this, the integration test is almost complete. I'd like my PR to get merged there, as it will reduce the diff here on this PR if it does.
risc0/risc0-ethereum#43

@0xmovses
Copy link
Contributor Author

0xmovses commented Apr 30, 2024

Closing as stale, this has been re-implemented in the R*M epic.

@0xmovses 0xmovses closed this Apr 30, 2024
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