Skip to content

Commit

Permalink
test progress
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Oct 23, 2024
1 parent a6ec370 commit ffffb6b
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridges/snowbridge/pallets/rewards/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,15 @@ pub mod pallet {
let xcm_fee: u128 = 10_000_000_000;
let asset_hub_fee_asset: Asset = (Location::parent(), xcm_fee).into();

// TODO burn teleported DOT
let xcm: Xcm<()> = alloc::vec![
// Teleport required fees.
ReceiveTeleportedAsset(asset_hub_fee_asset.clone().into()),
// Pay for execution.
BuyExecution { fees: asset_hub_fee_asset, weight_limit: Unlimited },
DescendOrigin(PalletInstance(80).into()),
UniversalOrigin(GlobalConsensus(T::EthereumNetwork::get())),
ReserveAssetDeposited(deposit.clone().into()),
DepositAsset { assets: Definite(deposit.into()), beneficiary },
SetAppendix(Xcm(alloc::vec![
RefundSurplus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,62 @@ fn claim_rewards_works(
)),
"RewardClaimed event with correct fields."
);

/*
RuntimeEvent::EthereumRewards(
Event::RewardDeposited {
account_id: d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...),
value: 2000000000000000000,
},
),
RuntimeEvent::XcmpQueue(
Event::XcmpMessageSent {
message_hash: [
67,
163,
22,
82,
218,
183,
34,
222,
244,
233,
106,
252,
199,
81,
2,
159,
116,
19,
241,
135,
208,
19,
23,
71,
203,
196,
169,
208,
235,
101,
32,
59,
],
},
),
RuntimeEvent::EthereumRewards(
Event::RewardClaimed {
account_id: d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...),
deposit_address: 8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48 (5FHneW46...),
value: 1000000000000000000,
message_id: 0xd053923c8090a1c15ec02ff65beabcb11b1537b5bda1803704776d71f2bfde7d,
},
),
*/
});

AssetHubWestend::execute_with(|| {
Expand All @@ -213,6 +269,14 @@ fn claim_rewards_works(
vec![RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {},]
);
})
/*
RuntimeEvent::Balances(
Event::Minted {
who: ce796ae65569a670d0c1cc1ac12515a3ce21b5fbf729d63d7b289baad070139d (5GjRnmh5...),
amount: 2814000000,
},
),
*/
}

#[test]
Expand Down

0 comments on commit ffffb6b

Please sign in to comment.