Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 committed Oct 4, 2024
1 parent d25a79a commit b313ded
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 6 additions & 2 deletions zetaclient/chains/ton/observer/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 4 additions & 6 deletions zetaclient/chains/ton/observer/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b313ded

Please sign in to comment.