Unit ID
y/1Jl5s7ODrjZwzi/9kPkOBs1p7gJZznrqXqG6HypyA=
Received
15.08.2019 12:58:48
Confirmation delay (full node)
7 minutes 51 seconds
Confirmation delay (light node)
9 minutes 26 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 30000 }, "init": "{ // bounce_fees might cover premium so make min premium a bit expensive // varaibles to be filled on front end bu insurance service maker... $mcr = 110000; // minium capital requirement to activate this service... $expiration = 86400 * 360; // 12 months of cover $selected_arbiter = ''; // Address of selected arbiter to make final decision $min_premium = 100; // min premium to pay by single user one time to get certain amount of coverage $coverage_times = 12; // Premium amount multiply with this value, so here it could be 100 * 12 = 1200 $author_address = 'T77QBAHR4CN2G6KJ3BHMJLAAPU2WG2KG'; }", "messages": { "cases": [ { "if": "{trigger.data.investor AND var['close_investment'] == false}", "messages": [ { "if": "{balance[base] >= $mcr}", "app": "state", "state": "{ var['close_investments'] = true; // close further investments var['investments_locked'] = false; // only locked when a user buy insurance var['start_service'] = true; // Let users buy services var['capitalLocked'] = 0; var['investor_'||trigger.address] = trigger.output[[asset=base]]; // how much invested... }" } ] }, { "if": "{trigger.data.insured AND trigger.output[[asset=base]] >= $min_premium AND var['start_service'] == true}", "messages": [ { "if": "{($mcr - var['capitalLocked']) > (trigger.output[[asset=base]] * $coverage_times)}", "app": "state", "state": "{ var['insured_' || trigger.address] = trigger.output[[asset=base]] * $coverage_times; var['capitalLocked'] = var['capitalLocked'] + (trigger.output[[asset=base]] * $coverage_times); response['accepted_request'] = 'Your request to get insured is accepted, Your coverage is ' || (trigger.output[[asset=base]] * $coverage_times) || ' and you paid - ' || trigger.output[[asset=base]]; }" } ] } ] } } ]
Technical information
Fees:
2,285 bytes
(353 headers, 1932 payload)
Level:1000805
Witnessed level:1000797
Main chain index:999623
Latest included mc index:999622
Status:stable/confirmed/final