Skip to content

Commit

Permalink
fix: update iota dependencies to v0.7.0-alpha and removal of proposal…
Browse files Browse the repository at this point in the history
… incase it is remove
  • Loading branch information
itsyaasir authored and wulfraem committed Nov 20, 2024
1 parent 4e34b1a commit 8d30555
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/kinesis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ identity_stronghold = { path = "../../identity_stronghold", default-features = f
"send-sync-storage",
] }
identity_sui_name_tbd = { path = "../../identity_sui_name_tbd" }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk" }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v0.7.0-alpha" }
iota-sdk-legacy = { package = "iota-sdk", version = "1.0", default-features = false, features = [
"tls",
"client",
Expand Down
8 changes: 4 additions & 4 deletions identity_sui_name_tbd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ identity_eddsa_verifier = { version = "=1.2.0", path = "../identity_eddsa_verifi
identity_iota_core = { version = "=1.2.0", path = "../identity_iota_core" }
identity_jose = { version = "=1.2.0", path = "../identity_jose" }
identity_verification = { version = "=1.2.0", path = "../identity_verification" }
iota-config = { git = "https://github.com/iotaledger/iota.git", package = "iota-config" }
iota-config = { git = "https://github.com/iotaledger/iota.git", package = "iota-config", tag = "v0.7.0-alpha" }
iota-crypto = { version = "0.23" }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk" }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v0.7.0-alpha" }
itertools = "0.13.0"
move-core-types = { git = "https://github.com/iotaledger/iota.git", package = "move-core-types", version = "0.0.4" }
move-core-types = { git = "https://github.com/iotaledger/iota.git", package = "move-core-types", tag = "v0.7.0-alpha" }
rand = "0.8.5"
secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", branch = "main" }
serde.workspace = true
serde-aux = "4.5.0"
serde_json.workspace = true
shared-crypto = { git = "https://github.com/iotaledger/iota.git", package = "shared-crypto" }
shared-crypto = { git = "https://github.com/iotaledger/iota.git", package = "shared-crypto", tag = "v0.7.0-alpha" }
strum.workspace = true
thiserror.workspace = true
tokio = { version = "1.29.0", default-features = false, features = [
Expand Down
18 changes: 16 additions & 2 deletions identity_sui_name_tbd/packages/identity_iota/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ dependencies = [
]

[move.toolchain-version]
compiler-version = "1.22.0"
edition = "legacy"
compiler-version = "0.7.0-alpha"
edition = "2024.beta"
flavor = "iota"

[env]

[env.local]
chain-id = "80e22a7f"
original-published-id = "0xbf2ba9e9383be1dc349b571cbc44006c6fa760f3b900e0be992232d860cdb1d5"
latest-published-id = "0xbf2ba9e9383be1dc349b571cbc44006c6fa760f3b900e0be992232d860cdb1d5"
published-version = "1"

[env.localnet]
chain-id = "3e40a728"
original-published-id = "0x40406765d42bf9042457124736ad6ab0eacaf959eee35a1a25b74de92402aeea"
latest-published-id = "0x40406765d42bf9042457124736ad6ab0eacaf959eee35a1a25b74de92402aeea"
published-version = "1"
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module identity_iota::multicontroller {
const EInvalidThreshold: u64 = 3;
const EExpiredProposal: u64 = 4;
const ENotVotedYet: u64 = 5;
const EProposalNotFound: u64 = 6;

public struct ControllerCap has key {
id: UID,
Expand Down Expand Up @@ -139,7 +140,7 @@ module identity_iota::multicontroller {
let cap_id = cap.id.to_inner();
let voting_power = multi.voting_power(cap_id);

let proposal = multi.proposals.borrow_mut<ID, Proposal<T>>(proposal_id);
let proposal = multi.proposals.borrow_mut<ID, Proposal<T>>(proposal_id);
assert!(!proposal.voters.contains(&cap_id), EControllerAlreadyVoted);

proposal.votes = proposal.votes + voting_power;
Expand Down Expand Up @@ -168,6 +169,11 @@ module identity_iota::multicontroller {

id.delete();

let (present, i) = multi.active_proposals.index_of(&proposal_id);
assert!(present, EProposalNotFound);

multi.active_proposals.remove(i);

Action { inner }
}

Expand Down
4 changes: 2 additions & 2 deletions identity_sui_name_tbd/tests/e2e/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async fn creating_authenticated_asset_works() -> anyhow::Result<()> {
}

#[tokio::test]
async fn transfering_asset_works() -> anyhow::Result<()> {
async fn transferring_asset_works() -> anyhow::Result<()> {
let test_client = get_test_client().await?;
let alice_client = test_client.new_user_client().await?;
let bob_client = test_client.new_user_client().await?;
Expand Down Expand Up @@ -182,7 +182,7 @@ async fn hosting_vc_works() -> anyhow::Result<()> {
.execute_with_gas(TEST_GAS_BUDGET, &identity_client)
.await?;
let object_id = newly_created_identity.id();
let did = { IotaDID::parse(&format!("did:iota:{object_id}"))? };
let did = { IotaDID::parse(format!("did:iota:{object_id}"))? };

test_client
.store_key_id_for_verification_method(identity_client.clone(), did.clone())
Expand Down

0 comments on commit 8d30555

Please sign in to comment.