fix(wallet_ffi): wallet_ffi fix

This commit is contained in:
Pravdyvy
2026-07-10 16:21:03 +03:00
parent 562696929c
commit 675e845237
26 changed files with 323 additions and 155 deletions
@@ -27,7 +27,7 @@ use wallet::WalletCore;
#[tokio::main]
async fn main() {
// Initialize wallet
let wallet_core = WalletCore::from_env().unwrap();
let wallet_core = WalletCore::from_env().await.unwrap();
// Parse arguments
// First argument is the path to the program binary
@@ -59,7 +59,7 @@ async fn main() {
// Submit the transaction
let _response = wallet_core
.sequencer_client
.leader_owned()
.send_transaction(LeeTransaction::Public(tx))
.await
.unwrap();
@@ -23,7 +23,7 @@ use wallet::{AccountIdentity, WalletCore};
#[tokio::main]
async fn main() {
// Initialize wallet
let wallet_core = WalletCore::from_env().unwrap();
let mut wallet_core = WalletCore::from_env().await.unwrap();
// Parse arguments
// First argument is the path to the program binary
@@ -27,7 +27,7 @@ use wallet::WalletCore;
#[tokio::main]
async fn main() {
// Initialize wallet
let wallet_core = WalletCore::from_env().unwrap();
let wallet_core = WalletCore::from_env().await.unwrap();
// Parse arguments
// First argument is the path to the program binary
@@ -55,7 +55,7 @@ async fn main() {
// Submit the transaction
let _response = wallet_core
.sequencer_client
.leader_owned()
.send_transaction(LeeTransaction::Public(tx))
.await
.unwrap();
@@ -26,7 +26,7 @@ use wallet::{AccountIdentity, WalletCore};
#[tokio::main]
async fn main() {
// Initialize wallet
let wallet_core = WalletCore::from_env().unwrap();
let mut wallet_core = WalletCore::from_env().await.unwrap();
// Parse arguments
// First argument is the path to the simple_tail_call program binary
@@ -29,7 +29,7 @@ use wallet::WalletCore;
#[tokio::main]
async fn main() {
// Initialize wallet
let wallet_core = WalletCore::from_env().unwrap();
let mut wallet_core = WalletCore::from_env().await.unwrap();
// Parse arguments
// First argument is the path to the program binary
@@ -52,7 +52,8 @@ async fn main() {
.storage()
.key_chain()
.pub_account_signing_key(account_id)
.expect("Input account should be a self owned public account");
.expect("Input account should be a self owned public account")
.clone();
// Define the desired greeting in ASCII
let greeting: Vec<u8> = vec![72, 111, 108, 97, 32, 109, 117, 110, 100, 111, 33];
@@ -63,7 +64,7 @@ async fn main() {
.get_accounts_nonces(vec![account_id])
.await
.expect("Node should be reachable to query account data");
let signing_keys = [signing_key];
let signing_keys = [&signing_key];
let message = Message::try_new(program.id(), vec![account_id], nonces, greeting).unwrap();
// Pass the signing key to sign the message. This will be used by the node
// to flag the pre_state as `is_authorized` when executing the program
@@ -72,7 +73,7 @@ async fn main() {
// Submit the transaction
let _response = wallet_core
.sequencer_client
.leader_owned()
.send_transaction(LeeTransaction::Public(tx))
.await
.unwrap();
@@ -35,7 +35,7 @@ const PDA_SEED: PdaSeed = PdaSeed::new([37; 32]);
#[tokio::main]
async fn main() {
// Initialize wallet
let wallet_core = WalletCore::from_env().unwrap();
let wallet_core = WalletCore::from_env().await.unwrap();
// Parse arguments
// First argument is the path to the program binary
@@ -57,7 +57,7 @@ async fn main() {
// Submit the transaction
let _response = wallet_core
.sequencer_client
.leader_owned()
.send_transaction(LeeTransaction::Public(tx))
.await
.unwrap();
@@ -66,7 +66,7 @@ async fn main() {
let program = Program::new(bytecode.into()).unwrap();
// Initialize wallet
let wallet_core = WalletCore::from_env().unwrap();
let mut wallet_core = WalletCore::from_env().await.unwrap();
match cli.command {
Command::WritePublic {
@@ -88,7 +88,7 @@ async fn main() {
// Submit the transaction
let _response = wallet_core
.sequencer_client
.leader_owned()
.send_transaction(LeeTransaction::Public(tx))
.await
.unwrap();
@@ -127,7 +127,7 @@ async fn main() {
// Submit the transaction
let _response = wallet_core
.sequencer_client
.leader_owned()
.send_transaction(LeeTransaction::Public(tx))
.await
.unwrap();