Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Add target address to fund and release (#126)
Browse files Browse the repository at this point in the history
* add to to fund and release

* upgrade fvm_shared and fvm_utils

* fix clippy
  • Loading branch information
adlrocha authored Jul 5, 2023
1 parent 64bb193 commit 5918848
Show file tree
Hide file tree
Showing 17 changed files with 439 additions and 197 deletions.
40 changes: 20 additions & 20 deletions atomic-exec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
[package]
name = "ipc_atomic_execution"
version = "0.0.1"
license = "MIT OR Apache-2.0"
authors = ["ConsensusLab", "Protocol Labs", "Filecoin Core Devs"]
edition = "2021"
repository = "https://github.com/consensus-shipyard/ipc-atomic-execution"
keywords = ["filecoin", "web3", "wasm"]
license = "MIT OR Apache-2.0"
name = "ipc_atomic_execution"
repository = "https://github.com/consensus-shipyard/ipc-atomic-execution"
version = "0.0.1"

[lib]
## lib is necessary for integration tests
## cdylib is necessary for Wasm build
crate-type = ["cdylib", "lib"]

[dependencies]
ipc_gateway = { path = "../gateway", package = "ipc-gateway", features = [] }
ipc_gateway = {path = "../gateway", package = "ipc-gateway", features = []}

fil_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor"] }
primitives = { git = "https://github.com/consensus-shipyard/fvm-utils" }
fvm_shared = { version = "3.0.0-alpha.17", default-features = false }
fvm_ipld_hamt = "0.5.1"
fil_actors_runtime = {git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor"]}
frc42_dispatch = "3.2.0"
fvm_ipld_blockstore = "0.1.1"
fvm_ipld_encoding = "0.3.3"
frc42_dispatch = "3.0.0"
fvm_ipld_hamt = "0.5.1"
fvm_shared = {version = "3.2.0", default-features = false}
primitives = {git = "https://github.com/consensus-shipyard/fvm-utils"}

num-traits = "0.2.14"
num-derive = "0.3.3"
log = "0.4.14"
indexmap = { version = "1.8.0", features = ["serde-1"] }
cid = { version = "0.8.3", default-features = false, features = ["serde-codec"] }
integer-encoding = { version = "3.0.3", default-features = false }
anyhow = "1.0.56"
cid = {version = "0.8.3", default-features = false, features = ["serde-codec"]}
indexmap = {version = "1.8.0", features = ["serde-1"]}
integer-encoding = {version = "3.0.3", default-features = false}
lazy_static = "1.4.0"
log = "0.4.14"
num-derive = "0.3.3"
num-traits = "0.2.14"
serde = {version = "1.0.136", features = ["derive"]}
serde_tuple = "0.5"
serde = { version = "1.0.136", features = ["derive"] }
anyhow = "1.0.56"
thiserror = "1.0.38"
unsigned-varint = "0.7.1"

[dev-dependencies]
fil_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor", "test_utils"] }
ipc-sdk = { path = "../sdk" }
fil_actors_runtime = {git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor", "test_utils"]}
ipc-sdk = {path = "../sdk"}

[build-dependencies]
wasm-builder = "3.0.1"
Expand Down
38 changes: 19 additions & 19 deletions atomic-exec/examples/fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
[package]
name = "ipc_atomic_exec_fungible_token_sample"
version = "0.1.0"
license = "MIT OR Apache-2.0"
authors = ["Protocol Labs and the contributors"]
edition = "2018"
repository = "https://github.com/consensus-shipyard/ipc-atomic-execution"
keywords = ["web3", "filecoin", "FVM", "inter-planetary consensus"]
license = "MIT OR Apache-2.0"
name = "ipc_atomic_exec_fungible_token_sample"
repository = "https://github.com/consensus-shipyard/ipc-atomic-execution"
version = "0.1.0"

[lib]
## lib is necessary for integration tests
## cdylib is necessary for Wasm build
crate-type = ["cdylib", "lib"]

[dependencies]
ipc_atomic_execution = { path = "../../" }
ipc_atomic_execution_primitives = { path = "../../primitives/" }
ipc_gateway = { path = "../../../gateway", package = "ipc-gateway" }
ipc_atomic_execution = {path = "../../"}
ipc_atomic_execution_primitives = {path = "../../primitives/"}
ipc_gateway = {path = "../../../gateway", package = "ipc-gateway"}

fvm_primitives = { git = "https://github.com/consensus-shipyard/fvm-utils", package = "primitives" }
fvm_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", package = "fil_actors_runtime", features = ["fil-actor"] }
fvm_actors_runtime = {git = "https://github.com/consensus-shipyard/fvm-utils", package = "fil_actors_runtime", features = ["fil-actor"]}
fvm_primitives = {git = "https://github.com/consensus-shipyard/fvm-utils", package = "primitives"}

frc42_dispatch = "3.0.0"
frc42_dispatch = "3.2.0"

fvm_shared = { version = "3.0.0-alpha.17", default-features = false }
fvm_ipld_hamt = "0.5.1"
fvm_ipld_blockstore = "0.1.1"
fvm_ipld_encoding = "0.3.3"
fvm_ipld_hamt = "0.5.1"
fvm_shared = {version = "3.2.0", default-features = false}

cid = { version = "0.8.3", default-features = false, features = ["serde-codec"] }
serde_tuple = "0.5"
serde = { version = "1.0.136", features = ["derive"] }
anyhow = "1.0.56"
thiserror = "1.0.37"
cid = {version = "0.8.3", default-features = false, features = ["serde-codec"]}
integer-encoding = "3.0.4"
lazy_static = "1.4.0"
num-derive = "0.3.3"
num-traits = "0.2.15"
lazy_static = "1.4.0"
serde = {version = "1.0.136", features = ["derive"]}
serde_tuple = "0.5"
thiserror = "1.0.37"

[dev-dependencies]
fvm_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", package = "fil_actors_runtime", features = ["fil-actor", "test_utils"] }
ipc-sdk = { path = "../../../sdk" }
fvm_actors_runtime = {git = "https://github.com/consensus-shipyard/fvm-utils", package = "fil_actors_runtime", features = ["fil-actor", "test_utils"]}
ipc-sdk = {path = "../../../sdk"}

[build-dependencies]
wasm-builder = "3.0.1"
Expand Down
22 changes: 11 additions & 11 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[package]
name = "ipc-actor-common"
description = "The common code used by both gateway actor and subnet actor, but not by sdk exposed to users"
version = "0.1.0"
edition = "2021"
name = "ipc-actor-common"
version = "0.1.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.56"
log = "0.4.17"
primitives = { git = "https://github.com/consensus-shipyard/fvm-utils" }
ipc-sdk = { path = "../sdk" }
num-traits = "0.2.14"
fil_actors_runtime = {git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor"]}
fvm_ipld_blockstore = "0.1.1"
fvm_ipld_encoding = "0.3.3"
fvm_shared = {version = "=3.2.0", default-features = false}
integer-encoding = {version = "3.0.3", default-features = false}
ipc-sdk = {path = "../sdk"}
lazy_static = "1.4.0"
log = "0.4.17"
num-traits = "0.2.14"
primitives = {git = "https://github.com/consensus-shipyard/fvm-utils"}
serde = {version = "1.0.136", features = ["derive"]}
serde_tuple = "0.5"
serde = { version = "1.0.136", features = ["derive"] }
fvm_shared = { version = "=3.0.0-alpha.17", default-features = false }
thiserror = "1.0.38"
fil_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor"] }
integer-encoding = { version = "3.0.3", default-features = false }

[dev-dependencies]
cid = "0.8.6"
serde_json = "1.0.95"
cid = "0.8.6"
46 changes: 23 additions & 23 deletions gateway/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
[package]
name = "ipc-gateway"
description = "IPC Gateway Actor"
version = "0.0.1"
license = "MIT OR Apache-2.0"
authors = ["ConsensusLab", "Protocol Labs", "Filecoin Core Devs"]
description = "IPC Gateway Actor"
edition = "2021"
repository = "https://github.com/consensus-shipyard/ipc-actors"
keywords = ["filecoin", "web3", "wasm", "ipc"]
license = "MIT OR Apache-2.0"
name = "ipc-gateway"
repository = "https://github.com/consensus-shipyard/ipc-actors"
version = "0.0.1"

[lib]
## lib is necessary for integration tests
## cdylib is necessary for Wasm build
crate-type = ["cdylib", "lib"]

[dependencies]
fil_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor"] }
frc42_dispatch = "3.0.0"
primitives = { git = "https://github.com/consensus-shipyard/fvm-utils" }
fvm_shared = { version = "=3.0.0-alpha.17", default-features = false }
ipc-sdk = { path = "../sdk" }
ipc-actor-common = { path = "../common" }
fvm_ipld_hamt = "0.5.1"
num-traits = "0.2.14"
num-derive = "0.3.3"
log = "0.4.14"
indexmap = { version = "1.8.0", features = ["serde-1"] }
cid = { version = "0.8.3", default-features = false, features = ["serde-codec"] }
integer-encoding = { version = "3.0.3", default-features = false }
lazy_static = "1.4.0"
serde_tuple = "0.5"
serde = { version = "1.0.136", features = ["derive"] }
anyhow = "1.0.56"
cid = {version = "0.8.3", default-features = false, features = ["serde-codec"]}
fil_actors_runtime = {git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor"]}
frc42_dispatch = "3.2.0"
fvm_ipld_blockstore = "0.1.1"
fvm_ipld_encoding = "0.3.3"
fvm_ipld_hamt = "0.5.1"
fvm_shared = {version = "=3.2.0", default-features = false}
indexmap = {version = "1.8.0", features = ["serde-1"]}
integer-encoding = {version = "3.0.3", default-features = false}
ipc-actor-common = {path = "../common"}
ipc-sdk = {path = "../sdk"}
lazy_static = "1.4.0"
log = "0.4.14"
num-derive = "0.3.3"
num-traits = "0.2.14"
primitives = {git = "https://github.com/consensus-shipyard/fvm-utils"}
serde = {version = "1.0.136", features = ["derive"]}
serde_tuple = "0.5"
thiserror = "1.0.37"
unsigned-varint = "0.7.1"

[dev-dependencies]
# enable test_utils feature only in dev env
fil_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor", "test_utils"] }
base64 = "0.13.1"
env_logger = "0.10.0"
fil_actors_runtime = {git = "https://github.com/consensus-shipyard/fvm-utils", features = ["fil-actor", "test_utils"]}

[build-dependencies]
wasm-builder = "3.0.1"
wasmtime = "0.35.2"

[features]
fil-gateway-actor = []
fil-gateway-actor = []
14 changes: 8 additions & 6 deletions gateway/src/cross.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,18 @@ impl CrossMsg {
impl StorableMsg {
pub fn new_release_msg(
sub_id: &SubnetID,
sig_addr: &Address,
from: &Address,
to: &Address,
value: TokenAmount,
) -> anyhow::Result<Self> {
let to = IPCAddress::new(
&match sub_id.parent() {
Some(s) => s,
None => return Err(anyhow!("error getting parent for subnet addr")),
},
sig_addr,
to,
)?;
let from = IPCAddress::new(sub_id, &BURNT_FUNDS_ACTOR_ADDR)?;
let from = IPCAddress::new(sub_id, from)?;
Ok(Self {
from,
to,
Expand All @@ -101,17 +102,18 @@ impl StorableMsg {

pub fn new_fund_msg(
sub_id: &SubnetID,
sig_addr: &Address,
from: &Address,
to: &Address,
value: TokenAmount,
) -> anyhow::Result<Self> {
let from = IPCAddress::new(
&match sub_id.parent() {
Some(s) => s,
None => return Err(anyhow!("error getting parent for subnet addr")),
},
sig_addr,
from,
)?;
let to = IPCAddress::new(sub_id, sig_addr)?;
let to = IPCAddress::new(sub_id, to)?;
// the nonce and the rest of message fields are set when the message is committed.
Ok(Self {
from,
Expand Down
Loading

0 comments on commit 5918848

Please sign in to comment.