Skip to content

Commit

Permalink
fix: EVMAddress() in contractIdentity
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemmsilva committed Sep 14, 2023
1 parent ece88d0 commit 0a87348
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/isc/contract_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (c *ContractIdentity) Hname() (Hname, error) {
}

func (c *ContractIdentity) EVMAddress() (common.Address, error) {
if c.kind == contractIdentityKindHname {
if c.kind == contractIdentityKindEthereum {
return c.evmAddr, nil
}
return common.Address{}, fmt.Errorf("not an EVM contract")
Expand Down
1 change: 1 addition & 0 deletions packages/vm/core/accounts/stateaccess.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func (sa *StateAccess) AccountExists(agentID isc.AgentID, chainID isc.ChainID) b
return accountExists(sa.state, agentID, chainID)
}

// converts an account key from the accounts contract (shortform without chainID) to an AgentID
func AgentIDFromKey(key kv.Key, chainID isc.ChainID) (isc.AgentID, error) {
if len(key) < isc.ChainIDLength {
// short form saved (withoutChainID)
Expand Down

0 comments on commit 0a87348

Please sign in to comment.