Skip to content

Commit

Permalink
soroban storage
Browse files Browse the repository at this point in the history
Signed-off-by: salaheldinsoliman <[email protected]>
  • Loading branch information
salaheldinsoliman committed Apr 19, 2024
1 parent 35044f4 commit 22d7952
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ forge-fmt = { version = "0.2.0", optional = true }
# build to work.
ethers-core = { version = "2.0.10", optional = true }
soroban-sdk = { version = "20.0.0-rc2", features = ["testutils"], optional = true }
soroban-env-host = { version = "20.2.2", features = ["testutils"], optional = true}
#soroban-env-host = { version = "20.2.2", features = ["testutils"], optional = true}

[dev-dependencies]
num-derive = "0.4"
Expand Down
6 changes: 3 additions & 3 deletions src/emit/soroban/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use inkwell::values::{
};
use solang_parser::pt::Loc;
use std::collections::HashMap;
//use soroban_sdk::{contract, contractimpl, log, symbol_short, Env, Symbol};
use soroban_sdk::{contract, contractimpl, log, symbol_short, Env, Symbol};

const COUNTER: Symbol = symbol_short!("COUNTER");

Expand Down Expand Up @@ -62,14 +62,14 @@ impl<'a> TargetRuntime<'a> for SorobanTarget {
contract: &ast::Contract,
) {

/*let env = &contract.env.as_ref().unwrap().env;
let env = &contract.env.as_ref().unwrap().env;

let mut count: u32 = env.storage().instance().get(&COUNTER).unwrap_or(0);
count += 1;

log!(&env, "count: {}", count);

env.storage().instance().set(&COUNTER, &count);*/
env.storage().instance().set(&COUNTER, &count);


//unimplemented!()
Expand Down

0 comments on commit 22d7952

Please sign in to comment.