Skip to content

Commit 1bfad7f

Browse files
committed
refactor: updated ERC20 contract handlers name
1 parent dbd9038 commit 1bfad7f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

backend/pkg/commons/rpc/erigon.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,15 @@ func (client *ErigonClient) GetERC20TokenMetadata(token []byte) (*types.ERC20Met
476476
ret := &types.ERC20Metadata{}
477477

478478
g.Go(func() error {
479-
return getContractSymbol(contract, ret)
479+
return getERC20ContractSymbol(contract, ret)
480480
})
481481

482482
g.Go(func() error {
483-
return getContractTotalSupply(contract, ret)
483+
return getERC20ContractTotalSupply(contract, ret)
484484
})
485485

486486
g.Go(func() error {
487-
return getContractDecimals(contract, ret)
487+
return getERC20ContractDecimals(contract, ret)
488488
})
489489

490490
g.Go(func() error {

backend/pkg/commons/rpc/geth.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,15 @@ func (client *GethClient) GetERC20TokenMetadata(token []byte) (*types.ERC20Metad
345345
ret := &types.ERC20Metadata{}
346346

347347
g.Go(func() error {
348-
return getContractSymbol(contract, ret)
348+
return getERC20ContractSymbol(contract, ret)
349349
})
350350

351351
g.Go(func() error {
352-
return getContractTotalSupply(contract, ret)
352+
return getERC20ContractTotalSupply(contract, ret)
353353
})
354354

355355
g.Go(func() error {
356-
return getContractDecimals(contract, ret)
356+
return getERC20ContractDecimals(contract, ret)
357357
})
358358

359359
g.Go(func() error {

backend/pkg/commons/rpc/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func getLogsFromReceipts(logs []*gethtypes.Log) []*types.Eth1Log {
8484
return eth1Logs
8585
}
8686

87-
func getContractSymbol(contract *contracts.IERC20Metadata, ret *types.ERC20Metadata) error {
87+
func getERC20ContractSymbol(contract *contracts.IERC20Metadata, ret *types.ERC20Metadata) error {
8888
symbol, err := contract.Symbol(nil)
8989
if err != nil {
9090
if strings.Contains(err.Error(), "abi") {
@@ -99,7 +99,7 @@ func getContractSymbol(contract *contracts.IERC20Metadata, ret *types.ERC20Metad
9999
return nil
100100
}
101101

102-
func getContractTotalSupply(contract *contracts.IERC20Metadata, ret *types.ERC20Metadata) error {
102+
func getERC20ContractTotalSupply(contract *contracts.IERC20Metadata, ret *types.ERC20Metadata) error {
103103
totalSupply, err := contract.TotalSupply(nil)
104104
if err != nil {
105105
return fmt.Errorf("error retrieving total supply: %w", err)
@@ -108,7 +108,7 @@ func getContractTotalSupply(contract *contracts.IERC20Metadata, ret *types.ERC20
108108
return nil
109109
}
110110

111-
func getContractDecimals(contract *contracts.IERC20Metadata, ret *types.ERC20Metadata) error {
111+
func getERC20ContractDecimals(contract *contracts.IERC20Metadata, ret *types.ERC20Metadata) error {
112112
decimals, err := contract.Decimals(nil)
113113
if err != nil {
114114
return fmt.Errorf("error retrieving decimals: %w", err)

0 commit comments

Comments
 (0)