Documentation ¶
Index ¶
- Constants
- Variables
- func ConstructSRC20ProposalDataHash(handler seroCommon.Address, recipient seroCommon.Address, amount *big.Int) [32]byte
- func ConstructSRC721ProposalDataHash(handler seroCommon.Address, recipient seroCommon.Address, tokenId *big.Int, ...) [32]byte
- func NewListener(conn Connection, chainDB *chains.ChainDB, cfg *Config, log log.Logger, ...) *listener
- func NewWriter(conn Connection, cfg *Config, log log.Logger, stop <-chan int, ...) *writer
- type Chain
- type Config
- type Connection
Constants ¶
View Source
const BlockRetryLimit = 5
View Source
const DefaultBlockConfirmations = 12
View Source
const DefaultGasLimit = 6721975
View Source
const DefaultGasPrice = 10000000000
View Source
const ExecuteBlockWatchLimit = 100
Number of blocks to wait for an finalization event
Variables ¶
View Source
var ( AccountEndpointOpt = "accountEndpoint" BridgeOpt = "bridge" NFTBridgeOpt = "nftBridge" MaxGasPriceOpt = "maxGasPrice" GasLimitOpt = "gasLimit" HttpOpt = "http" StartBlockOpt = "startBlock" BlockConfirmationsOpt = "blockConfirmations" SignMsgStartSeqOpt = "signMsgStartSeq" VoteProposalStartSeqOpt = "voteProposalStartSeq" ExecuteProposalStartSeqOpt = "executeProposalStartSeqOpt" )
Chain specific options
View Source
var BlockRetryInterval = time.Second * 10
View Source
var CancelledStatus uint8 = 4
View Source
var ErrFatalQuery = errors.New("query of chain state failed")
View Source
var ErrFatalTx = errors.New("submission of transaction failed")
View Source
var ErrNonceTooLow = errors.New("nonce too low")
View Source
var ErrTxUnderpriced = errors.New("replacement transaction underpriced")
View Source
var PassedStatus uint8 = 2
View Source
var TransferredStatus uint8 = 3
View Source
var WatchDuration = 60 * 30 // 30 Minute
Functions ¶
func ConstructSRC20ProposalDataHash ¶
func ConstructSRC20ProposalDataHash(handler seroCommon.Address, recipient seroCommon.Address, amount *big.Int) [32]byte
func ConstructSRC721ProposalDataHash ¶
func ConstructSRC721ProposalDataHash(handler seroCommon.Address, recipient seroCommon.Address, tokenId *big.Int, metadata []byte) [32]byte
func NewListener ¶
func NewListener(conn Connection, chainDB *chains.ChainDB, cfg *Config, log log.Logger, stop <-chan int, sysErr chan<- error, m *metrics.ChainMetrics) *listener
NewListener creates and returns a listener
func NewWriter ¶
func NewWriter(conn Connection, cfg *Config, log log.Logger, stop <-chan int, sysErr chan<- error, m *metrics.ChainMetrics) *writer
NewWriter creates and returns writer
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func InitializeChain ¶
func InitializeChain(chainCfg *core.ChainConfig, chainDB *chains.ChainDB, logger log.Logger, sysErr chan<- error, m *metrics.ChainMetrics) (*Chain, core.ProposalState, error)
func (*Chain) LatestBlock ¶
func (c *Chain) LatestBlock() metrics.LatestBlock
type Config ¶
type Config struct { SignMsgStartSeq *big.Int VoteProposalStartSeq *big.Int ExecuteProposalStartSeq *big.Int // contains filtered or unexported fields }
Config encapsulates all necessary parameters in ethereum compatible forms
type Connection ¶
type Connection interface { Connect() error Keypair() *secp256k1.Keypair Opts() *bind.TransactOpts CallOpts() *bind.CallOpts LockAndUpdateOpts() error UnlockOpts() Client() *sero.WrappedClient EnsureHasBytecode(address seroCommon.Address) error LatestBlock() (*big.Int, error) WaitForBlock(block *big.Int) error Close() }
Click to show internal directories.
Click to hide internal directories.