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

V2 smoke tests #1327

Merged
merged 4 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/src/Types.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ import {
import {CallsV1} from "./v1/Calls.sol";
import {HandlersV1} from "./v1/Handlers.sol";

import {InboundMessageV2, Command as CommandV2, CommandKind} from "./v2/Types.sol";
import {InboundMessageV2, CommandV2, CommandKind} from "./v2/Types.sol";
import {CallsV2} from "./v2/Calls.sol";
import {HandlersV2} from "./v2/Handlers.sol";
4 changes: 2 additions & 2 deletions contracts/src/v2/Types.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ struct InboundMessageV2 {
// Message nonce
uint64 nonce;
// Commands
Command[] commands;
CommandV2[] commands;
}

struct Command {
struct CommandV2 {
uint8 kind;
uint64 gas;
bytes payload;
Expand Down
8 changes: 4 additions & 4 deletions relayer/contracts/gateway.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions relayer/relays/parachain/types_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ type CommandWrapper struct {
Params types.Bytes
}

func (r CommandWrapper) IntoCommandV2() contracts.Command {
return contracts.Command{
func (r CommandWrapper) IntoCommandV2() contracts.CommandV2 {
return contracts.CommandV2{
Kind: uint8(r.Kind),
Gas: uint64(r.MaxDispatchGas),
Payload: r.Params,
}
}

func (m OutboundQueueMessageV2) IntoInboundMessageV2() contracts.InboundMessageV2 {
var commands []contracts.Command
var commands []contracts.CommandV2
for _, command := range m.Commands {
commands = append(commands, command.IntoCommandV2())
}
Expand Down
Loading
Loading