Skip to content

Commit a6bdb96

Browse files
Return solidity version of proof for reward account (#3611)
* change reward proof endpoint to return RewardAccountQUeryData * rename RewardMerklizedStateDataSource -> RewardAccountProofDataSource * fix test * sol reward proof * ... * test sol proof * add api docs * add insta snapshot * ignore snapshots in typos.toml * change insta snapshot dir * fix bindings * revert downgrade of bn254 submodule * Return all reward claim inputs from reward API (#3621) * Squashed commit of the following: commit ad363ab Merge: d1f6ded 7dee60e Author: Mathis <[email protected]> Date: Tue Sep 23 13:36:41 2025 +0200 Merge branch 'main' into ma/reward-claim-contract-interface commit d1f6ded Author: sveitser <[email protected]> Date: Thu Sep 18 10:50:04 2025 +0200 add IRewardClaim ABI Json commit 39ee5de Author: sveitser <[email protected]> Date: Wed Sep 17 20:12:40 2025 +0200 rename event for consistency commit a639520 Author: sveitser <[email protected]> Date: Wed Sep 17 17:01:25 2025 +0200 add IRewardClaim interface This is taken from PR #3491 Would like to review and merge it into main first before we finish the contract so that it's easy to share with external parties. * reward API: return reward claim input - Use jellyfish compat - Use IRewardClaim interface * fix typo * rename API, distinguish internal/external error * improve docs, error logging * WIP: use bytes for authData (cherry picked from commit 87ca2a1) * reward claim: use bytes for auth root data - Add rust types to clarify serialization for auth data. - Add tests for abi encoding and decoding - Update solidity tests to use the new interface. * auth data: remove custom serde impl --------- Co-authored-by: Mathis Antony <[email protected]>
1 parent f014821 commit a6bdb96

28 files changed

+3424
-713
lines changed

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ extend-exclude = [
1414
"crates/hotshot/macros/src/lib.rs",
1515
"staking-cli/tests/cli.rs",
1616
"sdks/go/types/common/consts.go",
17+
"data/insta_snapshots",
1718
]

Cargo.lock

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/artifacts/abi/IRewardClaim.json

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,9 @@
99
"internalType": "uint256"
1010
},
1111
{
12-
"name": "proof",
13-
"type": "tuple",
14-
"internalType": "struct IRewardClaim.LifetimeRewardsProof",
15-
"components": [
16-
{
17-
"name": "siblings",
18-
"type": "bytes32[]",
19-
"internalType": "bytes32[]"
20-
}
21-
]
22-
},
23-
{
24-
"name": "authRootInputs",
25-
"type": "bytes32[7]",
26-
"internalType": "bytes32[7]"
12+
"name": "authData",
13+
"type": "bytes",
14+
"internalType": "bytes"
2715
}
2816
],
2917
"outputs": [],

contracts/rust/adapter/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ num-bigint = { version = "0.4", default-features = false }
3333
num-traits = { version = "0.2", default-features = false }
3434
rand = { workspace = true }
3535
serde = { workspace = true }
36+
serde_arrays = "0.2.0"
3637
thiserror = { workspace = true }
3738

3839
[dev-dependencies]
3940
bincode = { workspace = true }
41+
serde_json = { workspace = true }
4042
tokio = { workspace = true }
4143

4244
[lints]

0 commit comments

Comments
 (0)