From f2cd67e81f6245c5291624f0e409200d42542b4a Mon Sep 17 00:00:00 2001 From: hishope Date: Sun, 1 Dec 2024 21:38:31 +0800 Subject: [PATCH] chore: fix some problematic function names Signed-off-by: hishope --- bchain/basechain.go | 2 +- bchain/coins/blockchain.go | 2 +- bchain/coins/eth/contract.go | 2 +- db/rocksdb_ethereumtype.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bchain/basechain.go b/bchain/basechain.go index e6da4281ae..5618c1d77b 100644 --- a/bchain/basechain.go +++ b/bchain/basechain.go @@ -64,7 +64,7 @@ func (b *BaseChain) EthereumTypeGetErc20ContractBalance(addrDesc, contractDesc A return nil, errors.New("not supported") } -// GetContractInfo returns URI of non fungible or multi token defined by token id +// GetTokenURI returns URI of non fungible or multi token defined by token id func (p *BaseChain) GetTokenURI(contractDesc AddressDescriptor, tokenID *big.Int) (string, error) { return "", errors.New("not supported") } diff --git a/bchain/coins/blockchain.go b/bchain/coins/blockchain.go index 77e7206ab7..e694dafca8 100644 --- a/bchain/coins/blockchain.go +++ b/bchain/coins/blockchain.go @@ -333,7 +333,7 @@ func (c *blockChainWithMetrics) EthereumTypeGetErc20ContractBalance(addrDesc, co return c.b.EthereumTypeGetErc20ContractBalance(addrDesc, contractDesc) } -// GetContractInfo returns URI of non fungible or multi token defined by token id +// GetTokenURI returns URI of non fungible or multi token defined by token id func (c *blockChainWithMetrics) GetTokenURI(contractDesc bchain.AddressDescriptor, tokenID *big.Int) (v string, err error) { defer func(s time.Time) { c.observeRPCLatency("GetTokenURI", s, err) }(time.Now()) return c.b.GetTokenURI(contractDesc, tokenID) diff --git a/bchain/coins/eth/contract.go b/bchain/coins/eth/contract.go index efc7439a7c..6dbca33e3a 100644 --- a/bchain/coins/eth/contract.go +++ b/bchain/coins/eth/contract.go @@ -356,7 +356,7 @@ func (b *EthereumRPC) EthereumTypeGetErc20ContractBalance(addrDesc, contractDesc return r, nil } -// GetContractInfo returns URI of non fungible or multi token defined by token id +// GetTokenURI returns URI of non fungible or multi token defined by token id func (b *EthereumRPC) GetTokenURI(contractDesc bchain.AddressDescriptor, tokenID *big.Int) (string, error) { address := hexutil.Encode(contractDesc) // CryptoKitties do not fully support ERC721 standard, do not have tokenURI method diff --git a/db/rocksdb_ethereumtype.go b/db/rocksdb_ethereumtype.go index 29bff516cd..11371a7914 100644 --- a/db/rocksdb_ethereumtype.go +++ b/db/rocksdb_ethereumtype.go @@ -124,7 +124,7 @@ type AddrContracts struct { Contracts []AddrContract } -// packAddrContract packs AddrContracts into a byte buffer +// packAddrContracts packs AddrContracts into a byte buffer func packAddrContracts(acs *AddrContracts) []byte { buf := make([]byte, 0, 128) varBuf := make([]byte, maxPackedBigintBytes)