Documentation ¶
Index ¶
- type Pool
- func (p *Pool) Call(contract util.Uint160, operation string, params ...any) (*result.Invoke, error)
- func (p *Pool) CallAndExpandIterator(contract util.Uint160, method string, maxItems int, params ...any) (*result.Invoke, error)
- func (p *Pool) FetchHeight() []monitor.HeightData
- func (p *Pool) FetchState(height uint32) []monitor.StateData
- func (p *Pool) GetBlockCount() (uint32, error)
- func (p *Pool) GetCommittee() (keys.PublicKeys, error)
- func (p *Pool) GetContractStateByID(id int32) (*state.Contract, error)
- func (p *Pool) GetDesignatedByRole(role noderoles.Role, height uint32) (keys.PublicKeys, error)
- func (p *Pool) ResolveContract(contractName string) (util.Uint160, error)
- func (p *Pool) TerminateSession(_ uuid.UUID) error
- func (p *Pool) TraverseIterator(_ uuid.UUID, _ *result.Iterator, _ int) ([]stackitem.Item, error)
- type PrmPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool represent virtual connection to the Neo network to communicate with multiple Neo servers.
func (*Pool) Call ¶
Call returns the results after calling the smart contract scripthash with the given operation and parameters. NOTE: this is test invoke and will not affect the blockchain.
func (*Pool) CallAndExpandIterator ¶
func (p *Pool) CallAndExpandIterator(contract util.Uint160, method string, maxItems int, params ...any) (*result.Invoke, error)
CallAndExpandIterator creates a script containing a call of the specified method of a contract with given parameters (similar to how Call operates). But then this script contains additional code that expects that the result of the first call is an iterator.
func (*Pool) FetchHeight ¶
func (p *Pool) FetchHeight() []monitor.HeightData
func (*Pool) GetBlockCount ¶
GetBlockCount returns the number of blocks in the main chain.
func (*Pool) GetCommittee ¶
func (p *Pool) GetCommittee() (keys.PublicKeys, error)
GetCommittee returns the current public keys of NEO nodes in committee.
func (*Pool) GetContractStateByID ¶
GetContractStateByID queries contract information, according to the contract ID.
func (*Pool) GetDesignatedByRole ¶
GetDesignatedByRole invokes `getDesignatedByRole` method on a native RoleManagement contract.
func (*Pool) ResolveContract ¶
ResolveContract helps to take contract address by contract name. Name list can be taken from contract wrappers, for instance rpcnns.NameNetmap.
func (*Pool) TerminateSession ¶
TerminateSession closes the given session, returning an error if anything goes wrong. It's not strictly required to close the session (it'll expire on the server anyway), but it helps to release server resources earlier.