Documentation ¶
Index ¶
- func GenerateBurnTokensScript(env Environment) []byte
- func GenerateCreateAccountPrivateForwarderScript(env Environment) []byte
- func GenerateCreateForwarderScript(env Environment) []byte
- func GenerateCreatePrivateForwarderScript(env Environment) []byte
- func GenerateCreateTokenScript(env Environment) []byte
- func GenerateDeployPrivateForwardingScript() []byte
- func GenerateInspectSupplyScript(env Environment) []byte
- func GenerateInspectSupplyViewScript(env Environment) []byte
- func GenerateInspectVaultScript(env Environment) []byte
- func GenerateMintTokensScript(env Environment) []byte
- func GenerateSetupAccountFromAddressScript(fungibleTokenAddr, fungibleTokenMVAddr string) []byte
- func GenerateSetupAccountPrivateForwarderScript(env Environment) []byte
- func GenerateTransferGenericVaultWithAddressScript(fungibleTokenAddr, ftMetadataViewsAddr string) []byte
- func GenerateTransferGenericVaultWithPathsScript(fungibleTokenAddr string) []byte
- func GenerateTransferManyAccountsScript(env Environment) []byte
- func GenerateTransferPrivateManyAccountsScript(env Environment) []byte
- func GenerateTransferVaultScript(env Environment) []byte
- func MakeFirstLowerCase(s string) string
- func ReplaceAddresses(code string, env Environment) string
- type Environment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBurnTokensScript ¶
func GenerateBurnTokensScript(env Environment) []byte
GenerateBurnTokensScript creates a script that uses the admin resource to destroy tokens and deposit them in a Vault
func GenerateCreateAccountPrivateForwarderScript ¶ added in v0.7.0
func GenerateCreateAccountPrivateForwarderScript(env Environment) []byte
func GenerateCreateForwarderScript ¶
func GenerateCreateForwarderScript(env Environment) []byte
GenerateCreateForwarderScript creates a script that instantiates a new forwarder instance in an account
func GenerateCreatePrivateForwarderScript ¶ added in v0.7.0
func GenerateCreatePrivateForwarderScript(env Environment) []byte
GenerateCreateForwarderScript creates a script that instantiates a new forwarder instance in an account
func GenerateCreateTokenScript ¶
func GenerateCreateTokenScript(env Environment) []byte
GenerateCreateTokenScript creates a script that instantiates a new Vault instance and stores it in storage. balance is an argument to the Vault constructor. The Vault must have been deployed already.
func GenerateDeployPrivateForwardingScript ¶ added in v0.7.0
func GenerateDeployPrivateForwardingScript() []byte
func GenerateInspectSupplyScript ¶
func GenerateInspectSupplyScript(env Environment) []byte
GenerateInspectSupplyScript creates a script that reads the total supply of tokens in existence and makes assertions about the number
func GenerateInspectSupplyViewScript ¶ added in v1.0.0
func GenerateInspectSupplyViewScript(env Environment) []byte
GenerateInspectSupplyViewScript creates a script that reads the total supply of tokens in existence through a metadata view
func GenerateInspectVaultScript ¶
func GenerateInspectVaultScript(env Environment) []byte
GenerateInspectVaultScript creates a script that retrieves a Vault from the array in storage and makes assertions about its balance. If these assertions fail, the script panics.
func GenerateMintTokensScript ¶
func GenerateMintTokensScript(env Environment) []byte
GenerateMintTokensScript creates a script that uses the admin resource to mint new tokens and deposit them in a Vault
func GenerateSetupAccountFromAddressScript ¶ added in v1.0.0
GenerateSetupGenericVaultScript creates a script that instantiates a new Vault instance and stores it in storage. It can be used to create any token as long as you know the address of the contract and the name of the contract
func GenerateSetupAccountPrivateForwarderScript ¶ added in v0.7.0
func GenerateSetupAccountPrivateForwarderScript(env Environment) []byte
func GenerateTransferGenericVaultWithAddressScript ¶ added in v1.0.0
func GenerateTransferGenericVaultWithAddressScript(fungibleTokenAddr, ftMetadataViewsAddr string) []byte
GenerateTransferGenericVaultWithAddressScript creates a script that withdraws an tokens from an account and deposits it to another account's vault for any vault type using the contract's address and name as arguments
func GenerateTransferGenericVaultWithPathsScript ¶ added in v1.0.0
GenerateTransferGenericVaultWithPathsScript creates a script that withdraws an tokens from an account and deposits it to another account's vault for any vault type using paths as arguments
func GenerateTransferManyAccountsScript ¶ added in v0.7.0
func GenerateTransferManyAccountsScript(env Environment) []byte
GenerateTransferManyAccountsScript creates a script that transfers the same number of tokens to a list of accounts
func GenerateTransferPrivateManyAccountsScript ¶ added in v0.7.0
func GenerateTransferPrivateManyAccountsScript(env Environment) []byte
func GenerateTransferVaultScript ¶
func GenerateTransferVaultScript(env Environment) []byte
GenerateTransferVaultScript creates a script that withdraws an tokens from an account and deposits it to another account's vault
func MakeFirstLowerCase ¶
MakeFirstLowerCase makes the first letter in a string lowercase
func ReplaceAddresses ¶ added in v1.0.0
func ReplaceAddresses(code string, env Environment) string
Types ¶
type Environment ¶ added in v1.0.0
type Environment struct { Network string FungibleTokenAddress string ExampleTokenAddress string TokenForwardingAddress string PrivateForwardingAddress string MetadataViewsAddress string FungibleTokenMetadataViewsAddress string ViewResolverAddress string BurnerAddress string SwitchboardAddress string }