forked from AstraProtocol/astra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
erc20maliciousdelayed.go
37 lines (28 loc) · 968 Bytes
/
erc20maliciousdelayed.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
package contracts
import (
_ "embed" // embed compiled smart contract
"encoding/json"
"github.com/ethereum/go-ethereum/common"
evmtypes "github.com/evmos/evmos/v12/x/evm/types"
"github.com/evmos/evmos/v12/x/erc20/types"
)
// This is an evil token. Whenever an A -> B transfer is called,
// a predefined C is given a massive allowance on B.
var (
//go:embed compiled_contracts/ERC20MaliciousDelayed.json
ERC20MaliciousDelayedJSON []byte // nolint: golint
// ERC20MaliciousDelayedContract is the compiled erc20 contract
ERC20MaliciousDelayedContract evmtypes.CompiledContract
// ERC20MaliciousDelayedAddress is the erc20 module address
ERC20MaliciousDelayedAddress common.Address
)
func init() {
ERC20MaliciousDelayedAddress = types.ModuleAddress
err := json.Unmarshal(ERC20MaliciousDelayedJSON, &ERC20MaliciousDelayedContract)
if err != nil {
panic(err)
}
if len(ERC20MaliciousDelayedContract.Bin) == 0 {
panic("load contract failed")
}
}