Skip to content

Commit

Permalink
Merge pull request #3 from flmel/update_rust_sdk
Browse files Browse the repository at this point in the history
chore: update rust_sdk
  • Loading branch information
gagdiez committed Apr 3, 2024
2 parents e469287 + fcd9bee commit b70459c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ crate-type = ["cdylib", "rlib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
near-sdk = { version = "5.0.0", features = ["unstable"] }
near-sdk = { version = "5.1.0", features = ["unstable"] }

[dev-dependencies]
near-sdk = { version = "5.0.0", features = ["unit-testing"] }
near-sdk = { version = "5.1.0", features = ["unit-testing"] }
near-workspaces = { version = "0.10.0", features = ["unstable"] }
tokio = { version = "1.12.0", features = ["full"] }
serde_json = "1"
Expand Down
4 changes: 2 additions & 2 deletions src/deploy.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use near_sdk::serde::Serialize;
use near_sdk::{env, log, near_bindgen, AccountId, NearToken, Promise, PromiseError, PublicKey};
use near_sdk::{env, log, near, AccountId, NearToken, Promise, PromiseError, PublicKey};

use crate::{Contract, ContractExt, NEAR_PER_STORAGE, NO_DEPOSIT, TGAS};

Expand All @@ -9,7 +9,7 @@ struct DonationInitArgs {
beneficiary: AccountId,
}

#[near_bindgen]
#[near]
impl Contract {
#[payable]
pub fn create_factory_subaccount_and_deploy(
Expand Down
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Find all our documentation at https://docs.near.org
use near_sdk::borsh::{BorshDeserialize, BorshSerialize};
use near_sdk::store::LazyOption;
use near_sdk::{near_bindgen, Gas, NearToken};
use near_sdk::{near, Gas, NearToken};

mod deploy;
mod manager;
Expand All @@ -12,9 +11,7 @@ const TGAS: Gas = Gas::from_tgas(1); // 10e12yⓃ
const NO_DEPOSIT: NearToken = NearToken::from_near(0); // 0yⓃ

// Define the contract structure
#[near_bindgen]
#[derive(BorshDeserialize, BorshSerialize)]
#[borsh(crate = "near_sdk::borsh")]
#[near(contract_state)]
pub struct Contract {
// Since a contract is something big to store, we use LazyOptions
// this way it is not deserialized on each method call
Expand Down
4 changes: 2 additions & 2 deletions src/manager.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use near_sdk::{env, near_bindgen};
use near_sdk::{env, near};

use crate::{Contract, ContractExt};

#[near_bindgen]
#[near]
impl Contract {
#[private]
pub fn update_stored_contract(&mut self) {
Expand Down

0 comments on commit b70459c

Please sign in to comment.