W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
當從交易或智能合約同步地址時,Moralis 會將它們標準化為小寫。 這使得基于地址創(chuàng)建查詢變得更加容易,因為它不需要創(chuàng)建校驗和地址。 請確保在比較來自外部來源(如 ?MetaMask
?或 ?Etherscan
?)的地址時,首先將其轉換為小寫。
// this is a checksum address (note the mixed cases)
let address = "0xEDe998b7BdE2467732b748613a1Aab4e5528dE15";
// In order to make queries based on the address you can convert it to lowercase
address = address.toLowerCase();
// Now we can use the address in our queries
const query = new Moralis.Query("EthTokenBalance");
query.equalTo("owner_of", address);
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯系方式:
更多建議: