thanks all works only i need to know how to put decimals after 18 bcz i put decimals with seprator function it is quite complicated , can i use .tofixed ?
can u tell me sir
big thnks to you
thanks all works only i need to know how to put decimals after 18 bcz i put decimals with seprator function it is quite complicated , can i use .tofixed ?
can u tell me sir
big thnks to you
maybe you can use Moralis.Units: https://docs.moralis.io/moralis-server/tools/moralis-units
can you give an example of what you want to do, what is the input and what you want to be the output?
Just like usercpt balance is showing 10000000000000000000000
I want to show it like 18 decimals from left side 10000.00000000000000000000
Iâm doing document.getElementById(âcptâ).innerHTML = value.tofixed(18);
But it not works
x = Moralis.Units.FromWei('10000000000000000000000')
=>
10000
All is working fine sir thnxx and before launching our dapp I have to contact moralis team ?
for example, if you need a better server for production, then you can send an email to [email protected]
Okhhh thnks but one prblm is I want to get the tokens holder number in website is there any api here in moralis to get holders number or any other way bcz I did not find any function which I call and get holders number !
there isnât an API from what I know to give you that number, if you donât have too many transactions you could sync in your Moralis server db all the transactions for that contract address and maybe compute from those transactions the number of holders
Ohkk if the contract have over 5000 holders then it is possible in that case ?
5000 holders is not too much, it should be possible
Any youtube tutorials for sync contracts and get all transaction?
You only have to add the contract address to watch address and it should start to sync all the transactions for that contract address. If you have events, you can also sync specific events for that smart contract in a separate table.
sir
! i sync contract address to watch transaction but there is all transactions but i want transaction only for a spefic even i say like onlym transfer of cpt tokens and i try it shows abi is wrong can u check or i do in wrong way âŚThat topic is not ok for sure, it doesnât have to have spaces. Can you paste abi for that event and the topic?
Yeahhh I copy abi for same event
Thatâs my token
event Transfer(address , address , uint256 );```
abi
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: âaddressâ,
name: âfromâ,
type: âaddressâ
},
{
indexed: true,
internalType: âaddressâ,
name: âtoâ,
type: âaddressâ
},
{
indexed: false,
internalType: âuint256â,
name: âvalueâ,
type: âuint256â
}
],
name: âTransferâ,
type: âeventâ
}
the topic should be: Transfer(address,address,uint256)
still invalid abi showing