Documentation
¶
Index ¶
- func EndBlock(start uint64, nblocks uint64) *uint64
- func GetLastProcessedBlock(dbPath string, eventType string) uint64
- func HasEnoughSignaturesMC(ctx context.Context, sc *sidechain.SideChain, sealerAddr common.Address, ...) (bool, error)
- func MsgHash(contractAddress common.Address, txHash common.Hash, toAddress common.Address, ...) common.Hash
- func ParseSignature(sig []byte) (v uint8, r, s common.Hash)
- func PersistLastBlock(dbPath string, eventType string, blockNumber uint64)
- func ProcessMCDeposits(ctx context.Context, auth *bind.TransactOpts, mc *mainchain.MainChain, ...)
- func ProcessSCDeposits(ctx context.Context, auth *bind.TransactOpts, mc *mainchain.MainChain, ...)
- func ProcessSCSignatureAdded(ctx context.Context, auth *bind.TransactOpts, mc *mainchain.MainChain, ...)
- func Sign(msgHash common.Hash, key *ecdsa.PrivateKey) (v uint8, r, s common.Hash, err error)
- func SubmitSignatureMC(ctx context.Context, sideChainWalletAddress common.Address, ...) (*types.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLastProcessedBlock ¶
GetLastProcessedBlock returns the last processed block number from a file
func HasEnoughSignaturesMC ¶
func HasEnoughSignaturesMC(ctx context.Context, sc *sidechain.SideChain, sealerAddr common.Address, txHash common.Hash) (bool, error)
HasEnoughSignaturesMC checks if a transaction got enough signature to be withdrawn on the main chain
func MsgHash ¶
func MsgHash( contractAddress common.Address, txHash common.Hash, toAddress common.Address, value *big.Int, data []byte, version uint8) common.Hash
MsgHash returns the sha3 sum of 0x19, contractAddress, txHash, toAddress, value, data and version
func ParseSignature ¶
ParseSignature parses a ECDSA signature and returns v, r, s
func PersistLastBlock ¶
PersistLastBlock saves the last processed block to a file
func ProcessMCDeposits ¶
func ProcessMCDeposits(ctx context.Context, auth *bind.TransactOpts, mc *mainchain.MainChain, sc *sidechain.SideChain, dbPath string, start uint64, end *uint64, wg *sync.WaitGroup)
ProcessMCDeposits watches the main chain and for each Deposit calls SubmitTransactionSC on the side chain
func ProcessSCDeposits ¶
func ProcessSCDeposits(ctx context.Context, auth *bind.TransactOpts, mc *mainchain.MainChain, sc *sidechain.SideChain, addr common.Address, key *ecdsa.PrivateKey, dbPath string, start uint64, end *uint64, wg *sync.WaitGroup)
ProcessSCDeposits watches the side chain and for each Deposit calls SubmitSignatureMC on the side chain
func ProcessSCSignatureAdded ¶
func ProcessSCSignatureAdded(ctx context.Context, auth *bind.TransactOpts, mc *mainchain.MainChain, sc *sidechain.SideChain, dbPath string, start uint64, end *uint64, wg *sync.WaitGroup)
ProcessSCSignatureAdded watches the side chain and for each SignatureAdded calls SubmitTransaction on the main chain
func SubmitSignatureMC ¶
func SubmitSignatureMC( ctx context.Context, sideChainWalletAddress common.Address, auth *bind.TransactOpts, sc *sidechain.SideChain, event *sidechain.SideChainDeposit, key *ecdsa.PrivateKey, ) (*types.Transaction, error)
SubmitSignatureMC submits a signature on the sidechain that will be later checked on the mainchain
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
icn
command
|
|
|
icn-deploy
command
Command line utility to deploy the multisig wallets
|
Command line utility to deploy the multisig wallets |
|
icn-deposit
command
Utility to perform a transfer to another address on the other chain using the wallet
|
Utility to perform a transfer to another address on the other chain using the wallet |