Skip to content

Commit

Permalink
use op code for calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jan 28, 2025
1 parent 1d2a371 commit 96dc310
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zetaclient/chains/bitcoin/observer/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ func (ob *Observer) NewInboundVoteFromStdMemo(
RevertAddress: event.MemoStd.RevertOptions.RevertAddress,
}

// check if the memo is a cross-chain call, or simple token deposit
isCrosschainCall := event.MemoStd.OpCode == memo.OpCodeCall || event.MemoStd.OpCode == memo.OpCodeDepositAndCall

return crosschaintypes.NewMsgVoteInbound(
ob.ZetacoreClient().GetKeys().GetOperatorAddress().String(),
event.FromAddress,
Expand All @@ -237,6 +240,6 @@ func (ob *Observer) NewInboundVoteFromStdMemo(
false, // no arbitrary call for deposit to ZetaChain
event.Status,
crosschaintypes.WithRevertOptions(revertOptions),
crosschaintypes.WithCrossChainCall(len(event.MemoStd.Payload) > 0),
crosschaintypes.WithCrossChainCall(isCrosschainCall),
)
}

0 comments on commit 96dc310

Please sign in to comment.