Documentation
¶
Index ¶
Constants ¶
View Source
const Percentage = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthClient ¶
type EthClient interface {
ethereum.ChainReader
ethereum.TransactionReader
ethereum.ChainStateReader
ethereum.ContractCaller
ethereum.LogFilterer
BlockNumber(ctx context.Context) (uint64, error)
ChainID(ctx context.Context) (*big.Int, error)
Close()
}
type ISign ¶
type ISign interface {
// sign function receives raw message, not hash of message
Sign(message []byte, dataType string) ([]byte, error)
GetAddress() common.Address
}
func NewSignMethod ¶
func NewSignMethod(config *SignMethodConfig) (ISign, error)
type KmsSign ¶
func (*KmsSign) GetAddress ¶
type PrivateKeyConfig ¶
type PrivateKeyConfig struct {
PrivateKey string `json:"privateKey"`
}
type PrivateKeySign ¶
type PrivateKeySign struct {
// contains filtered or unexported fields
}
func NewPrivateKeySign ¶
func NewPrivateKeySign(plainPrivateKey string) (*PrivateKeySign, error)
func (*PrivateKeySign) GetAddress ¶
func (privateKeySign *PrivateKeySign) GetAddress() common.Address
type SignMethodConfig ¶
type Utils ¶
type Utils interface {
Invoke(any interface{}, name string, args ...interface{}) (reflect.Value, error)
LoadAbi(path string) (*abi.ABI, error)
GetArguments(a abi.ABI, name string, data []byte, isInput bool) (abi.Arguments, error)
UnpackToInterface(a abi.ABI, name string, data []byte, isInput bool, v interface{}) error
Title(text string) string
NewEthClient(url string) (EthClient, error)
SendContractTransaction(signMethod ISign, chainId *big.Int, gasLimitBumpRatio uint64, fn func(opts *bind.TransactOpts) (*types.Transaction, error)) (*types.Transaction, error)
SignTypedData(typedData core.TypedData, signMethod ISign) (hexutil.Bytes, error)
FilterLogs(client EthClient, opts *bind.FilterOpts, contractAddresses []common.Address, filteredMethods map[*abi.ABI]map[string]struct{}) ([]types.Log, error)
RlpHash(x interface{}) (h common.Hash)
UnpackLog(smcAbi abi.ABI, out interface{}, event string, data []byte) error
}
Click to show internal directories.
Click to hide internal directories.