diff --git a/Cargo.lock b/Cargo.lock index c3108a4..c4dcb65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2665,7 +2665,7 @@ dependencies = [ [[package]] name = "fendermint_actor_blobs_shared" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "data-encoding", @@ -2682,7 +2682,7 @@ dependencies = [ [[package]] name = "fendermint_actor_bucket" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "blake3", @@ -2698,14 +2698,14 @@ dependencies = [ "num-traits", "recall_actor_sdk", "recall_ipld", - "recall_sol_facade 0.1.1 (git+https://github.com/recallnet/contracts?rev=fcd7530181900ab196e76b0bbe34c8ac764be434)", + "recall_sol_facade 0.1.2", "serde", ] [[package]] name = "fendermint_actor_eam" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -2726,7 +2726,7 @@ dependencies = [ [[package]] name = "fendermint_actor_machine" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "fil_actor_adm", @@ -2736,14 +2736,14 @@ dependencies = [ "fvm_ipld_encoding", "fvm_shared", "recall_actor_sdk", - "recall_sol_facade 0.1.1 (git+https://github.com/recallnet/contracts?rev=fcd7530181900ab196e76b0bbe34c8ac764be434)", + "recall_sol_facade 0.1.2", "serde", ] [[package]] name = "fendermint_actor_recall_config_shared" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "fendermint_actor_blobs_shared", "fil_actors_runtime", @@ -2758,7 +2758,7 @@ dependencies = [ [[package]] name = "fendermint_actor_timehub" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -2773,7 +2773,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "recall_actor_sdk", - "recall_sol_facade 0.1.1 (git+https://github.com/recallnet/contracts?rev=fcd7530181900ab196e76b0bbe34c8ac764be434)", + "recall_sol_facade 0.1.2", "serde", "tracing", ] @@ -2781,7 +2781,7 @@ dependencies = [ [[package]] name = "fendermint_crypto" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "base64 0.21.7", @@ -2793,7 +2793,7 @@ dependencies = [ [[package]] name = "fendermint_eth_api" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "async-trait", @@ -2830,7 +2830,7 @@ dependencies = [ [[package]] name = "fendermint_rpc" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "async-trait", @@ -2857,7 +2857,7 @@ dependencies = [ [[package]] name = "fendermint_vm_actor_interface" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -2885,7 +2885,7 @@ dependencies = [ [[package]] name = "fendermint_vm_core" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "cid", "fnv", @@ -2899,7 +2899,7 @@ dependencies = [ [[package]] name = "fendermint_vm_encoding" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "cid", "fvm_shared", @@ -2912,7 +2912,7 @@ dependencies = [ [[package]] name = "fendermint_vm_genesis" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "fendermint_actor_eam", @@ -2930,7 +2930,7 @@ dependencies = [ [[package]] name = "fendermint_vm_message" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "blake2b_simd", @@ -2973,7 +2973,7 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "fil_actor_adm" version = "15.0.0-rc1" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -2987,14 +2987,14 @@ dependencies = [ "multihash", "num-derive 0.3.3", "num-traits", - "recall_sol_facade 0.1.1 (git+https://github.com/recallnet/contracts?rev=bbd1a89c45296e092e2aa20b62abea155b45d91c)", + "recall_sol_facade 0.1.1", "serde", ] [[package]] name = "fil_actor_eam" version = "15.0.0-rc1" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -3015,7 +3015,7 @@ dependencies = [ [[package]] name = "fil_actors_evm_shared" version = "15.0.0-rc1" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "fil_actors_runtime", "fvm_ipld_encoding", @@ -3028,7 +3028,7 @@ dependencies = [ [[package]] name = "fil_actors_runtime" version = "15.0.0-rc1" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "base64 0.21.7", @@ -3251,7 +3251,7 @@ dependencies = [ [[package]] name = "frc42_dispatch" version = "8.0.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "frc42_hasher", "frc42_macros", @@ -3264,7 +3264,7 @@ dependencies = [ [[package]] name = "frc42_hasher" version = "6.0.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "fvm_sdk", "fvm_shared", @@ -3274,7 +3274,7 @@ dependencies = [ [[package]] name = "frc42_macros" version = "6.0.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "blake2b_simd", "frc42_hasher", @@ -4525,7 +4525,7 @@ dependencies = [ [[package]] name = "ipc-api" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -4554,7 +4554,7 @@ dependencies = [ [[package]] name = "ipc-types" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -4578,7 +4578,7 @@ dependencies = [ [[package]] name = "ipc_actors_abis" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "ethers", @@ -5249,7 +5249,7 @@ dependencies = [ [[package]] name = "merkle-tree-rs" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "ethers", @@ -7072,15 +7072,16 @@ dependencies = [ [[package]] name = "recall_actor_sdk" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", + "cid", "fil_actors_runtime", "fvm_ipld_encoding", "fvm_sdk", "fvm_shared", "num-traits", - "recall_sol_facade 0.1.1 (git+https://github.com/recallnet/contracts?rev=fcd7530181900ab196e76b0bbe34c8ac764be434)", + "recall_sol_facade 0.1.2", "serde", ] @@ -7111,7 +7112,7 @@ dependencies = [ [[package]] name = "recall_ipld" version = "0.1.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", @@ -7257,8 +7258,8 @@ dependencies = [ [[package]] name = "recall_sol_facade" -version = "0.1.1" -source = "git+https://github.com/recallnet/contracts?rev=fcd7530181900ab196e76b0bbe34c8ac764be434#fcd7530181900ab196e76b0bbe34c8ac764be434" +version = "0.1.2" +source = "git+https://github.com/recallnet/contracts?rev=8dbfadfce7e306936a65fb955a83bc06b023007d#8dbfadfce7e306936a65fb955a83bc06b023007d" dependencies = [ "alloy-primitives", "alloy-sol-macro-expander", @@ -9891,7 +9892,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vm_api" version = "1.0.0" -source = "git+https://github.com/recallnet/ipc.git?rev=e55113d7f732763124449a6d8e15ab2dad4f27fe#e55113d7f732763124449a6d8e15ab2dad4f27fe" +source = "git+https://github.com/recallnet/ipc.git?rev=536556ad7cafca9b69961180838d9a868874fabc#536556ad7cafca9b69961180838d9a868874fabc" dependencies = [ "anyhow", "cid", diff --git a/Cargo.toml b/Cargo.toml index f9c176e..534e6dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,18 +74,18 @@ tendermint-rpc = { version = "0.31.1", features = [ fvm_shared = "~4.3.0" fvm_ipld_encoding = "0.4.0" -fendermint_actor_blobs_shared = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_actor_bucket = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_actor_recall_config_shared = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_actor_machine = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_actor_timehub = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_crypto = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_eth_api = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_vm_actor_interface = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -fendermint_vm_message = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } +fendermint_actor_blobs_shared = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_actor_bucket = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_actor_recall_config_shared = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_actor_machine = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_actor_timehub = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_crypto = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_eth_api = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_vm_actor_interface = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +fendermint_vm_message = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } -ipc_actors_abis = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } -ipc-api = { git = "https://github.com/recallnet/ipc.git", rev = "e55113d7f732763124449a6d8e15ab2dad4f27fe" } +ipc_actors_abis = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } +ipc-api = { git = "https://github.com/recallnet/ipc.git", rev = "536556ad7cafca9b69961180838d9a868874fabc" } # Use below when working locally on ipc and this repo simultaneously. # Assumes the ipc checkout is in a sibling directory with the same name. diff --git a/cli/src/credit.rs b/cli/src/credit.rs index 947ad11..1b3ab76 100644 --- a/cli/src/credit.rs +++ b/cli/src/credit.rs @@ -183,11 +183,9 @@ pub async fn handle_credit(cfg: NetworkConfig, args: &CreditArgs) -> anyhow::Res )?; signer.set_sequence(sequence, &provider).await?; - let from = signer.address(); let tx = Credits::approve( &provider, &mut signer, - from, args.to, ApproveOptions { credit_limit: args.credit_limit.clone(), @@ -215,11 +213,9 @@ pub async fn handle_credit(cfg: NetworkConfig, args: &CreditArgs) -> anyhow::Res )?; signer.set_sequence(sequence, &provider).await?; - let from = signer.address(); let tx = Credits::revoke( &provider, &mut signer, - from, args.to, RevokeOptions { broadcast_mode, diff --git a/cli/src/machine/bucket.rs b/cli/src/machine/bucket.rs index 60aea92..c66fa7c 100644 --- a/cli/src/machine/bucket.rs +++ b/cli/src/machine/bucket.rs @@ -30,7 +30,7 @@ use recall_sdk::{ }; use recall_signer::{ key::{parse_secret_key, SecretKey}, - AccountKind, Signer, Void, Wallet, + AccountKind, Void, Wallet, }; use serde_json::{json, Value}; use tokio::io::{self}; @@ -303,12 +303,10 @@ pub async fn handle_bucket( let machine = Bucket::attach(args.address).await?; let token_amount = args.token_amount.clone(); - let from = signer.address(); let tx = machine .add_from_path( &provider, &mut signer, - from, &args.key, &args.input, AddOptions { @@ -343,12 +341,10 @@ pub async fn handle_bucket( signer.set_sequence(sequence, &provider).await?; let machine = Bucket::attach(args.address).await?; - let from = signer.address(); let tx = machine .delete( &provider, &mut signer, - from, &args.key, DeleteOptions { broadcast_mode, @@ -448,12 +444,10 @@ pub async fn handle_bucket( args.metadata.clone().into_iter().collect(); let machine = Bucket::attach(args.address).await?; - let from = signer.address(); let tx = machine .update_object_metadata( &provider, &mut signer, - from, &args.key, metadata, UpdateObjectMetadataOptions { diff --git a/cli/src/machine/timehub.rs b/cli/src/machine/timehub.rs index a3b7f06..44bb774 100644 --- a/cli/src/machine/timehub.rs +++ b/cli/src/machine/timehub.rs @@ -27,7 +27,7 @@ use recall_sdk::{ }; use recall_signer::{ key::{parse_secret_key, SecretKey}, - AccountKind, Signer, Void, Wallet, + AccountKind, Void, Wallet, }; use serde_json::{json, Value}; use tokio::io::AsyncReadExt; @@ -195,12 +195,10 @@ pub async fn handle_timehub(cfg: NetworkConfig, args: &TimehubArgs) -> anyhow::R let payload = Bytes::from(cid.to_bytes()); let machine = Timehub::attach(args.address).await?; - let from = signer.address(); let tx = machine .push( &provider, &mut signer, - from, payload, PushOptions { broadcast_mode, diff --git a/sdk/examples/bucket_add.rs b/sdk/examples/bucket_add.rs index e45e08b..ca59dcc 100644 --- a/sdk/examples/bucket_add.rs +++ b/sdk/examples/bucket_add.rs @@ -43,7 +43,6 @@ async fn main() -> anyhow::Result<()> { // Setup local wallet using private key from arg let mut signer = Wallet::new_secp256k1(pk, AccountKind::Ethereum, cfg.subnet_id)?; signer.init_sequence(&provider).await?; - let from = signer.address(); // Create a new bucket let (machine, tx) = Bucket::new( @@ -75,7 +74,7 @@ async fn main() -> anyhow::Result<()> { ..Default::default() }; let tx = machine - .add_from_path(&provider, &mut signer, from, key, file.file_path(), options) + .add_from_path(&provider, &mut signer, key, file.file_path(), options) .await?; println!( "Added 1MiB file to bucket {} with key {}", @@ -119,7 +118,7 @@ async fn main() -> anyhow::Result<()> { // Now, delete the object let tx = machine - .delete(&provider, &mut signer, from, key, Default::default()) + .delete(&provider, &mut signer, key, Default::default()) .await?; println!("Deleted object with key {} at tx 0x{}", key, tx.hash()); diff --git a/sdk/examples/credits.rs b/sdk/examples/credits.rs index ac87f45..059a9c1 100644 --- a/sdk/examples/credits.rs +++ b/sdk/examples/credits.rs @@ -109,14 +109,7 @@ async fn main() -> anyhow::Result<()> { ..Default::default() }; - let tx = Credits::approve( - &provider, - &mut signer, - signer_address, - second_address, - approve_options, - ) - .await?; + let tx = Credits::approve(&provider, &mut signer, second_address, approve_options).await?; println!("Approved credits - Transaction hash: 0x{}", tx.hash()); if let TxStatus::Committed(receipt) = tx.status { println!("Gas used: {}", receipt.gas_used.unwrap_or_default()); @@ -144,14 +137,7 @@ async fn main() -> anyhow::Result<()> { ..Default::default() }; - let tx = Credits::revoke( - &provider, - &mut signer, - signer_address, - second_address, - revoke_options, - ) - .await?; + let tx = Credits::revoke(&provider, &mut signer, second_address, revoke_options).await?; println!("Revoked credits - Transaction hash: 0x{}", tx.hash()); if let TxStatus::Committed(receipt) = tx.status { println!("Gas used: {}", receipt.gas_used.unwrap_or_default()); diff --git a/sdk/examples/timehub_push.rs b/sdk/examples/timehub_push.rs index 6ec0042..afa0863 100644 --- a/sdk/examples/timehub_push.rs +++ b/sdk/examples/timehub_push.rs @@ -15,7 +15,7 @@ use recall_sdk::{ }, network::Network, }; -use recall_signer::{key::parse_secret_key, AccountKind, Signer, Wallet}; +use recall_signer::{key::parse_secret_key, AccountKind, Wallet}; #[tokio::main] async fn main() -> anyhow::Result<()> { @@ -51,15 +51,8 @@ async fn main() -> anyhow::Result<()> { // Push a value to the accumulator let value = Cid::from_str("baeabeif2afeua6dg23holphe2ecingsqr7sjo5gdbmtvekjybzspxpmaf4")?.to_bytes(); - let from = signer.address(); let tx = machine - .push( - &provider, - &mut signer, - from, - value.into(), - Default::default(), - ) + .push(&provider, &mut signer, value.into(), Default::default()) .await?; println!( "Pushed to timehub {} with index {}", diff --git a/sdk/src/account.rs b/sdk/src/account.rs index 0e755bf..3c8cc06 100644 --- a/sdk/src/account.rs +++ b/sdk/src/account.rs @@ -114,10 +114,7 @@ impl Account { where C: Client + Send + Sync, { - let params = SetSponsorParams { - from: signer.address(), - sponsor, - }; + let params = SetSponsorParams(sponsor); let params = RawBytes::serialize(params)?; signer .send_transaction( diff --git a/sdk/src/credits.rs b/sdk/src/credits.rs index 2ee8a71..ac9834a 100644 --- a/sdk/src/credits.rs +++ b/sdk/src/credits.rs @@ -271,7 +271,6 @@ impl Credits { pub async fn approve( provider: &impl Provider, signer: &mut impl Signer, - from: Address, to: Address, options: ApproveOptions, ) -> anyhow::Result> @@ -279,7 +278,6 @@ impl Credits { C: Client + Send + Sync, { let params = ApproveCreditParams { - from, to, caller_allowlist: None, // TODO: remove this when it's been removed in ipc credit_limit: options.credit_limit, @@ -305,7 +303,6 @@ impl Credits { pub async fn revoke( provider: &impl Provider, signer: &mut impl Signer, - from: Address, to: Address, options: RevokeOptions, ) -> anyhow::Result> @@ -313,7 +310,6 @@ impl Credits { C: Client + Send + Sync, { let params = RevokeCreditParams { - from, to, for_caller: None, // TODO: remove this when it's been removed in ipc }; diff --git a/sdk/src/machine/bucket.rs b/sdk/src/machine/bucket.rs index 88b9fa4..73d24e0 100644 --- a/sdk/src/machine/bucket.rs +++ b/sdk/src/machine/bucket.rs @@ -169,7 +169,6 @@ impl Bucket { &self, provider: &impl Provider, signer: &mut impl Signer, - from: Address, key: &str, reader: R, size: u64, @@ -227,7 +226,6 @@ impl Bucket { ttl: options.ttl, metadata: options.metadata, overwrite: options.overwrite, - from, }; let tx = signer @@ -259,7 +257,6 @@ impl Bucket { &self, provider: &impl Provider, signer: &mut impl Signer, - from: Address, key: &str, path: impl AsRef, options: AddOptions, @@ -288,7 +285,7 @@ impl Bucket { .map(|mime| mime.to_string()); let options = self.add_content_type_to_metadata(options, content_type); - self.add_reader(provider, signer, from, key, file, total_size, options) + self.add_reader(provider, signer, key, file, total_size, options) .await } @@ -297,17 +294,13 @@ impl Bucket { &self, provider: &impl Provider, signer: &mut impl Signer, - from: Address, key: &str, options: DeleteOptions, ) -> anyhow::Result> where C: Client + Send + Sync, { - let params = DeleteParams { - key: key.into(), - from, - }; + let params = DeleteParams(key.into()); let params = RawBytes::serialize(params)?; signer .send_transaction( @@ -412,7 +405,6 @@ impl Bucket { &self, provider: &impl Provider, signer: &mut impl Signer, - from: Address, key: &str, metadata: HashMap>, options: UpdateObjectMetadataOptions, @@ -425,7 +417,6 @@ impl Bucket { let params = UpdateObjectMetadataParams { key: key.into(), metadata, - from, }; let params = RawBytes::serialize(params)?; signer diff --git a/sdk/src/machine/timehub.rs b/sdk/src/machine/timehub.rs index fade31c..21072fb 100644 --- a/sdk/src/machine/timehub.rs +++ b/sdk/src/machine/timehub.rs @@ -111,7 +111,6 @@ impl Timehub { &self, provider: &impl Provider, signer: &mut impl Signer, - from: Address, payload: Bytes, options: PushOptions, ) -> anyhow::Result> @@ -124,10 +123,7 @@ impl Timehub { MAX_ACC_PAYLOAD_SIZE )); } - let params = RawBytes::serialize(PushParams { - cid_bytes: payload.to_vec(), - from, - })?; + let params = RawBytes::serialize(PushParams(payload.to_vec()))?; signer .send_transaction( provider, diff --git a/tests/sdk/src/bucket.rs b/tests/sdk/src/bucket.rs index c9ea08a..e363f88 100644 --- a/tests/sdk/src/bucket.rs +++ b/tests/sdk/src/bucket.rs @@ -13,7 +13,7 @@ mod tests { bucket::{AddOptions, Bucket, GetOptions, QueryOptions}, Machine, }; - use recall_signer::{key::parse_secret_key, AccountKind, Signer, Wallet}; + use recall_signer::{key::parse_secret_key, AccountKind, Wallet}; use crate::test_utils; @@ -66,9 +66,8 @@ mod tests { metadata, ..Default::default() }; - let from = signer.address(); machine - .add_from_path(&provider, &mut signer, from, key, file.file_path(), options) + .add_from_path(&provider, &mut signer, key, file.file_path(), options) .await .unwrap(); @@ -116,7 +115,7 @@ mod tests { // Now, delete the object machine - .delete(&provider, &mut signer, from, key, Default::default()) + .delete(&provider, &mut signer, key, Default::default()) .await .unwrap();