Skip to content

Commit 93f90c3

Browse files
committed
feat: update to fvm 3.0
- Updates to the 3.0 branch. - Adds support for delegated addresses.
1 parent 953de29 commit 93f90c3

File tree

14 files changed

+52
-52
lines changed

14 files changed

+52
-52
lines changed

dispatch_examples/greeter/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ edition = "2021"
66
[dependencies]
77
frc42_dispatch = { path = "../../frc42_dispatch" }
88
fvm_ipld_blockstore = "0.1.1"
9-
fvm_ipld_encoding = "0.2.2"
10-
fvm_sdk = { version = "2.0.0-alpha.2" }
11-
fvm_shared = { version = "2.0.0-alpha.2" }
9+
fvm_ipld_encoding = "0.3.0"
10+
fvm_sdk = { version = "3.0.0-alpha.8" }
11+
fvm_shared = { version = "3.0.0-alpha.8" }
1212

1313
[dev-dependencies]
1414
cid = { version = "0.8.5", default-features = false }
15-
fvm = { version = "2.0.0-alpha.2", default-features = false }
15+
fvm = { version = "3.0.0-alpha.5", default-features = false }
1616
fvm_integration_tests = "2.0.0-alpha.1"
1717
actors-v10 = { package = "fil_builtin_actors_bundle", git = "https://github.com/filecoin-project/builtin-actors", branch = "next", features = ["m2-native"] }
1818

frc42_dispatch/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ edition = "2021"
99

1010

1111
[dependencies]
12-
fvm_ipld_encoding = { version = "0.2.2" }
13-
fvm_sdk = { version = "2.0.0-alpha.2", optional = true }
14-
fvm_shared = { version = "2.0.0-alpha.2" }
12+
fvm_ipld_encoding = { version = "0.3.0" }
13+
fvm_sdk = { version = "3.0.0-alpha.8", optional = true }
14+
fvm_shared = { version = "3.0.0-alpha.8" }
1515
frc42_hasher = { version = "1.0.0", path = "hasher" }
1616
frc42_macros = { version = "1.0.0", path = "macros" }
1717
thiserror = { version = "1.0.31" }
1818

1919
[features]
2020
default = ["dep:fvm_sdk"]
21-
no_sdk = [] # avoid dependence on fvm_sdk (for proc macro and similar purposes)
21+
no_sdk = [] # avoid dependence on fvm_sdk (for proc macro and similar purposes)

frc42_dispatch/hasher/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ repository = "https://github.com/helix-onchain/filecoin/"
77
edition = "2021"
88

99
[dependencies]
10-
fvm_sdk = { version = "2.0.0-alpha.2", optional = true }
11-
fvm_shared = { version = "2.0.0-alpha.2" }
10+
fvm_sdk = { version = "3.0.0-alpha.8", optional = true }
11+
fvm_shared = { version = "3.0.0-alpha.8" }
1212
thiserror = { version = "1.0.31" }
1313

1414
[features]
1515
default = ["dep:fvm_sdk"]
16-
no_sdk = [] # avoid dependence on fvm_sdk (for proc macro and similar purposes)
16+
no_sdk = [] # avoid dependence on fvm_sdk (for proc macro and similar purposes)

