-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathContractTransparency.go
102 lines (86 loc) · 3.91 KB
/
ContractTransparency.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package evm
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// file generated by ethereum tooling to help calling the "visibilityRules" function
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
_ = abi.ConvertType
)
const (
topic1 uint8 = iota
topic2
topic3
sender
everyone
)
const (
transparent uint8 = iota
private
)
// ContractTranspMetaData contains all meta data concerning the TransparencyConfig contract.
var ContractTranspMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"name\":\"visibilityRules\",\"outputs\":[{\"components\":[{\"internalType\":\"enumContractTransparencyConfig.ContractCfg\",\"name\":\"contractCfg\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"eventSignature\",\"type\":\"bytes32\"},{\"internalType\":\"enumContractTransparencyConfig.Field[]\",\"name\":\"visibleTo\",\"type\":\"uint8[]\"}],\"internalType\":\"structContractTransparencyConfig.EventLogConfig[]\",\"name\":\"eventLogConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structContractTransparencyConfig.VisibilityConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]",
}
// ContractTransparencyConfigEventLogConfig is an auto generated low-level Go binding around an user-defined struct.
type ContractTransparencyConfigEventLogConfig struct {
EventSignature common.Hash
VisibleTo []uint8
}
// ContractTransparencyConfigVisibilityConfig is an auto generated low-level Go binding around an user-defined struct.
type ContractTransparencyConfigVisibilityConfig struct {
ContractCfg uint8
EventLogConfigs []ContractTransparencyConfigEventLogConfig
}
// TransparencyConfig is an auto generated Go binding around an Ethereum contract.
type TransparencyConfig struct {
TransparencyConfigCaller // Read-only binding to the contract
}
// TransparencyConfigCaller is an auto generated read-only Go binding around an Ethereum contract.
type TransparencyConfigCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// NewTransparencyConfigCaller creates a new read-only instance of TransparencyConfig, bound to a specific deployed contract.
func NewTransparencyConfigCaller(address common.Address, caller bind.ContractCaller) (*TransparencyConfigCaller, error) {
contract, err := bindContractTransp(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &TransparencyConfigCaller{contract: contract}, nil
}
// bindContractTransp binds a generic wrapper to an already deployed contract.
func bindContractTransp(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := ContractTranspMetaData.GetAbi()
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
}
// VisibilityRules is a free data retrieval call binding the contract method 0x30173dd1.
//
// Solidity: function visibilityRules() pure returns((bool,(bytes,bool,bool,bool,bool,bool)[]))
func (_ContractTransp *TransparencyConfigCaller) VisibilityRules(opts *bind.CallOpts) (ContractTransparencyConfigVisibilityConfig, error) {
var out []interface{}
err := _ContractTransp.contract.Call(opts, &out, "visibilityRules")
if err != nil {
return *new(ContractTransparencyConfigVisibilityConfig), err
}
out0 := *abi.ConvertType(out[0], new(ContractTransparencyConfigVisibilityConfig)).(*ContractTransparencyConfigVisibilityConfig)
return out0, err
}