Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bendanzhentan committed Dec 8, 2023
1 parent 544da41 commit e03d086
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions bot.mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ log-filter-block-range = 1000

# See https://github.com/bnb-chain/opbnb-bridge-tokens/blob/main/opbnb.tokenlist.json
whitelist-l2-token-list = [
"0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", # Native token
"0x7c6b91d9be155a6db01f749217d76ff02a7227f2", # BTCB
"0xe7798f023fc62146e8aa1b36da45fb70855a77ea", # ETH
"0x50c5725949a6f0c72e6c4a641f24049a917db0cb", # FDUSD
Expand Down
1 change: 1 addition & 0 deletions bot.testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ log-filter-block-range = 1000

# See https://github.com/bnb-chain/opbnb-bridge-tokens#opbnb-testnet-token-list
whitelist-l2-token-list = [
"0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", # Native token
"0xa9aD1484D9Bfb27adbc2bf50A6E495777CC8cFf2", # BUSD
"0x3AB4E696E31173409dbfBb1FEB5b9A7cC55A212c", # BTCB
"0x584f7b986d9942B0859a1E6921efA5342A673d04", # ETH
Expand Down
6 changes: 3 additions & 3 deletions cmd/bot/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func RunCommand(ctx *cli.Context) error {
if err != nil {
return fmt.Errorf("failed to connect database: %w", err)
}
err = db.AutoMigrate(&core.DBL2ScannedBlock{})
err = db.AutoMigrate(&core.L2ScannedBlock{})
if err != nil {
return fmt.Errorf("failed to migrate l2_scanned_blocks: %w", err)
}
Expand Down Expand Up @@ -329,8 +329,8 @@ func connect(log log.Logger, dbConfig config.DBConfig) (*gorm.DB, error) {
}

// queryL2ScannedBlock queries the l2_scanned_blocks table for the last scanned block
func queryL2ScannedBlock(db *gorm.DB, l2StartingNumber int64) (*core.DBL2ScannedBlock, error) {
l2ScannedBlock := core.DBL2ScannedBlock{Number: l2StartingNumber}
func queryL2ScannedBlock(db *gorm.DB, l2StartingNumber int64) (*core.L2ScannedBlock, error) {
l2ScannedBlock := core.L2ScannedBlock{Number: l2StartingNumber}
result := db.Order("number desc").Last(&l2ScannedBlock)
if result.Error != nil {
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
Expand Down
2 changes: 1 addition & 1 deletion core/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func (b *Processor) toLowLevelMessage(
return &withdrawalTx, nil
}

func (b *Processor) CheckByFilterOptions(botDelegatedWithdrawToEvent *DBWithdrawal, receipt *types.Receipt) error {
func (b *Processor) CheckByFilterOptions(botDelegatedWithdrawToEvent *BotDelegatedWithdrawal, receipt *types.Receipt) error {
L2StandardBridgeBotAbi, _ := bindings2.L2StandardBridgeBotMetaData.GetAbi()
withdrawToEvent := bindings2.L2StandardBridgeBotWithdrawTo{}
indexedArgs := func(arguments abi.Arguments) abi.Arguments {
Expand Down

0 comments on commit e03d086

Please sign in to comment.