Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
admin ui panels: do heartbeat, get next premium, pay next premium
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddentao committed Mar 18, 2020
1 parent eaa86ca commit 808b1b7
Showing 1 changed file with 7 additions and 70 deletions.
77 changes: 7 additions & 70 deletions contracts/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,91 +529,28 @@
]
},
{
"id": "createPolicy",
"title": "Entity: Create a policy",
"description": "Only those in the policy creator rolegroup can do this.",
"id": "heartbeat",
"title": "Policy: Heartbeat",
"description": "Anyone can call this",
"inputs": [
{
"name": "contractAddress",
"title": "Entity contract address",
"title": "Policy address",
"type": "address",
"validation": [
{
"type": "allowedTypes",
"contract": true
}
]
},
{
"name": "unit",
"title": "Payment unit",
"type": "address",
"validation": [
{
"type": "allowedTypes",
"contract": true
}
]
},
{
"name": "initiationDate",
"title": "Initiation date",
"type": "int",
"initialValue": "1735603200"
},
{
"name": "startDate",
"title": "Start date",
"type": "int",
"initialValue": "1735603200"
},
{
"name": "maturationDate",
"title": "Maturation date",
"type": "int",
"initialValue": "1735603200"
},
{
"name": "premiumIntervalSeconds",
"title": "Premium interval (seconds)",
"type": "int",
"initialValue": "5"
},
{
"name": "brokerCommissionBP",
"title": "Broker commission basis-points",
"type": "int",
"initialValue": "0"
},
{
"name": "assetManagerCommissionBP",
"title": "Asset mgr commission basis-points",
"type": "int",
"initialValue": "0"
},
{
"name": "naymsCommissionBP",
"title": "Nayms commission basis-points",
"type": "int",
"initialValue": "0"
}
],
"execs": [
{
"type": "send",
"contract": "EntityImpl",
"method": "createPolicy",
"address": "@input[contractAddress]",
"args": {
"_initiationDate": "@input[initiationDate]",
"_startDate": "@input[startDate]",
"_maturationDate": "@input[maturationDate]",
"_unit": "@input[unit]",
"_premiumIntervalSeconds": "@input[premiumIntervalSeconds]",
"_brokerCommissionBP": "@input[brokerCommissionBP]",
"_assetManagerCommissionBP": "@input[assetManagerCommissionBP]",
"_naymsCommissionBP": "@input[naymsCommissionBP]"
}
"contract": "PolicyImpl",
"method": "checkAndUpdateState",
"address": "@input[contractAddress]"
}
]
},
Expand Down

0 comments on commit 808b1b7

Please sign in to comment.