Sui
Through this example, you can learn how to deploy and upgrade smart contracts using SLSA. The code used here can be found at serializer and serializer_upgrade.
Note: SLSA on Blockchain requires user input at certain stages. SLSA on Blockchain secures the developer’s private key by not using GitHub secrets, instead obtaining signatures from an external wallet. Follow these steps to complete the process:
- Trigger the Workflow: Start the deployment process by triggering the workflow.
- Connect Wallet:
- The workflow will provide a link in the
connect-wallet
step.- Click on this link to open the front-end interface for wallet connection.
- Sign the Transaction:
- In the opened window, connect your external wallet.
- Follow the prompts to sign the transaction.
- Complete the Process:
- After signing, the workflow will automatically continue to deploy the smart contract to the blockchain.
Publish
Modify .github/workflows/slsa-on-move.yml
as follows:
Name | Description |
---|---|
move-compiler | Specify sui to compile Move for Sui. |
move-directory | Specify the location of Move.toml. |
The network to which it is deployed is determined by the rev = "framework/***"
in the [dependencies]
section of Move.toml.
Name | Description |
---|---|
framework/mainnet | mainnet |
framework/testnet | testnet |
framework/devnet | devent |
yml
name: Publish on Github
on:
push:
branches:
- main
permissions:
actions: read
contents: write
id-token: write
jobs:
build:
uses: zktx-io/slsa-on-move/.github/workflows/generator_generic_slsa3.yml@main
with:
move-compiler: "sui"
move-directory: "sui/serializer"
Upgrade
Modify .github/workflows/slsa-on-move.yml
as follows:
Name | Description |
---|---|
move-compiler | Specify sui to compile Move for Sui. |
move-directory | Specify the location of Move.toml. |
yml
name: Upgrade on Github
on:
push:
branches:
- main
permissions:
actions: read
contents: write
id-token: write
jobs:
build:
uses: zktx-io/slsa-on-move/.github/workflows/generator_generic_slsa3.yml@main
with:
move-compiler: "sui"
move-directory: "sui/serializer_upgrade"
Add Upgrade.toml to the same folder as Move.toml.
Name | Description |
---|---|
package_id | Published Packaged Object ID |
upgrade_cap | Upgrade Object ID |
toml
[upgrade]
package_id = "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
upgrade_cap = "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Github
Get started with SLSA on Move Example and learn by github