-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
samuel
committed
Feb 7, 2024
1 parent
744b769
commit 27754b1
Showing
1 changed file
with
2 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
package main | ||
|
||
import future.keywords.in | ||
|
||
permit[{"policyId": "test-permit-policy-1"}] = reason { | ||
users = {"[email protected]"} | ||
resources = {"eip155:eoa:0x90d03a8971a2faa19a9d7ffdcbca28fe826a289b"} | ||
transferTypes = {"transferNative"} | ||
tokens = {"eip155:137/slip44:966"} | ||
transferValueCondition = {"currency": "*", "operator": "lte", "value": "1000000000000000000"} | ||
approvalsRequired = [{ | ||
"approvalCount": 2, | ||
"countPrincipal": false, | ||
"approvalEntityType": "Narval::User", | ||
"entityIds": ["[email protected]", "[email protected]"], | ||
}] | ||
|
||
permit[{"policyId": "examplePermitPolicy"}] = reason { | ||
checkTransferResourceIntegrity | ||
checkPrincipal | ||
checkNonceExists | ||
checkAction({"signTransaction"}) | ||
checkPrincipalId({"[email protected]"}) | ||
|
@@ -28,15 +13,8 @@ permit[{"policyId": "test-permit-policy-1"}] = reason { | |
reason = {"type": "permit", "policyId": "examplePermitPolicy", "approvalsSatisfied": approvals.approvalsSatisfied, "approvalsMissing": approvals.approvalsMissing} | ||
} | ||
|
||
forbid[{"policyId": "test-forbid-policy-1"}] = reason { | ||
users = {"[email protected]"} | ||
resources = {"eip155:eoa:0x90d03a8971a2faa19a9d7ffdcbca28fe826a289b"} | ||
transferTypes = {"transferNative"} | ||
tokens = {"eip155:137/slip44:966"} | ||
limit = "1000000000000000000" | ||
|
||
forbid[{"policyId": "exampleForbidPolicy"}] = reason { | ||
checkTransferResourceIntegrity | ||
checkPrincipal | ||
checkNonceExists | ||
checkAction({"signTransaction"}) | ||
checkPrincipalId({"[email protected]"}) | ||
|