Search Apps Documentation Source Content File Folder Download Copy Actions Download

migration_research_store.gno

1.72 Kb · 64 lines
 1package admin
 2
 3import "gno.land/p/g1nqnrt3aldzhu6zzeg75yw97wvavqy7wr77g56q/deploy-test/v0/v0/accesscontrol"
 4
 5const (
 6	MigrationResearchExpectedExplorerURL              = "https://pre-migration.akkadia.land"
 7	MigrationResearchExpectedFaucetTargetAmount int64 = 1000000
 8)
 9
10var (
11	MigrationResearchExpectedPendingAdmin = address("g1lg8w6keklpfyfzyure645ethfuahfgrhmlg8cu")
12	MigrationResearchExpectedFeeCollector = address("g1rdnjhf88gtpjr4l9jcqyrg6zkncw0tnjuh0t3a")
13	MigrationResearchExpectedProtocol     = address("g19cw6xhwak0k40ayphn2d37l26he972vtunkddg")
14	MigrationResearchExpectedOperator     = address("g1x8l886kqzdlqt8v0znrj89mhas0h242caseqe9")
15)
16
17var (
18	admin              address
19	pendingAdmin       address
20	explorerURL        string
21	feeCollectorAddr   address
22	protocolAddr       address
23	frozen             bool
24	faucetTargetAmount int64
25	operatorAddrs      map[address]bool = make(map[address]bool)
26)
27
28func IsAdmin(addr address) bool {
29	return addr == admin
30}
31
32func SetExplorerURL(cur realm, url string) {
33	accesscontrol.AssertIsAdmin(0, cur, IsAdmin)
34	explorerURL = url
35}
36
37func SetFeeCollector(cur realm, addr address) {
38	accesscontrol.AssertIsAdmin(0, cur, IsAdmin)
39	feeCollectorAddr = addr
40}
41
42func SetProtocol(cur realm, addr address) {
43	accesscontrol.AssertIsAdmin(0, cur, IsAdmin)
44	protocolAddr = addr
45}
46
47func SetOperator(cur realm, addr address) {
48	accesscontrol.AssertIsAdmin(0, cur, IsAdmin)
49	operatorAddrs[addr] = true
50}
51
52func UnsetOperator(cur realm, addr address) {
53	accesscontrol.AssertIsAdmin(0, cur, IsAdmin)
54	delete(operatorAddrs, addr)
55}
56
57func SetFaucetTargetAmount(cur realm, amount int64) {
58	accesscontrol.AssertIsAdmin(0, cur, IsAdmin)
59	faucetTargetAmount = amount
60}
61
62func GetFaucetTargetAmount() int64 {
63	return faucetTargetAmount
64}