2018-05-22 11:16:57 +00:00
|
|
|
package sharding
|
|
|
|
|
2018-06-02 22:29:35 +00:00
|
|
|
import (
|
|
|
|
"math/big"
|
|
|
|
|
|
|
|
ethereum "github.com/ethereum/go-ethereum"
|
|
|
|
"github.com/ethereum/go-ethereum/accounts"
|
|
|
|
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
|
|
|
"github.com/ethereum/go-ethereum/sharding/contracts"
|
|
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ShardingClient defines a service that provides full control and shared access of
|
|
|
|
// necessary components for a sharded Ethereum blockchain.
|
|
|
|
type ShardingClient interface {
|
2018-05-22 11:16:57 +00:00
|
|
|
Start() error
|
2018-06-02 22:29:35 +00:00
|
|
|
Close() error
|
|
|
|
Context() *cli.Context
|
|
|
|
CreateTXOpts(*big.Int) (*bind.TransactOpts, error)
|
|
|
|
ChainReader() ethereum.ChainReader
|
|
|
|
Account() *accounts.Account
|
|
|
|
SMCCaller() *contracts.SMCCaller
|
|
|
|
SMCTransactor() *contracts.SMCTransactor
|
|
|
|
DepositFlagSet() bool
|
|
|
|
DataDirFlag() string
|
|
|
|
}
|
2018-05-22 11:16:57 +00:00
|
|
|
|
2018-06-02 22:29:35 +00:00
|
|
|
// ShardingActor refers to either a notary, proposer, or observer.
|
|
|
|
type ShardingActor interface {
|
|
|
|
Start() error
|
2018-05-22 11:16:57 +00:00
|
|
|
Stop() error
|
|
|
|
}
|