-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcontract.hcl
80 lines (70 loc) · 2.61 KB
/
contract.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# A contract file describes a contract specification
contracts {
# A unique ID (ex: com.mywebsite.com.myname).
# If not provided, a UUID v4 ID is generated.
id = "local"
# Contract source location and information
repo {
# The pubic github repository
url = "https://github.com/ellcrys/contract-example"
# The github release tag or commit id (default: latest release)
version = "26b2427dc5092dedf13e97a16a95afeb019262ec"
# The contract source code language
language = "go"
# Specify the ID of another cocoon to link to.
# The contract will have the same privileges of the linked contract
# and will become participate in load balancing requests coming into
# the linked cocoon code.
# Both contracts must be owned by same identity.
link = ""
}
# Provide build information if the contract code requires it
build {
# The package manager to use (supported: glide, govendor)
pkgMgr = "govendor"
}
# Resources to allocate to the contract's cocoon
resources {
set = "s2"
}
# Provide signatory information
signatories {
# The maximum number of signatories to accept
max = 1
# The number of signature required to approve a release
threshold = 1
}
# Access control list stanza allows the contract
# to allow or deny access to perform specific operations by other contracts.
acl {
# Allow all operations but deny the ability to create ledgers
"*" = "allow deny-create-ledger deny-get"
}
# Firewall stanza determines the addresses the contract
# can make outbound connections to.
firewall {
# If enabled, the contract will not be able to make outbound connections (Default: true)
enabled = true
# Firewall rules for outbound connections.
# IP and DNS name is allowed. DNS name will be automatically resolved.
rule = {
destination = "google.com"
destinationPort = "80"
protocol = "tcp"
}
}
# Set environment variable. Use flags to
# enable special directives for individual variables.
# @private flag will cause the value to never show up in any publicly accessible channel
# @genRand32 generates a 32 byte random string
env {
"MY_VAR" = "some value 2"
"MY_VAR2@unpin_once,private" = "yo"
"SOME" = "THING"
}
env {
"MY_VAR" = "some value 2"
"MY_VAR2@unpin_once,private" = "yo"
"SOME" = "THING",
}
}