W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
當(dāng)從交易或智能合約同步地址時(shí),Moralis 會(huì)將它們標(biāo)準(zhǔn)化為小寫。 這使得基于地址創(chuàng)建查詢變得更加容易,因?yàn)樗恍枰獎(jiǎng)?chuàng)建校驗(yàn)和地址。 請(qǐng)確保在比較來自外部來源(如 ?MetaMask
?或 ?Etherscan
?)的地址時(shí),首先將其轉(zhuǎn)換為小寫。
// 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號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: