Documentation ¶
Index ¶
- Constants
- func PrintUsage(w io.Writer, c *cli.Command)
- type ContractMetadata
- type CutMode
- type DeployMode
- type DeploymentData
- type DiamondBox
- type FacetCut
- type LoupeFacet
- type LoupeMode
- type MockBoundContract
- type MockEthereumWrapper
- func (m *MockEthereumWrapper) Close()
- func (m *MockEthereumWrapper) Dial(rawurl string) (*ethclient.Client, error)
- func (m *MockEthereumWrapper) GetClient() *ethclient.Client
- func (m *MockEthereumWrapper) HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
- func (m *MockEthereumWrapper) NetworkID(ctx context.Context) (*big.Int, error)
- func (m *MockEthereumWrapper) NewKeyedTransactorWithChainID(key *ecdsa.PrivateKey, chainID *big.Int) (*bind.TransactOpts, error)
- func (m *MockEthereumWrapper) SetClient(client *ethclient.Client)
- func (m *MockEthereumWrapper) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- type Mode
- type ModeFactory
Constants ¶
View Source
const ( Add uint8 = 0 Replace uint8 = 1 Remove uint8 = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContractMetadata ¶
type ContractMetadata struct { ABI abi.ABI `json:"abi"` Bytecode struct { Object string `json:"object"` } `json:"bytecode"` MethodIdentifiers map[string]string `json:"methodIdentifiers"` AST struct { Nodes []struct { Name string `json:"name"` } `json:"nodes"` } `json:"ast"` }
func GetContractMetadataByFile ¶
func GetContractMetadataByFile(path string) (ContractMetadata, error)
type CutMode ¶
type CutMode struct {
// contains filtered or unexported fields
}
func (*CutMode) GetCommands ¶
func (*CutMode) PrintUsage ¶
func (c *CutMode) PrintUsage()
type DeployMode ¶
type DeployMode struct {
// contains filtered or unexported fields
}
func (*DeployMode) GetCommands ¶
func (d *DeployMode) GetCommands() *cli.Command
func (*DeployMode) PrintUsage ¶
func (d *DeployMode) PrintUsage()
type DeploymentData ¶
type DiamondBox ¶
type DiamondBox struct { Config config.Config Sugar *zap.SugaredLogger Mode Mode Eth *ethereum.EthereumWrapper Contracts map[string]ContractMetadata }
func NewDiamondBox ¶
func NewDiamondBox(config config.Config, sugar *zap.SugaredLogger, modeName string, rpcId string, chainId *big.Int, ) (*DiamondBox, error)
func (*DiamondBox) Close ¶
func (box *DiamondBox) Close()
func (*DiamondBox) Run ¶
func (box *DiamondBox) Run()
type LoupeFacet ¶
type LoupeMode ¶
type LoupeMode struct {
// contains filtered or unexported fields
}
func (*LoupeMode) GetCommands ¶
func (*LoupeMode) PrintUsage ¶
func (l *LoupeMode) PrintUsage()
type MockBoundContract ¶
MockBoundContract is a mock object that implements the BoundContract interface.
func (*MockBoundContract) Call ¶
func (m *MockBoundContract) Call(opts *bind.CallOpts, results *[]interface{}, method string, params ...interface{}) error
func (*MockBoundContract) Transact ¶
func (m *MockBoundContract) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
type MockEthereumWrapper ¶
MockEthereumWrapper is a mock object that implements the EthereumWrapper interface.
func (*MockEthereumWrapper) Close ¶
func (m *MockEthereumWrapper) Close()
func (*MockEthereumWrapper) Dial ¶
func (m *MockEthereumWrapper) Dial(rawurl string) (*ethclient.Client, error)
func (*MockEthereumWrapper) GetClient ¶
func (m *MockEthereumWrapper) GetClient() *ethclient.Client
func (*MockEthereumWrapper) HexToECDSA ¶
func (m *MockEthereumWrapper) HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
func (*MockEthereumWrapper) NewKeyedTransactorWithChainID ¶
func (m *MockEthereumWrapper) NewKeyedTransactorWithChainID(key *ecdsa.PrivateKey, chainID *big.Int) (*bind.TransactOpts, error)
func (*MockEthereumWrapper) SetClient ¶
func (m *MockEthereumWrapper) SetClient(client *ethclient.Client)
func (*MockEthereumWrapper) SuggestGasPrice ¶
type Mode ¶
type Mode interface { Execute(cmd *cli.Command, flags *pflag.FlagSet, params ...interface{}) error GetCommands() *cli.Command PrintUsage() }
func NewCutMode ¶
func NewCutMode(box *DiamondBox) Mode
func NewDeployMode ¶
func NewDeployMode(box *DiamondBox) Mode
func NewLoupeMode ¶
func NewLoupeMode(box *DiamondBox) Mode
type ModeFactory ¶
type ModeFactory struct {
// contains filtered or unexported fields
}
func NewModeFactory ¶
func NewModeFactory(box *DiamondBox) *ModeFactory
func (*ModeFactory) CreateMode ¶
func (f *ModeFactory) CreateMode(name string) Mode
Click to show internal directories.
Click to hide internal directories.