Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeddes committed Dec 7, 2024
1 parent 7b28a11 commit 7378735
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/src/v2/Calls.sol
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ library CallsV2 {

Payload memory payload = Payload({
origin: origin,
value: uint128(msg.value),
assets: preparedAssets,
xcm: xcm,
claimer: claimer,
value: uint128(msg.value) - executionFee - relayerFee,
executionFee: executionFee,
relayerFee: relayerFee
});
Expand Down
6 changes: 5 additions & 1 deletion contracts/src/v2/Types.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ library CommandKind {
}

struct Payload {
// sender of the message
address origin;
uint128 value;
Asset[] assets;
bytes xcm;
bytes claimer;
// ether value
uint128 value;
// additional ether value for execution fees
uint128 executionFee;
// additional ether value for relayer fees
uint128 relayerFee;
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/GatewayV2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ contract GatewayV2Test is Test {
1,
Payload({
origin: user1,
value: 1 ether,
assets: outputAssets,
xcm: "",
claimer: "",
value: 0.5 ether,
executionFee: 0.1 ether,
relayerFee: 0.4 ether
})
Expand Down

0 comments on commit 7378735

Please sign in to comment.