factprovider

package
v0.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Name               string
	ReputationPassport common.Address
	Website            string
}

Info holds fact provider information

type RegistryReader

type RegistryReader struct {
	*eth.Eth
	// contains filtered or unexported fields
}

RegistryReader reads public information of registered fact providers.

func NewRegistryReader

func NewRegistryReader(e *eth.Eth, factProviderRegistry common.Address) *RegistryReader

NewRegistryReader converts Ethereum backend to RegistryReader

func (*RegistryReader) GetFactProviderInfo

func (r *RegistryReader) GetFactProviderInfo(ctx context.Context, factProviderAddress common.Address) (*Info, error)

GetFactProviderInfo retrieves fact provider information given it's address. It returns nil when registry contains no information about fact provider.

type RegistryWriter

type RegistryWriter struct {
	*eth.Session
	// contains filtered or unexported fields
}

RegistryWriter allows to write to fact provider registry

func NewRegistryWriter

func NewRegistryWriter(s *eth.Session, factProviderRegistry common.Address) *RegistryWriter

NewRegistryWriter converts session to RegistryWriter

func (*RegistryWriter) DeleteFactProviderInfo

func (r *RegistryWriter) DeleteFactProviderInfo(ctx context.Context, factProvider common.Address) (common.Hash, error)

DeleteFactProviderInfo deletes information about fact provider from registry.

func (*RegistryWriter) DeleteFactProviderInfoNoWait

func (r *RegistryWriter) DeleteFactProviderInfoNoWait(ctx context.Context, factProvider common.Address) (common.Hash, error)

DeleteFactProviderInfoNoWait deletes information about fact provider from registry. This method does not wait for the transaction to be mined. Use the method without the NoWait suffix if you need to make sure that the transaction was successfully mined.

func (*RegistryWriter) SetFactProviderInfo

func (r *RegistryWriter) SetFactProviderInfo(ctx context.Context, factProvider common.Address, info *Info) (common.Hash, error)

SetFactProviderInfo writes information about fact provider into registry.

func (*RegistryWriter) SetFactProviderInfoNoWait

func (r *RegistryWriter) SetFactProviderInfoNoWait(ctx context.Context, factProvider common.Address, info *Info) (common.Hash, error)

SetFactProviderInfoNoWait writes information about fact provider into registry. This method does not wait for the transaction to be mined. Use the method without the NoWait suffix if you need to make sure that the transaction was successfully mined.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL