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

Commit

Permalink
add context fetching panels (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddentao committed Mar 13, 2020
1 parent e1e683f commit 0b29588
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions contracts/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,84 @@
}
]
},
{
"id": "genContext",
"title": "ACL: Generate context for address",
"inputs": [
{
"name": "contractAddress",
"title": "ACL contract address",
"description": "The address of the ACL contract",
"type": "address",
"initialValue": "@constant[aclAddress]",
"validation": [
{
"type": "allowedTypes",
"contract": true
}
]
},
{
"name": "address",
"title": "Address",
"type": "address"
}
],
"execs": [
{
"type": "call",
"contract": "ACL",
"method": "generateContextFromAddress",
"address": "@input[contractAddress]",
"args": {
"_addr": "@input[address]"
},
"saveResultAsInput": "generatedContext"
}
],
"outputs": [
{
"title": "Generated context",
"type": "string",
"value": "@input[generatedContext]"
}
]
},
{
"id": "getContextForContract",
"title": "Get contract's own context",
"description": "This only works for contracts which talk to the ACL.",
"inputs": [
{
"name": "contractAddress",
"title": "Contract address",
"description": "The address of the contract",
"type": "address",
"validation": [
{
"type": "allowedTypes",
"contract": true
}
]
}
],
"execs": [
{
"type": "call",
"contract": "AccessControl",
"method": "aclContext",
"address": "@input[contractAddress]",
"saveResultAsInput": "aclContext"
}
],
"outputs": [
{
"title": "Contract's own context",
"type": "string",
"value": "@input[aclContext]"
}
]
},
{
"id": "assignRole",
"title": "ACL: Assign role",
Expand Down

0 comments on commit 0b29588

Please sign in to comment.