简体   繁体   中英

How can I get string address from tx.sender in RIDE?

我正在使用 RIDE 编写智能合约,我需要将发件人地址作为字符串获取,在 RIDE 中可以实现吗?

Yes it's possible. you can get the string address as following:

let senderAddress = addressFromPublicKey(tx.senderPublicKey) 

Or

let senderAddress= toBase58String(addressFromPublicKey(tx.senderPublicKey).bytes)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM