PSce Accumulator Object

PSDATA constant data Acc. Object has been stored each PSce primitive or JSON based datas. And we can say that Each PSce can hold its own data.

Developers can model their needs data with PSDATA.

async function putScenarioBaseData(param,val)
{
    PSDATA[param]=val;
    await Map.saveMap(JSON.stringify(PSDATA));
}

 async function getScenarioBasedData(param)
{
    return PSDATA[param];
}

If we give an example above function

async function init()
{
    PSDATA["myKey"]="myValue";
    await Map.saveMap(JSON.stringify(PSDATA));
    // return a transactionHash
}
async function getMyData()
{
    return PSDATA["myKey"];
    // returns "myValue";
}

When user execute set function ,system will start to create a new transaction to deliver other nodes.

Last updated