Skip to content

Commit

Permalink
chore: update sdk examples to use sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalakkal committed Feb 6, 2024
1 parent bd6221e commit 2aad674
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions sdk/data/account_age_input.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"addr": "0x897dDbe14c9C7736EbfDC58461355697FbF70048",
"claimed_block_number": 9173677
"addr": "0xef663bB0e0b1091571DaD9715994bc81e9f5a2ab",
"claimed_block_number": 5146659
}
8 changes: 4 additions & 4 deletions sdk/data/quickstart_input.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"addr": "0x8dde5d4a8384f403f888e1419672d94c570440c9",
"block": 9730000,
"tx_block_number": 9728956,
"tx_idx": 10,
"addr": "0x83c8c0B395850bA55c830451Cfaca4F2A667a983",
"block": 5234569,
"tx_block_number": 5234564,
"tx_idx": 292,
"slot": "0x0000000000000000000000000000000000000000000000000000000000000002",
"mapping_slot": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
10 changes: 5 additions & 5 deletions sdk/examples/quickstart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl AxiomComputeFn for QuickstartInput {
let _mapping_val = mapping.key(HiLo::from_hi_lo(key));

// fetch transaction data, example is for the transaction below:
// https://goerli.etherscan.io/tx/0xa4f781ad033d6dab5b13e3ab7c7cbdbd0ea4c0a2be3d9ffa7ed1e53d2d5bcc46
// https://sepolia.etherscan.io/tx/0xf518bd931eae8dc4178e1f8a3b64d6312af33f8c5df0c2cd4a38b72f4fb2d7dc
// get the 4-byte function selector that was called
let _function_selector = api
.get_tx(assigned_inputs.tx_block_number, assigned_inputs.tx_idx)
Expand All @@ -69,11 +69,11 @@ impl AxiomComputeFn for QuickstartInput {
.calldata(calldata_idx);

// fetch receipt data, example is for the first event log in the transaction below
// Deposit (index_topic_1 address payor, uint256 amt)
// https://goerli.etherscan.io/tx/0xa4f781ad033d6dab5b13e3ab7c7cbdbd0ea4c0a2be3d9ffa7ed1e53d2d5bcc46
// eventSchema = keccak(Deposit(address,uint256))
// Transfer (index_topic_1 address from, index_topic_2 address to, uint256 tokens)
// https://sepolia.etherscan.io/tx/0xf518bd931eae8dc4178e1f8a3b64d6312af33f8c5df0c2cd4a38b72f4fb2d7dc#eventlog
// eventSchema = keccak(Transfer(address,address,uint256))
let event_schema =
H256::from_str("0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c")
H256::from_str("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")
.unwrap();
let log_idx = api.ctx().load_constant(Fr::from(0));
let topic_idx = api.ctx().load_constant(Fr::from(1));
Expand Down
2 changes: 1 addition & 1 deletion sdk/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
See [./examples/account_age.rs] for an example Axiom compute circuit. To run the `account_age` circuit:

```
cargo run --example account_age -- --input data/quickstart_input.json -k 12 -p <PROVIDER_URI> <CMD>
cargo run --example account_age -- --input data/account_age_input.json -k 12 -p <PROVIDER_URI> <CMD>
```

where `PROVIDER_URI` is a JSON-RPC URL, and `CMD` is `mock`, `prove`, `keygen`, or `run`.

0 comments on commit 2aad674

Please sign in to comment.