frc42_dispatch/hasher/src/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl Hasher for Blake2bSyscall {
2020
#[cfg(not(feature = "no_sdk"))]
2121
fn hash(&self, bytes: &[u8]) -> Vec<u8> {
2222
use fvm_shared::crypto::hash::SupportedHashes;
23-
crypto::hash(SupportedHashes::Blake2b512, bytes)
23+
crypto::hash_owned(SupportedHashes::Blake2b512, bytes)
2424
}
2525

2626
// stub version that avoids fvm_sdk syscalls (eg: for proc macro, or built-in actor use)

frc46_token/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ cid = { version = "0.8.3", default-features = false, features = ["serde-codec"]
1313
frc42_dispatch = { version = "1.0.0", path = "../frc42_dispatch" }
1414
fvm_actor_utils = { version = "0.1.0", path = "../fvm_actor_utils" }
1515
fvm_ipld_blockstore = "0.1.1"
16-
fvm_ipld_hamt = "0.5.1"
17-
fvm_ipld_amt = { version = "0.4.2", features = ["go-interop"] }
18-
fvm_ipld_encoding = "0.2.2"
19-
fvm_sdk = { version = "2.0.0-alpha.2" }
20-
fvm_shared = { version = "2.0.0-alpha.2" }
16+
fvm_ipld_hamt = "0.6.0"
17+
fvm_ipld_amt = { version = "0.5.0", features = ["go-interop"] }
18+
fvm_ipld_encoding = "0.3.0"
19+
fvm_sdk = { version = "3.0.0-alpha.8" }
20+
fvm_shared = { version = "3.0.0-alpha.8" }
2121
num-traits = { version = "0.2.15" }
2222
serde = { version = "1.0.136", features = ["derive"] }
2323
serde_tuple = { version = "0.5.0" }
2424
thiserror = { version = "1.0.31" }
25-
integer-encoding = { version = "3.0.4" }
25+
integer-encoding = { version = "3.0.4" }

frcxx_nft/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ cid = { version = "0.8.3", default-features = false, features = ["serde-codec"]
99
frc42_dispatch = { path = "../frc42_dispatch" }
1010
fvm_actor_utils = { version = "0.1.0", path = "../fvm_actor_utils" }
1111
fvm_ipld_blockstore = "0.1.1"
12-
fvm_ipld_hamt = "0.5.1"
13-
fvm_ipld_amt = { version = "0.4.2", features = ["go-interop"] }
14-
fvm_ipld_encoding = "0.2.2"
15-
fvm_sdk = { version = "2.0.0-alpha.2" }
16-
fvm_shared = { version = "2.0.0-alpha.2" }
12+
fvm_ipld_hamt = "0.6.0"
13+
fvm_ipld_amt = { version = "0.5.0", features = ["go-interop"] }
14+
fvm_ipld_encoding = "0.3.0"
15+
fvm_sdk = { version = "3.0.0-alpha.8" }
16+
fvm_shared = { version = "3.0.0-alpha.8" }
1717
num-traits = { version = "0.2.15" }
1818
serde = { version = "1.0.136", features = ["derive"] }
1919
serde_tuple = { version = "0.5.0" }
20-
thiserror = { version = "1.0.31" }
20+
thiserror = { version = "1.0.31" }

fvm_actor_utils/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ anyhow = "1.0.56"
1212
cid = { version = "0.8.3", default-features = false, features = ["serde-codec"] }
1313
frc42_dispatch = { version = "1.0.0", path = "../frc42_dispatch" }
1414
fvm_ipld_blockstore = "0.1.1"
15-
fvm_ipld_encoding = "0.2.2"
16-
fvm_shared = "2.0.0-alpha.2"
17-
fvm_sdk = "2.0.0-alpha.2"
15+
fvm_ipld_encoding = "0.3.0"
16+
fvm_shared = "3.0.0-alpha.8"
17+
fvm_sdk = "3.0.0-alpha.8"
1818
num-traits = { version = "0.2.15" }
19-
thiserror = { version = "1.0.31" }
19+
thiserror = { version = "1.0.31" }

fvm_actor_utils/src/messaging.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use frc42_dispatch::method_hash;
55
use fvm_ipld_encoding::Error as IpldError;
66
use fvm_ipld_encoding::RawBytes;
77
use fvm_sdk::{actor, message, send, sys::ErrorNumber};
8+
use fvm_shared::address::Payload;
89
use fvm_shared::error::ExitCode;
910
use fvm_shared::receipt::Receipt;
1011
use fvm_shared::MethodNum;
@@ -207,13 +208,12 @@ impl FakeAddressResolver {
207208

208209
pub fn initialize_account(&mut self, address: &Address) -> Result<ActorID> {
209210
match address.payload() {
210-
fvm_shared::address::Payload::ID(id) => {
211+
Payload::ID(id) => {
211212
panic!("attempting to initialise an already resolved id {}", id)
212213
}
213-
fvm_shared::address::Payload::Secp256k1(_) => Ok(self._initialize_address(address)?),
214-
fvm_shared::address::Payload::BLS(_) => Ok(self._initialize_address(address)?),
215-
fvm_shared::address::Payload::Actor(_) => {
216-
Err(MessagingError::AddressNotInitialized(*address))
214+
Payload::Actor(_) => Err(MessagingError::AddressNotInitialized(*address)),
215+
Payload::Secp256k1(_) | Payload::BLS(_) | Payload::Delegated(_) => {
216+
Ok(self._initialize_address(address)?)
217217
}
218218
}
219219
}
@@ -226,7 +226,7 @@ impl FakeAddressResolver {
226226

227227
// else resolve it if it is an id address
228228
match address.payload() {
229-
fvm_shared::address::Payload::ID(id) => Ok(*id),
229+
Payload::ID(id) => Ok(*id),
230230
_ => Err(MessagingError::AddressNotResolved(*address)),
231231
}
232232
}

testing/fil_token_integration/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ edition = "2021"
77
[dependencies]
88
anyhow = { version = "1.0.63", features = ["backtrace"] }
99
cid = { version = "0.8.5", default-features = false }
10-
fvm = { version = "2.0.0-alpha.2", default-features = false }
10+
fvm = { version = "3.0.0-alpha.5", default-features = false }
1111
frcxx_nft = { path = "../../frcxx_nft" }
1212
frc42_dispatch = { path = "../../frc42_dispatch" }
1313
frc46_token = { version = "1.1.0", path = "../../frc46_token" }
1414
fvm_integration_tests = "2.0.0-alpha.1"
1515
fvm_ipld_blockstore = "0.1.1"
16-
fvm_ipld_encoding = "0.2.2"
17-
fvm_shared = { version = "2.0.0-alpha.2" }
16+
fvm_ipld_encoding = "0.3.0"
17+
fvm_shared = { version = "3.0.0-alpha.8" }
1818
serde = { version = "1.0", features = ["derive"] }
1919
serde_tuple = { version = "0.5.0" }
2020

testing/fil_token_integration/actors/basic_nft_actor/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ frcxx_nft = { path = "../../../../frcxx_nft" }
99
frc42_dispatch = { path = "../../../../frc42_dispatch" }
1010
fvm_actor_utils = { version = "0.1.0", path = "../../../../fvm_actor_utils" }
1111
fvm_ipld_blockstore = "0.1.1"
12-
fvm_ipld_encoding = "0.2.2"
13-
fvm_sdk = { version = "2.0.0-alpha.2" }
14-
fvm_shared = "2.0.0-alpha.2"
12+
fvm_ipld_encoding = "0.3.0"
13+
fvm_sdk = { version = "3.0.0-alpha.8" }
14+
fvm_shared = "3.0.0-alpha.8"
1515
serde = { version = "1.0.136", features = ["derive"] }
1616
serde_tuple = { version = "0.5.0" }
1717
thiserror = { version = "1.0.31" }

0 commit comments

Comments
 (0)