Skip to content

Commit e2fd4b2

Browse files
psy2848048nowooj
authored andcommitted
misc: renamed for aligning grpc message server
1 parent 08bfe05 commit e2fd4b2

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

precompile/auth/IAuth.abi

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "address"
88
}
99
],
10-
"name": "associatedAddress",
10+
"name": "account",
1111
"outputs": [
1212
{
1313
"internalType": "bytes",

precompile/auth/IAuth.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ IAuth constant AUTH_CONTRACT = IAuth(
88
);
99

1010
interface IAuth {
11-
function associatedAddress(address evmAddress) external view returns (bytes calldata addr);
11+
function account(address evmAddress) external view returns (bytes calldata addr);
1212
}

precompile/auth/auth.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ func (p PrecompiledAuth) Run(evm *vm.EVM, input []byte) ([]byte, error) {
6262
ctx := evm.StateDB.(*statedb.StateDB).GetContext()
6363

6464
switch MethodAuth(abiMethod.Name) {
65-
case AssociatedAddress:
66-
return p.associatedAddress(ctx, abiMethod, args)
65+
case Account:
66+
return p.account(ctx, abiMethod, args)
6767
default:
6868
return nil, errors.New("method not found")
6969
}
7070
}
7171

72-
func (p PrecompiledAuth) associatedAddress(ctx sdk.Context, method *abi.Method, args []interface{}) ([]byte, error) {
72+
func (p PrecompiledAuth) account(ctx sdk.Context, method *abi.Method, args []interface{}) ([]byte, error) {
7373
address, err := util.GetAccAddress(args[0])
7474
if err != nil {
7575
return nil, err

precompile/auth/const.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ const (
88
type MethodAuth string
99

1010
const (
11-
AssociatedAddress MethodAuth = "associatedAddress"
11+
Account MethodAuth = "account"
1212
)

tests/e2e/integration_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ func (t *EVMIntegrationTestSuite) Test09_InstantiateWithPrecompiledWasm() {
20472047

20482048
func (t *EVMIntegrationTestSuite) Test10_GetCosmwasmAddress() {
20492049
// common address
2050-
queryXplaAddressAbi, err := pauth.ABI.Pack(string(pauth.AssociatedAddress), t.UserWallet1.EthAddress)
2050+
queryXplaAddressAbi, err := pauth.ABI.Pack(string(pauth.Account), t.UserWallet1.EthAddress)
20512051
assert.NoError(t.T(), err)
20522052

20532053
encodedXplaAddress, err := t.EthClient.CallContract(context.Background(), ethereum.CallMsg{
@@ -2063,7 +2063,7 @@ func (t *EVMIntegrationTestSuite) Test10_GetCosmwasmAddress() {
20632063
}, nil)
20642064
assert.NoError(t.T(), err)
20652065

2066-
resXplaAddress, err := pauth.ABI.Unpack(string(pauth.AssociatedAddress), encodedXplaAddress)
2066+
resXplaAddress, err := pauth.ABI.Unpack(string(pauth.Account), encodedXplaAddress)
20672067
assert.NoError(t.T(), err)
20682068

20692069
xplaAddress := resXplaAddress[0].([]byte)
@@ -2098,7 +2098,7 @@ func (t *EVMIntegrationTestSuite) Test10_GetCosmwasmAddress() {
20982098
contractXplaAddress, contractEvmAddress, err := getContractAddressByBlockResultFromHeight(*res.BlockNumber)
20992099
assert.NoError(t.T(), err)
21002100

2101-
queryXplaContractAddressAbi, err := pauth.ABI.Pack(string(pauth.AssociatedAddress), contractEvmAddress)
2101+
queryXplaContractAddressAbi, err := pauth.ABI.Pack(string(pauth.Account), contractEvmAddress)
21022102
assert.NoError(t.T(), err)
21032103

21042104
encodedXplaContractAddress, err := t.EthClient.CallContract(context.Background(), ethereum.CallMsg{
@@ -2115,7 +2115,7 @@ func (t *EVMIntegrationTestSuite) Test10_GetCosmwasmAddress() {
21152115

21162116
assert.NoError(t.T(), err)
21172117

2118-
resXplaContractAddress, err := pauth.ABI.Unpack(string(pauth.AssociatedAddress), encodedXplaContractAddress)
2118+
resXplaContractAddress, err := pauth.ABI.Unpack(string(pauth.Account), encodedXplaContractAddress)
21192119
assert.NoError(t.T(), err)
21202120

21212121
xplaContractAddress := resXplaContractAddress[0].([]byte)

0 commit comments

Comments
 (0)