Initia
Deploy Scripts
Script is a MOVE program that performs a transaction on the blockchain to encapsulate logic that is meant to be executed only once, as opposed to modules, which are collections of code that can be reused and invoked multiple times. You can read more about Script in Initia Docs
Uploading Your .mv
File
- Connect your wallet to Celatone
- Navigate to the “Deploy Script” in the left Side bar.
- Click “Click to upload or drag .mv file here” to select your
.mv
file, or drag the file into the designated area. The file size must not exceed 1.05MB. - Once selected, the interface will display the script inputs:
type_args
andargs
.
Configuring Script Inputs
Read more about generics in Initia Docs.
- type_args:
- These are type arguments required by your script function.
- Specify each type argument using the correct format, for instance,
0x1::native::u64
.
- args:
- These are the actual arguments that the script function will use during execution.
- Provide the arguments as required by the script, such as integers (
u64
), strings, etc.
- If an error message appears after you attempt to deploy the script, review the message to understand what went wrong. Common errors may relate to type verification or incorrect arguments. Ensure that
type_args
andargs
match what the script expects.
Executing the Script
- After verifying that all inputs are correct, review the transaction fee that will be charged for deploying the script.
- Click “Execute Script” to deploy your script to the blockchain.
- You will see a confirmation message with transaction hash upon successful execution.
- If the script execution fails, refer to the error message, adjust the inputs accordingly, and try again.
Was this page helpful?