Skip to content

Commit aa2cd0c

Browse files
remove InvalidClaim struct
1 parent b2dccc5 commit aa2cd0c

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

bridgesync/processor.go

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -350,55 +350,6 @@ func (c *Claim) decodePreEtrogCalldata(data []any) (bool, error) {
350350
return true, nil
351351
}
352352

353-
type InvalidClaim struct {
354-
// claim struct fields
355-
BlockNum uint64 `meddler:"block_num"`
356-
BlockPos uint64 `meddler:"block_pos"`
357-
TxHash common.Hash `meddler:"tx_hash,hash"`
358-
GlobalIndex *big.Int `meddler:"global_index,bigint"`
359-
OriginNetwork uint32 `meddler:"origin_network"`
360-
OriginAddress common.Address `meddler:"origin_address"`
361-
DestinationAddress common.Address `meddler:"destination_address"`
362-
Amount *big.Int `meddler:"amount,bigint"`
363-
ProofLocalExitRoot types.Proof `meddler:"proof_local_exit_root,merkleproof"`
364-
ProofRollupExitRoot types.Proof `meddler:"proof_rollup_exit_root,merkleproof"`
365-
MainnetExitRoot common.Hash `meddler:"mainnet_exit_root,hash"`
366-
RollupExitRoot common.Hash `meddler:"rollup_exit_root,hash"`
367-
GlobalExitRoot common.Hash `meddler:"global_exit_root,hash"`
368-
DestinationNetwork uint32 `meddler:"destination_network"`
369-
Metadata []byte `meddler:"metadata"`
370-
IsMessage bool `meddler:"is_message"`
371-
BlockTimestamp uint64 `meddler:"block_timestamp"`
372-
// additional fields
373-
Reason string `meddler:"reason"`
374-
CreatedAt uint64 `meddler:"created_at"`
375-
}
376-
377-
// NewInvalidClaim creates a new InvalidClaim from a Claim and a reason
378-
func NewInvalidClaim(c *Claim, reason string) *InvalidClaim {
379-
return &InvalidClaim{
380-
BlockNum: c.BlockNum,
381-
BlockPos: c.BlockPos,
382-
TxHash: c.TxHash,
383-
GlobalIndex: c.GlobalIndex,
384-
OriginNetwork: c.OriginNetwork,
385-
OriginAddress: c.OriginAddress,
386-
DestinationAddress: c.DestinationAddress,
387-
Amount: c.Amount,
388-
ProofLocalExitRoot: c.ProofLocalExitRoot,
389-
ProofRollupExitRoot: c.ProofRollupExitRoot,
390-
MainnetExitRoot: c.MainnetExitRoot,
391-
RollupExitRoot: c.RollupExitRoot,
392-
GlobalExitRoot: c.GlobalExitRoot,
393-
DestinationNetwork: c.DestinationNetwork,
394-
Metadata: c.Metadata,
395-
IsMessage: c.IsMessage,
396-
BlockTimestamp: c.BlockTimestamp,
397-
Reason: reason,
398-
CreatedAt: uint64(time.Now().UTC().Unix()),
399-
}
400-
}
401-
402353
// TokenMapping representation of a NewWrappedToken event, that is emitted by the bridge contract
403354
type TokenMapping struct {
404355
BlockNum uint64 `meddler:"block_num"`

0 commit comments

Comments
 (0)