Documentation ¶
Index ¶
- Constants
- Variables
- func ExpandAccountPlaceholders(addresses map[string]string, b []byte) []byte
- func ExpandBalancePlaceholders(mockup Mockup, b []byte) []byte
- type CallContractArgument
- type ContractCache
- type MichelsonFormat
- type Mockup
- func (m *Mockup) Bootstrap() error
- func (m Mockup) CacheAccountAddress(name string, address string)
- func (m Mockup) CacheContract(name string, code ast.Node) error
- func (m Mockup) ContainsAddress(name string) bool
- func (m Mockup) GetBalance(name string) Mutez
- func (m Mockup) GetCachedContract(name string) ContractCache
- func (m Mockup) GetContractStorage(contractName string) (ast.Node, error)
- func (m Mockup) ImportSecret(privateKey string, walletName string) error
- func (m Mockup) NormalizeData(data string, dataType string, mode ParsingMode) (ast.Node, error)
- func (m *Mockup) Originate(sender string, contractName string, amount Mutez, code string, storage string) (string, error)
- func (m Mockup) RevealWallet(walletName string, revealFee Mutez) error
- func (m *Mockup) SerializeData(dataNode string, typeNode string) (string, error)
- func (m Mockup) Teardown() error
- func (m Mockup) Transfer(arg CallContractArgument) error
- func (m Mockup) UpdateChainID(chainID string) error
- func (m Mockup) UpdateHeadBlockLevel(level int32) error
- func (m Mockup) UpdateHeadBlockTimestamp(timestamp string) error
- type Mutez
- type ParsingMode
- type Tez
- type TezosClientArgument
- type TezosClientArgumentKind
Constants ¶
const ( COMMAND TezosClientArgumentKind = iota Mode BaseDirectory Protocol ProtocolConstants BootstrapAccounts BurnCap Fee Init Arg Entrypoint UnparsingMode // Parsing modes Readable ParsingMode = "Readable" Optimized ParsingMode = "Optimized" // Michelson Formats Michelson MichelsonFormat = "michelson" JSON MichelsonFormat = "json" )
Variables ¶
var ( PLACEHOLDER__ADDRESS_OF_ACCOUNT = "TEST__ADDRESS_OF_ACCOUNT__" PLACEHOLDER__BALANCE_OF_ACCOUNT = "TEST__BALANCE_OF_ACCOUNT__" )
Functions ¶
func ExpandAccountPlaceholders ¶
ExpandAccountPlaceholders expands the real account address from a placeholder that identifies the account
func ExpandBalancePlaceholders ¶
ExpandBalancePlaceholders expands the account balance from a placeholder that identifies the account
Types ¶
type CallContractArgument ¶
type ContractCache ¶
type MichelsonFormat ¶
type MichelsonFormat string
type Mockup ¶
type Mockup struct { TaskID string Protocol string Config config.Config Addresses map[string]string // contains filtered or unexported fields }
func (Mockup) CacheAccountAddress ¶
CacheAddress caches the address of a contract by name
func (Mockup) CacheContract ¶
CacheContract caches contract information
func (Mockup) ContainsAddress ¶
ContainsAddress checks if address exists
func (Mockup) GetBalance ¶
GetBalance fetches the balance of a given address (implicit account or originated contract)
func (Mockup) GetCachedContract ¶
func (m Mockup) GetCachedContract(name string) ContractCache
GetCachedContract get contract from cache
func (Mockup) GetContractStorage ¶
GetContractStorage fetches the storage of a given contract
func (Mockup) ImportSecret ¶
func (Mockup) NormalizeData ¶
NormalizeData normalize a data expression against a gicen type
func (*Mockup) Originate ¶
func (m *Mockup) Originate(sender string, contractName string, amount Mutez, code string, storage string) (string, error)
Originate deploys a smart contract
func (Mockup) RevealWallet ¶
RevealWallet reveals wallet
func (*Mockup) SerializeData ¶
SerializeData serializes a michelson value
func (Mockup) Transfer ¶
func (m Mockup) Transfer(arg CallContractArgument) error
Transfer calls a given address
func (Mockup) UpdateChainID ¶
UpdateChainID updates the chain identifier in the mockup context
func (Mockup) UpdateHeadBlockLevel ¶
UpdateHeadBlockLevel updates the level of the head block in the mockup context
func (Mockup) UpdateHeadBlockTimestamp ¶
UpdateHeadBlockTimestamp updates the timestamp of the head block in the mockup context
type Mutez ¶
type Mutez struct {
// contains filtered or unexported fields
}
func MutezOfFloat ¶
MutezOfFloat construct a Mutez value from big.Float
func MutezOfString ¶
MutezOfString construct a Mutez value from a string
type ParsingMode ¶
type ParsingMode string
type Tez ¶
type Tez struct {
// contains filtered or unexported fields
}
func TezOfFloat ¶
TezOfFloat construct a Tez value from big.Float
func TezOfString ¶
TezOfString construct a Tez value from a string
type TezosClientArgument ¶
type TezosClientArgument struct { Kind TezosClientArgumentKind Parameters []string }
type TezosClientArgumentKind ¶
type TezosClientArgumentKind int8