In this Example we wil use the same library, theta.php to interact with the ETH RPC. This is a very powerful example and every function call creates an API call. Please limit you API calls to 1 per second or launch your own ETH RPC.
Get a Theta Address Nounce
Get Current Chain Id
Get Address tFuel Balance
Get The Current Gas Price
Get The Current Block
Return a Block By Number
Return a TNT-20 Contract Name
Return a TNT-20 Contract Symbol
Return a TNT-20 Contract Decimals
Return the Balance of TNT-20 Tokens an Address Holds (divide by 10^decimals for actual tokens)
If your contract requires multiple variables such as a function like "getAddress(uint,address,string)" seperate the params with a comma "1,0x00..000,helloworld"
© 2022 Thetascan.io