Skip to content
Merged

V4 #6

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[toolchain]
# For deploy
channel = "1.81.0"
# channel = "1.81.0"
# For develop and test
# channel = "stable"
channel = "stable"
components = ["rustfmt"]
targets = ["wasm32-unknown-unknown"]
13 changes: 4 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
// Find all our documentation at https://docs.near.org
use near_sdk::borsh::{BorshDeserialize, BorshSerialize};
use near_sdk::json_types::U128;
use near_sdk::serde::{Deserialize, Serialize};
use near_sdk::{log, near, near_bindgen, require, PanicOnDefault};
use schemars::JsonSchema;
use near_sdk::{json_types::U128, log, near, near_bindgen, require, PanicOnDefault};
use uint::construct_uint;

construct_uint! {
/// 256-bit unsigned integer.
pub struct U256(4);
}

#[derive(Deserialize, Serialize, JsonSchema)]
#[serde(crate = "near_sdk::serde")]
#[near(serializers = [json, borsh])]
pub struct BasicReturnObject {
pub greeting: String,
pub number: u8,
Expand All @@ -28,8 +23,8 @@ pub(crate) fn proportional(amount: u128, numerator: u128, denominator: u128) ->
}

// Define the contract structure
#[near_bindgen]
#[derive(BorshDeserialize, BorshSerialize, PanicOnDefault)]
#[near(contract_state)]
#[derive(PanicOnDefault)]
pub struct NearTutorialContract {
greeting: String,
}
Expand Down
Loading