Simple Usage PSce

As we see below page , system generates some constants such as EXECUTER_ADDRESS, OWNER_ADDRESS

 async function init()
{
// Your code goes here...
 // You can execute only you 

 if (EXECUTER_ADDRESS!==OWNER_ADDRESS) 
 return "You dont have permission for execute this scenario!"; 

 var dummyTest=await Transaction.getBalance(EXECUTER_ADDRESS);
 return dummyTest;
}

If your address doesn't match with EXECUTER_OWNER address , you wont execute this scenario because of code line 6th condition.

 var dummyTest=await Transaction.getBalance(EXECUTER_ADDRESS);

When we executed above code system gives us below response;

{
  "error": 0,
  "name": "PIRI",
  "symbol": "PIRI",
  "logo": "/images/piri.png",
  "assetID": -1,
  "address": "PRTMRKWZ56v4D8mV1oj813bqTgdfUm9J4woVTDMpGxF",
  "frozen": [],
  "balance": "6411.16548965"
}

Last updated