Skip to content

Commit

Permalink
Merge pull request #6 from mirrorworld-universe/feat
Browse files Browse the repository at this point in the history
feat: Add data account field to HypergridNode message
  • Loading branch information
ZeneDeLuca authored Jul 4, 2024
2 parents 464489f + 633dcb0 commit 6dc8c20
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 32 deletions.
5 changes: 3 additions & 2 deletions proto/hypergridssn/hypergridssn/hypergrid_node.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ message HypergridNode {
string name = 2;
string rpc = 3; // Grid RPC
int32 role = 4; // 0: unknown, 1: Solana L1, 2: SSN, 3: Grid, 4: Sonic Grid
int32 starttime = 5;
string creator = 6;
string data_account = 5; // data account for storing bill
int32 starttime = 6;
string creator = 7;
}

26 changes: 14 additions & 12 deletions x/hypergridssn/keeper/msg_server_hypergrid_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ func (k msgServer) CreateHypergridNode(goCtx context.Context, msg *types.MsgCrea
}

var hypergridNode = types.HypergridNode{
Creator: msg.Creator,
Pubkey: msg.Pubkey,
Name: msg.Name,
Rpc: msg.Rpc,
Role: msg.Role,
Starttime: msg.Starttime,
Creator: msg.Creator,
Pubkey: msg.Pubkey,
Name: msg.Name,
Rpc: msg.Rpc,
DataAccount: msg.DataAccount,
Role: msg.Role,
Starttime: msg.Starttime,
}

k.SetHypergridNode(
Expand Down Expand Up @@ -56,12 +57,13 @@ func (k msgServer) UpdateHypergridNode(goCtx context.Context, msg *types.MsgUpda
}

var hypergridNode = types.HypergridNode{
Creator: msg.Creator,
Pubkey: msg.Pubkey,
Name: msg.Name,
Rpc: msg.Rpc,
Role: msg.Role,
Starttime: msg.Starttime,
Creator: msg.Creator,
Pubkey: msg.Pubkey,
Name: msg.Name,
Rpc: msg.Rpc,
DataAccount: msg.DataAccount,
Role: msg.Role,
Starttime: msg.Starttime,
}

k.SetHypergridNode(ctx, hypergridNode)
Expand Down
88 changes: 70 additions & 18 deletions x/hypergridssn/types/hypergrid_node.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6dc8c20

Please sign in to comment.