Skip to content

Commit f31428c

Browse files
LKY-stephentuky191
andauthored
18 support update move lock file (#19)
* update lock file for talus token * add test dependency for checking move.lock is properly used in dependency * add move.lock for deposit_pool and loyalty packages * remove loyalty lock file --------- Co-authored-by: tuky191 <michal@talus.network>
1 parent 9959b56 commit f31428c

File tree

5 files changed

+208
-0
lines changed

5 files changed

+208
-0
lines changed

Tests/dependency/Move.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "dependency"
3+
edition = "2024.beta"
4+
[dependencies]
5+
6+
Talus = {local = "../../talus"}
7+
[addresses]
8+
dependency = "0x0"
9+
10+

Tests/dependency/readme.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
## Dependency Test Contract
2+
This package contains a test contract designed to verify dependencies between the talus package and this package.
3+
4+
### Test Procedure
5+
1. Configure Client Environment
6+
Set up your Sui client for the desired network.
7+
8+
Devnet Configuration:
9+
10+
RPC: `https://rpc.ssfn.devnet.production.taluslabs.dev`
11+
12+
Faucet: `https://faucet.devnet.production.taluslabs.dev/gas`
13+
14+
Explorer: `https://explorer.devnet.taluslabs.dev/`
15+
16+
2. Fund Wallet
17+
Acquire at least two native SUI gas objects (coins) using the faucet link provided above or the Discord faucet.
18+
19+
3. Mint US Tokens
20+
Retrieve the required Object IDs (Faucet ID, Token IDs) from the registry files below:
21+
22+
Devnet: [objects.devnet.json](https://storage.googleapis.com/production-talus-tge-objects/v1.1.2/objects.devnet.json)
23+
24+
Testnet: [objects.testnet.json](https://storage.googleapis.com/production-talus-tge-objects/v1.1.2/objects.testnet.json)
25+
26+
Mainnet: [objects.mainnet.json](https://storage.googleapis.com/production-talus-tge-objects/v1.1.2/objects.mainnet.json)
27+
28+
Mint Command: Replace variables (starting with $) with the actual IDs found in the JSON files above.
29+
30+
```Bash
31+
sui client call --package <faucet package id> --module faucet --function mint \
32+
--type-args <token package id>::us::US \
33+
--type-args 0x2::sui::SUI \
34+
--args <faucet object id> \
35+
--args <sui coin id> \
36+
--dry-run
37+
```
38+
39+
Important: After minting, record your US Token Object ID. Ensure the `<token package id>` used matches the address defined in ../../talus/Move.lock under the corresponding environment and the faucet is under the same deployment sequence.
40+
41+
4. Publish and Test
42+
Publish the package and execute the dependency test function.
43+
44+
```Bash
45+
# 1. Publish the package
46+
sui client publish . --dry-run
47+
48+
# 2. Call the test function
49+
# Replace <dependency package id> with the ID generated from the publish step
50+
# Replace <US token id> with the ID obtained in Step 3
51+
sui client call --package <dependency package id> --module test --function half --arg
52+
53+
```
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module dependency::test;
2+
3+
use std::vector::destroy;
4+
use sui::coin::Coin;
5+
use talus::us::US;
6+
7+
entry fun half(coin: &mut Coin<US>, ctx: &mut TxContext) {
8+
destroy!(coin.divide_into_n<US>(2, ctx), |c| transfer::public_transfer(c, ctx.sender()));
9+
}

deposit_pool/Move.lock

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# @generated by Move, please check-in and do not edit manually.
2+
3+
[move]
4+
version = 3
5+
manifest_digest = "7CFAF8F3456E301142CA0BD60E328682016FD104E6D3153B95B1E6CAD18471F6"
6+
deps_digest = "F9B494B64F0615AED0E98FC12A85B85ECD2BC5185C22D30E7F67786BB52E507C"
7+
dependencies = [
8+
{ id = "Bridge", name = "Bridge" },
9+
{ id = "MoveStdlib", name = "MoveStdlib" },
10+
{ id = "Sui", name = "Sui" },
11+
{ id = "SuiSystem", name = "SuiSystem" },
12+
]
13+
14+
[[move.package]]
15+
id = "Bridge"
16+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/bridge" }
17+
18+
dependencies = [
19+
{ id = "MoveStdlib", name = "MoveStdlib" },
20+
{ id = "Sui", name = "Sui" },
21+
{ id = "SuiSystem", name = "SuiSystem" },
22+
]
23+
24+
[[move.package]]
25+
id = "MoveStdlib"
26+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/move-stdlib" }
27+
28+
[[move.package]]
29+
id = "Sui"
30+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/sui-framework" }
31+
32+
dependencies = [
33+
{ id = "MoveStdlib", name = "MoveStdlib" },
34+
]
35+
36+
[[move.package]]
37+
id = "SuiSystem"
38+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/sui-system" }
39+
40+
dependencies = [
41+
{ id = "MoveStdlib", name = "MoveStdlib" },
42+
{ id = "Sui", name = "Sui" },
43+
]
44+
45+
[move.toolchain-version]
46+
compiler-version = "1.59.1"
47+
edition = "2024.beta"
48+
flavor = "sui"
49+
50+
[env]
51+
52+
[env.devnet]
53+
chain-id = "bce509ad"
54+
original-published-id = "0xc99109ca2cf2d092478dbadbaf2ff5336cdf1dcb7c44dd1bc1dcbf3ec41f1214"
55+
latest-published-id = "0xc99109ca2cf2d092478dbadbaf2ff5336cdf1dcb7c44dd1bc1dcbf3ec41f1214"
56+
published-version = "1"
57+
58+
[env.testnet]
59+
chain-id = "4c78adac"
60+
original-published-id = "0xc365af41f5715ef3fa19045a0c6cc1f6478c1b5227935a154684d163e68d3bb4"
61+
latest-published-id = "0xc365af41f5715ef3fa19045a0c6cc1f6478c1b5227935a154684d163e68d3bb4"
62+
published-version = "1"
63+
64+
[env.mainnet]
65+
chain-id = "35834a8a"
66+
original-published-id = "0xfbffcc854d3f510e82deecf0d891ed30d85e0f31c4a9173826d3b422c72539fd"
67+
latest-published-id = "0xfbffcc854d3f510e82deecf0d891ed30d85e0f31c4a9173826d3b422c72539fd"
68+
published-version = "1"

talus/Move.lock

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# @generated by Move, please check-in and do not edit manually.
2+
3+
[move]
4+
version = 3
5+
manifest_digest = "004ADF4C9C5C4DA7656FA4070322896D7A715D32E800222D8D9E71B4D7CBD62A"
6+
deps_digest = "F9B494B64F0615AED0E98FC12A85B85ECD2BC5185C22D30E7F67786BB52E507C"
7+
dependencies = [
8+
{ id = "Bridge", name = "Bridge" },
9+
{ id = "MoveStdlib", name = "MoveStdlib" },
10+
{ id = "Sui", name = "Sui" },
11+
{ id = "SuiSystem", name = "SuiSystem" },
12+
]
13+
14+
[[move.package]]
15+
id = "Bridge"
16+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/bridge" }
17+
18+
dependencies = [
19+
{ id = "MoveStdlib", name = "MoveStdlib" },
20+
{ id = "Sui", name = "Sui" },
21+
{ id = "SuiSystem", name = "SuiSystem" },
22+
]
23+
24+
[[move.package]]
25+
id = "MoveStdlib"
26+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/move-stdlib" }
27+
28+
[[move.package]]
29+
id = "Sui"
30+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/sui-framework" }
31+
32+
dependencies = [
33+
{ id = "MoveStdlib", name = "MoveStdlib" },
34+
]
35+
36+
[[move.package]]
37+
id = "SuiSystem"
38+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "494fa6ede17f366f1cd850f01ccb9f42dc75c470", subdir = "crates/sui-framework/packages/sui-system" }
39+
40+
dependencies = [
41+
{ id = "MoveStdlib", name = "MoveStdlib" },
42+
{ id = "Sui", name = "Sui" },
43+
]
44+
45+
[move.toolchain-version]
46+
compiler-version = "1.59.1"
47+
edition = "2024.beta"
48+
flavor = "sui"
49+
50+
[env]
51+
52+
[env.devnet]
53+
chain-id = "bce509ad"
54+
original-published-id = "0x3beeda15fb0a3f8407af0267fe941963d15fb60dd1e769415d832a1da97f101c"
55+
latest-published-id = "0x3beeda15fb0a3f8407af0267fe941963d15fb60dd1e769415d832a1da97f101c"
56+
published-version = "1"
57+
58+
[env.testnet]
59+
chain-id = "4c78adac"
60+
original-published-id = "0x5f1861ac8198fae5dc6ec79e435d653d08167187ad8c0522c34f34c372853c5a"
61+
latest-published-id = "0x5f1861ac8198fae5dc6ec79e435d653d08167187ad8c0522c34f34c372853c5a"
62+
published-version = "1"
63+
64+
[env.mainnet]
65+
chain-id = "35834a8a"
66+
original-published-id = "0xee962a61432231c2ede6946515beb02290cb516ad087bb06a731e922b2a5f57a"
67+
latest-published-id = "0xee962a61432231c2ede6946515beb02290cb516ad087bb06a731e922b2a5f57a"
68+
published-version = "1"

0 commit comments

Comments
 (0)