-
Notifications
You must be signed in to change notification settings - Fork 0
/
erc20demurrage.go
68 lines (53 loc) · 1.25 KB
/
erc20demurrage.go
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
package erc20demurrage
import (
_ "embed"
"github.com/grassrootseconomics/celoutils/v2"
"github.com/grassrootseconomics/ge-publish/pkg/util"
)
type (
ERC20Demurrage struct {
Constructor []any
}
)
const (
name = "ERC20Demurrage"
version = "v0.5.6"
license = "AGPL-3.0"
source = "https://github.com/nolash/erc20-demurrage-token/tree/dev-0.5.6/solidity"
solidityVersion = "0.8.25+commit.b61c2a91"
evmFork = "istanbul"
gasLimit = 6_000_000
)
var (
//go:embed ERC20Demurrage.bin
bin string
//go:embed ERC20Demurrage.json
abi string
)
func (c *ERC20Demurrage) Name() string {
return name
}
func (c *ERC20Demurrage) Version() string {
return version
}
func (c *ERC20Demurrage) License() string {
return license
}
func (c *ERC20Demurrage) Source() string {
return source
}
func (c *ERC20Demurrage) SolidityVersion() string {
return solidityVersion
}
func (c *ERC20Demurrage) EVMFork() string {
return evmFork
}
func (c *ERC20Demurrage) ConstructorArgs() []string {
return util.DumpConstructorArgs(c.Constructor)
}
func (c *ERC20Demurrage) Bytecode() ([]byte, error) {
return celoutils.PrepareContractBytecodeData(bin, abi, c.Constructor)
}
func (c *ERC20Demurrage) MaxGasLimit() uint64 {
return gasLimit
}