contract

package
v0.0.0-...-41b1be1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const EthAbs18 = 1000000000000000000

EthAbs18 ...

View Source
const PrivateKey = `` /* 3243-byte string literal not displayed */

PrivateKey ...

View Source
const PublicKey = `` /* 1801-byte string literal not displayed */

PublicKey ...

View Source
const TimeStampFormat = "20060102"

TimeStampFormat ...

Variables

View Source
var DefaultDHCAddress = "0x8a4eaf49809f936c6f94e28210a73cf3d8b82ff6"

DefaultDHCAddress ... var DefaultDHCAddress = "0x89b92612b9795f8bfed840df9a33a0a3d6745250" var DefaultDHCAddress = "0x25cf28eb90427b8fb63baa19d8c9d23b55a12289"

View Source
var DefaultGasLimit = "0x7A1200"

DefaultGasLimit ...

View Source
var DefaultGatway = "http://127.0.0.1:8545"

DefaultGatway ... var DefaultGatway = "http://139.196.215.224:8545" var DefaultGatway = "http://13.124.213.107:8545"

View Source
var DefaultMessageAddress = "0x4833267bde3aa043803a1fa8c3e071f708367da4"

DefaultMessageAddress ...

View Source
var DefaultNodeAddress = "0x3c87dad9055b8075a8515d5c5a68d72d0d2c099e"

DefaultNodeAddress ...

View Source
var DefaultTagAddress = "0x8d64f6d57c7ee984cce09f89969f706216ac03d9"

DefaultTagAddress ...

View Source
var DefaultTransferAddress = "0x945d35cd4a6549213e8d37feb5d708ec98906902"

DefaultTransferAddress ...

Functions

func CompareNoCap

func CompareNoCap(a, b string) int

CompareNoCap ...

func MustJSON

func MustJSON(s string, e error) string

MustJSON ...

Types

type CallOpts

type CallOpts func(c *Contract, opts *bind.CallOpts) error

CallOpts ...

type Contract

type Contract struct {
	// contains filtered or unexported fields
}

Contract ...

func NewContract

func NewContract(opts ...Options) *Contract

NewContract ...

func (*Contract) AddEveryDay

func (c *Contract) AddEveryDay(no ...string) (e error)

AddEveryDay ...

func (*Contract) AddHot

func (c *Contract) AddHot(no ...string) (e error)

AddHot ...

func (*Contract) AddNodes

func (c *Contract) AddNodes(copyOld bool, ts time.Time, ss ...string) (e error)

AddNodes ...

func (*Contract) AddOrUpdateVideo

func (c *Contract) AddOrUpdateVideo(no string, message VideoMessage, update bool) (e error)

AddOrUpdateVideo ...

func (*Contract) AddTagVideos

func (c *Contract) AddTagVideos(tag string, date string, no ...string) (e error)

AddTagVideos ...

func (*Contract) AddVideo

func (c *Contract) AddVideo(no string, message VideoMessage) (e error)

AddVideo ...

func (*Contract) Call

func (c *Contract) Call(ctx context.Context, opt CallOpts) error

Call ...

func (*Contract) Close

func (c *Contract) Close()

Close ...

func (*Contract) DeployDHC

func (c *Contract) DeployDHC(name, symbol string, decimal uint8) (addr *common.Address, e error)

DeployDHC ...

func (*Contract) DeployMessage

func (c *Contract) DeployMessage() (addr *common.Address, e error)

DeployMessage ...

func (*Contract) DeployNode

func (c *Contract) DeployNode() (addr *common.Address, e error)

DeployNode ...

func (*Contract) DeployTag

func (c *Contract) DeployTag(msgAddr *common.Address) (addr *common.Address, e error)

DeployTag ...

func (*Contract) Ethereum

func (c *Contract) Ethereum(address common.Address) (i uint64, e error)

Ethereum ...

func (*Contract) GetBalance

func (c *Contract) GetBalance(address common.Address) (b int64, e error)

GetBalance ...

func (*Contract) GetNodes

func (c *Contract) GetNodes(ts time.Time) ([]string, *big.Int, error)

GetNodes ...

func (*Contract) GetSymbol

func (c *Contract) GetSymbol() (s string, e error)

GetSymbol ...

func (*Contract) GetTagVideos

func (c *Contract) GetTagVideos(tag, date string) (v []VideoMessage, i int64, e error)

GetTagVideos ...

func (*Contract) GetVersion

func (c *Contract) GetVersion(device int64) (version string, hash string, e error)

GetVersion ...

func (*Contract) GetVideo

func (c *Contract) GetVideo(no string) (messages VideoMessage, err error)

GetVideo ...

func (*Contract) GetVideos

func (c *Contract) GetVideos(no string) (messages []VideoMessage, size int64, err error)

GetVideos ...

func (*Contract) Mint

func (c *Contract) Mint(addr common.Address, val int64) (e error)

Mint ...

func (*Contract) OpenMessageAuthority

func (c *Contract) OpenMessageAuthority() (e error)

OpenMessageAuthority ...

func (*Contract) Primary

func (c *Contract) Primary(addr common.Address) (e error)

Primary ...

func (*Contract) Register

func (c *Contract) Register(p Type, v interface{})

Register ...

func (*Contract) RemoveNode

func (c *Contract) RemoveNode(idx int)

RemoveNode ...

func (*Contract) SetVersion

func (c *Contract) SetVersion(device int64, version string, hash string) (e error)

SetVersion ...

func (*Contract) Transact

func (c *Contract) Transact(ctx context.Context, opt TransactOpts) error

Transact ...

func (*Contract) Transfer

func (c *Contract) Transfer(from common.Address, val int64) (e error)

Transfer ...

func (*Contract) TransferEthereum

func (c *Contract) TransferEthereum(to common.Address, val int64) (e error)

TransferEthereum ...

func (*Contract) UnlockDo

func (c *Contract) UnlockDo(account string, pass string, fn func(*Contract)) (err error)

UnlockDo ...

func (*Contract) UpdateVideo

func (c *Contract) UpdateVideo(no string, message VideoMessage) (e error)

UpdateVideo ...

type Options

type Options func(c *Contract)

Options ...

func ETHClient

func ETHClient(addr string) Options

ETHClient ...

func FileKey

func FileKey(path string, pass string) Options

FileKey ...

func HashCoin

func HashCoin(addr string) Options

HashCoin ...

func HexKey

func HexKey(key string) Options

HexKey ...

func Message

func Message(addr string) Options

Message ...

func Node

func Node(addr string) Options

Node ...

func Tag

func Tag(addr string) Options

Tag ...

type TransactOpts

type TransactOpts func(c *Contract, opts *bind.TransactOpts) (*types.Transaction, error)

TransactOpts ...

type Type

type Type int

Type ...

const (
	None Type = iota
	WriteAble
	DMessage
	DNode
	DTag
	DHC
)

None ...

type VideoMessage

type VideoMessage struct {
	ID      string `json:"id"`
	Content string `json:"content"`
	Version string `json:"version"`
}

VideoMessage ...

func DecodeMessage

func DecodeMessage(s string) (m VideoMessage, e error)

DecodeMessage ...

func DecodeMessages

func DecodeMessages(s []string) (m []VideoMessage, e error)

DecodeMessages ...

func (VideoMessage) Encode

func (m VideoMessage) Encode() (s string, e error)

Encode ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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