Documentation ¶
Index ¶
- Variables
- func NewErrFeeDelegated(receipt *klayfee.Receipt, err error) error
- type BoundContract
- func (c *BoundContract) ABI() abi.ABI
- func (c *BoundContract) Address() common.Address
- func (c *BoundContract) Client() *client.Client
- func (c *BoundContract) DeployContract(opts *bind.TransactOpts, params ...interface{}) (common.Address, *types.Transaction, error)
- func (c *BoundContract) SetAddress(address common.Address)
- func (c *BoundContract) SetClient(client *client.Client)
- func (c *BoundContract) SetTransact(fn TransactFunc)
- func (c *BoundContract) Source() *sol.Contract
- func (c *BoundContract) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (c *BoundContract) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type ErrFeeDelegated
- type KeyCache
- type NonceCache
- type Peb
- func (p *Peb) Add(amount *Peb) *Peb
- func (p Peb) Bytes() []byte
- func (p *Peb) Div(m int64) *Peb
- func (p *Peb) Klay() float64
- func (p *Peb) Mul(m int64) *Peb
- func (p *Peb) Scan(v interface{}) error
- func (p *Peb) SplitEqual(parts int) []*Peb
- func (p *Peb) Ston() uint64
- func (p Peb) String() string
- func (p Peb) StringSton() string
- func (p *Peb) Sub(amount *Peb) *Peb
- func (p *Peb) ToInt() *big.Int
- func (p *Peb) Tokens() float64
- type TransactFunc
- type Uniquify
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoKeyStore = errors.New("no keystore or file for account") ErrKeyDecrypt = errors.New("private key decryption failed") )
var ErrNoCode = bind.ErrNoCode
Functions ¶
Types ¶
type BoundContract ¶
type BoundContract struct { *bind.BoundContract // contains filtered or unexported fields }
func BindContract ¶
func (*BoundContract) ABI ¶
func (c *BoundContract) ABI() abi.ABI
func (*BoundContract) Address ¶
func (c *BoundContract) Address() common.Address
func (*BoundContract) Client ¶
func (c *BoundContract) Client() *client.Client
func (*BoundContract) DeployContract ¶
func (c *BoundContract) DeployContract(opts *bind.TransactOpts, params ...interface{}) (common.Address, *types.Transaction, error)
DeployContract deploys a contract onto the Ethereum blockchain and binds the deployment address with a Go wrapper.
func (*BoundContract) SetAddress ¶
func (c *BoundContract) SetAddress(address common.Address)
func (*BoundContract) SetClient ¶
func (c *BoundContract) SetClient(client *client.Client)
func (*BoundContract) SetTransact ¶
func (c *BoundContract) SetTransact(fn TransactFunc)
func (*BoundContract) Source ¶
func (c *BoundContract) Source() *sol.Contract
func (*BoundContract) Transact ¶
func (c *BoundContract) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*BoundContract) Transfer ¶
func (c *BoundContract) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ErrFeeDelegated ¶ added in v1.2.1
type ErrFeeDelegated struct {
// contains filtered or unexported fields
}
func (*ErrFeeDelegated) Cause ¶ added in v1.2.2
func (e *ErrFeeDelegated) Cause() error
func (*ErrFeeDelegated) Error ¶ added in v1.2.1
func (e *ErrFeeDelegated) Error() string
func (*ErrFeeDelegated) Receipt ¶ added in v1.2.2
func (e *ErrFeeDelegated) Receipt() *klayfee.Receipt
type KeyCache ¶
type KeyCache interface { SetPath(account common.Address, path string) bool UnsetPath(account common.Address, path string) PrivateKey(account common.Address, password string) (key *ecdsa.PrivateKey, ok bool) SetPrivateKey(account common.Address, pk *ecdsa.PrivateKey) UnsetKey(account common.Address, password string) SignerFn(account common.Address, password string) bind.SignerFn }
func NewKeyCache ¶
func NewKeyCache() KeyCache
type NonceCache ¶
type NonceCache interface { Serialize(account common.Address, fn func() error) error Sync(account common.Address, syncFn func() (uint64, error)) Set(account common.Address, nonce uint64) Get(account common.Address) uint64 Incr(account common.Address) uint64 Decr(account common.Address) uint64 }
func NewNonceCache ¶
func NewNonceCache() NonceCache
type Peb ¶
func DecimalPeb ¶
func DecimalToPeb ¶
func (*Peb) SplitEqual ¶
SplitEqual splits the amount into n-1 equal amounts and one remainder. Example: (1000).SplitEqual(7) yields [142 142 142 142 142 142 148]
func (*Peb) Ston ¶
Ston is an unsafe way to represent Peb as uint64, used for gas price reporting and should not be used for math.
func (Peb) StringSton ¶
type TransactFunc ¶
type TransactFunc func(opts *bind.TransactOpts, contract *common.Address, input []byte) (*types.Transaction, error)
func NewFeeDelegatedTransactFunc ¶
func NewFeeDelegatedTransactFunc( chainID int, klayClient *client.Client, klayFeeClient klayfee.FeeDelegationClient, dryRun bool, ) TransactFunc
type Uniquify ¶
type Uniquify interface { // Call executes only one callable with same id at a time. // Multilpe asynchronous calls with same id will be executed sequentally. Call(id string, callable func() error) error }
Uniquify is a type of advanced mutex. It allows to create named resource locks.
func NewUniquify ¶
func NewUniquify() Uniquify
NewUniquify returns a new thread-safe uniquify object.