web3.utils.toChecksumAddress
将给定的大写或小写以太坊地址转换为校验和地址。
调用:
web3.utils.toChecksumAddress(address)
参数:
address
- String: 地址字符串
返回值:
String
: The checksum address.
示例代码:
web3.utils.toChecksumAddress('0xc1912fee45d61c87cc5ea59dae31190fffff2323');
> "0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d"
web3.utils.toChecksumAddress('0XC1912FEE45D61C87CC5EA59DAE31190FFFFF232D');
> "0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d" // 同上