Fix last block for aptos in contract-watcher (#546)

This commit is contained in:
ftocal 2023-07-14 14:06:20 -03:00 committed by GitHub
parent 61d070e859
commit 68b0586205
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -209,7 +209,7 @@ func newWatchersForMainnet() *watchersConfig {
celo: &config.CELO_MAINNET, celo: &config.CELO_MAINNET,
rateLimit: rateLimitConfig{ rateLimit: rateLimitConfig{
evm: 1000, evm: 1000,
solana: 3, solana: 20,
terra: 10, terra: 10,
aptos: 20, aptos: 20,
oasis: 3, oasis: 3,

View File

@ -9,7 +9,6 @@ import (
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/wormhole-foundation/wormhole-explorer/contract-watcher/internal/metrics" "github.com/wormhole-foundation/wormhole-explorer/contract-watcher/internal/metrics"
"github.com/wormhole-foundation/wormhole-explorer/contract-watcher/support"
"go.uber.org/ratelimit" "go.uber.org/ratelimit"
) )
@ -101,7 +100,7 @@ func (s *AptosSDK) GetLatestBlock(ctx context.Context) (uint64, error) {
if result.BlockHeight == "" { if result.BlockHeight == "" {
return 0, fmt.Errorf("empty block height") return 0, fmt.Errorf("empty block height")
} }
return support.DecodeUint64(result.BlockHeight) return strconv.ParseUint(result.BlockHeight, 10, 64)
} }
func (s *AptosSDK) GetBlock(ctx context.Context, block uint64) (*GetBlockResult, error) { func (s *AptosSDK) GetBlock(ctx context.Context, block uint64) (*GetBlockResult, error) {