Skip to content

Commit

Permalink
add method SetParentChainHeight to cross chain contract.
Browse files Browse the repository at this point in the history
  • Loading branch information
eanzhao committed Dec 19, 2024
1 parent 187d3ed commit 6a337c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contract/AElf.Contracts.CrossChain/CrossChainContract.Hotfix.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Google.Protobuf.WellKnownTypes;

namespace AElf.Contracts.CrossChain;

public partial class CrossChainContract
{
public override Empty SetParentChainHeight(Int64Value input)
{
AssertAddressIsCurrentMiner(Context.Sender);
State.CurrentParentChainHeight.Value = input.Value;
return new Empty();
}
}
3 changes: 3 additions & 0 deletions protobuf/cross_chain_contract.proto
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ service CrossChainContract {
option (aelf.is_view) = true;
}

rpc SetParentChainHeight (google.protobuf.Int64Value) returns (google.protobuf.Empty) {
}

// Get the chain id of parent chain.
rpc GetParentChainId (google.protobuf.Empty) returns (google.protobuf.Int32Value) {
option (aelf.is_view) = true;
Expand Down

0 comments on commit 6a337c8

Please sign in to comment.