apxtrib/nationchains/socialworld/contracts/town_base.js

36 lines
1.0 KiB
JavaScript
Raw Normal View History

2023-03-27 05:52:21 +00:00
/*
Town contract:town_base
*/
const Contract={
object:"town",
id:"town_base",
version:"0.0.0",
dt_create:"20230307",
dt_update:"",
info:"https://apxtrib.crabdance.com/town_base.html",
};
Contract.trigger = ()=>{
// Identification of rule to trig
// Create token for a tribe =>
}
Contract.druidAllowedtoCreateToken = (tokenconf, hashtokenconf)=>{
/*
@tokenconf ={
tokenvalue: float value in apxtr,
quantity: int number of token,
druidId: uuid,
costrequest: float cost of this in apxtr to the mayorId
}
Check balance druid wallet
@return {status:200, data:{transacId:blocktimestamp,tokens:[token1, token2, ...]}
{status:<>200, info:'error message'}
Store transaction in open block with transacId
A token = druidUuid_hash(with blockchain elected privatekey)
Druid can sale his token with his rules at a tribe level but any user that request an exchange ffrom a token
*/
}
module.exports = Contract;