Skip to content

Commit

Permalink
chore: revert importing borsh in near-contract-standards and `exa…
Browse files Browse the repository at this point in the history
…mples`
  • Loading branch information
dj8yf0μl committed Sep 5, 2023
1 parent 9ed89a8 commit 42759d9
Show file tree
Hide file tree
Showing 60 changed files with 121 additions and 102 deletions.
2 changes: 1 addition & 1 deletion ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else
cargo generate-lockfile

### this is section for packages, refusing to work with 1.69
cargo update -p clap@4.4.1 --precise 4.3.24
cargo update -p clap@4.4.2 --precise 4.3.24
cargo update -p clap_lex@0.5.1 --precise 0.5.0
### end of 1.69 threshold section

Expand Down
17 changes: 8 additions & 9 deletions examples/adder/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/adder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ crate-type = ["cdylib"]
[dependencies]
near-sdk = { path = "../../near-sdk", features = ["unstable"] }
serde = { version = "1", features = ["derive"] }
borsh = { version = "1.0.0-alpha.4", features = ["derive"] }
schemars = "0.8"

[dev-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions examples/adder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use near_sdk::serde::{Deserialize, Serialize};
use near_sdk::{near_bindgen, NearSchema};

#[derive(NearSchema, Serialize, Deserialize, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "::near_sdk::borsh")]
#[abi(json, borsh)]
pub struct Pair(u32, u32);

Expand All @@ -15,6 +16,7 @@ pub struct DoublePair {

#[near_bindgen]
#[derive(Default, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "::near_sdk::borsh")]
pub struct Adder {}

#[near_bindgen]
Expand Down
16 changes: 8 additions & 8 deletions examples/callback-results/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 8 additions & 10 deletions examples/cross-contract-calls/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/cross-contract-calls/high-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }
borsh = { version = "1.0.0-alpha.4", features = ["derive"] }
1 change: 1 addition & 0 deletions examples/cross-contract-calls/high-level/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use near_sdk::{log, near_bindgen, PromiseOrValue};

#[near_bindgen]
#[derive(Default, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "::near_sdk::borsh")]
pub struct CrossContract {}

#[near_bindgen]
Expand Down
1 change: 0 additions & 1 deletion examples/cross-contract-calls/low-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }
borsh = { version = "1.0.0-alpha.4", features = ["derive"] }
1 change: 1 addition & 0 deletions examples/cross-contract-calls/low-level/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const FACTORIAL_MULT_CALL_GAS: Gas = Gas(10_000_000_000_000);

#[near_bindgen]
#[derive(Default, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "::near_sdk::borsh")]
pub struct CrossContract {}

#[near_bindgen]
Expand Down
18 changes: 8 additions & 10 deletions examples/factory-contract/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/factory-contract/high-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }
borsh = { version = "1.0.0-alpha.4", features = ["derive"] }
1 change: 1 addition & 0 deletions examples/factory-contract/high-level/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use near_sdk::{env, ext_contract, json_types::U128, near_bindgen, AccountId, Pro

#[near_bindgen]
#[derive(Default, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "::near_sdk::borsh")]
pub struct FactoryContract {}

// If the `ext_contract` name is not provided explicitly, the namespace for generated methods is
Expand Down
1 change: 0 additions & 1 deletion examples/factory-contract/low-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }
borsh = { version = "1.0.0-alpha.4", features = ["derive"] }
1 change: 1 addition & 0 deletions examples/factory-contract/low-level/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SINGLE_CALL_GAS: Gas = Gas(20_000_000_000_000);

#[near_bindgen]
#[derive(Default, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "::near_sdk::borsh")]
pub struct FactoryContract {}

#[near_bindgen]
Expand Down
19 changes: 8 additions & 11 deletions examples/fungible-token/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/fungible-token/ft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }
borsh = { version = "1.0.0-alpha.4", features = ["derive"] }
near-contract-standards = { path = "../../../near-contract-standards" }
schemars = "0.8"
Loading

0 comments on commit 42759d9

Please sign in to comment.