From b313ded4b5ec2c8631aea15331f76e484de55449 Mon Sep 17 00:00:00 2001 From: Dmitry S <11892559+swift1337@users.noreply.github.com> Date: Fri, 4 Oct 2024 15:41:31 +0200 Subject: [PATCH] Fix comments --- zetaclient/chains/ton/observer/inbound.go | 8 ++++++-- zetaclient/chains/ton/observer/observer.go | 10 ++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/zetaclient/chains/ton/observer/inbound.go b/zetaclient/chains/ton/observer/inbound.go index 4436b02369..36f08af46e 100644 --- a/zetaclient/chains/ton/observer/inbound.go +++ b/zetaclient/chains/ton/observer/inbound.go @@ -132,8 +132,8 @@ func (ob *Observer) voteInbound(ctx context.Context, tx *toncontracts.Transactio return "", nil } - // todo add compliance check - // https://github.com/zeta-chain/node/issues/2916 + // TODO: Add compliance check + // https://github.com/zeta-chain/node/issues/2916 blockHeader, err := ob.client.GetBlockHeader(ctx, tx.BlockID, 0) if err != nil { @@ -150,6 +150,7 @@ func (ob *Observer) voteInbound(ctx context.Context, tx *toncontracts.Transactio return ob.voteDeposit(ctx, tx, sender, amount, memo, seqno) } +// extractInboundData parses Gateway tx into deposit (TON sender, amount, memo) func extractInboundData(tx *toncontracts.Transaction) (string, math.Uint, []byte, error) { if tx.Operation == toncontracts.OpDeposit { d, err := tx.Deposit() @@ -193,6 +194,9 @@ func (ob *Observer) voteDeposit( inboundHash = liteapi.TransactionHashToString(tx.Lt, ton.Bits256(tx.Hash())) ) + // TODO: use protocol contract v2 for deposit + // https://github.com/zeta-chain/node/issues/2967 + msg := zetacore.GetInboundVoteMessage( sender, ob.Chain().ChainId, diff --git a/zetaclient/chains/ton/observer/observer.go b/zetaclient/chains/ton/observer/observer.go index c5fd26aad3..e20742116a 100644 --- a/zetaclient/chains/ton/observer/observer.go +++ b/zetaclient/chains/ton/observer/observer.go @@ -68,13 +68,11 @@ func (ob *Observer) Start(ctx context.Context) { // watch for incoming txs and post votes to zetacore bg.Work(ctx, ob.watchInbound, bg.WithName("WatchInbound"), bg.WithLogger(ob.Logger().Inbound)) - // todo - // watchInboundTracker https://github.com/zeta-chain/node/issues/2935 + // TODO: watchInboundTracker + // https://github.com/zeta-chain/node/issues/2935 - // todo outbounds/withdrawals https://github.com/zeta-chain/node/issues/2807 - // watchOutbound - // watchGasPrice - // watchRPCStatus + // TODO: outbounds/withdrawals: (watchOutbound, watchGasPrice, watchRPCStatus) + // https://github.com/zeta-chain/node/issues/2807 } func (ob *Observer) VoteOutboundIfConfirmed(_ context.Context, _ *types.CrossChainTx) (bool, error) {