5.4 标识符(Identifiers)

Addresses in Sway are similar to EVM addresses. The two major differences are:

Sway中的地址与EVM的地址相似。两个主要区别是:

  1. Sway addresses are 32 bytes long (instead of 20) Sway中的地址长度是32字节(而不是20字节)

  2. Sway addresses are computed with the SHA-256 hash of the public key instead of the keccak-256 hash. Sway地址是用公钥的SHA-256哈希值而不是keccak-256哈希值计算的。

Contracts, on the other hand, are uniquely identified with a contract ID rather than an address. A contract's ID is also 32 bytes long and is calculated here.

另一方面,合约是用一个合约 ID 而不是地址来唯一识别的。一个合约的 ID 也是32个字节长,并在这里计算。

Last updated