forked from evmos/evmos
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherc20.go
38 lines (28 loc) · 1014 Bytes
/
erc20.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
// Copyright Tharsis Labs Ltd.(Evmos)
// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE)
package contracts
import (
_ "embed" // embed compiled smart contract
"encoding/json"
"github.com/ethereum/go-ethereum/common"
evmtypes "github.com/evmos/evmos/v14/x/evm/types"
"github.com/evmos/evmos/v14/x/erc20/types"
)
var (
//go:embed compiled_contracts/ERC20MinterBurnerDecimals.json
ERC20MinterBurnerDecimalsJSON []byte //nolint: golint
// ERC20MinterBurnerDecimalsContract is the compiled erc20 contract
ERC20MinterBurnerDecimalsContract evmtypes.CompiledContract
// ERC20MinterBurnerDecimalsAddress is the erc20 module address
ERC20MinterBurnerDecimalsAddress common.Address
)
func init() {
ERC20MinterBurnerDecimalsAddress = types.ModuleAddress
err := json.Unmarshal(ERC20MinterBurnerDecimalsJSON, &ERC20MinterBurnerDecimalsContract)
if err != nil {
panic(err)
}
if len(ERC20MinterBurnerDecimalsContract.Bin) == 0 {
panic("load contract failed")
}
}