Skip to content
Open
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-all-crates: "true" # Yes, it's a string
- name: Install Cargo Plugins
run: cargo install cargo-make cargo-near --locked
run: |
cargo install cargo-make --locked
cargo install cargo-near --git https://github.com/near/cargo-near --rev daa04940cbf834ef3ccf55b595e140475e41a314
- name: Build
run: cargo make build
- name: Upload Artifacts
Expand Down Expand Up @@ -104,7 +106,9 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-all-crates: "true" # Yes, it's a string
- name: Install Cargo Plugins
run: cargo install cargo-make cargo-near --locked
run: |
cargo install cargo-make --locked
cargo install cargo-near --git https://github.com/near/cargo-near --rev daa04940cbf834ef3ccf55b595e140475e41a314
- name: Build Reproducible WASM and calculate checksum
run: cargo make build-reproducible
- name: Upload Reproducible Artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: cargo install --debug cargo-make@0.37.24 --locked

- name: Install cargo-near
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.17.0/cargo-near-installer.sh | sh
run: cargo install cargo-near --git https://github.com/near/cargo-near --rev daa04940cbf834ef3ccf55b595e140475e41a314

- name: Build Reproducible WASM
run: cargo make build-defuse-reproducible
Expand Down
20 changes: 8 additions & 12 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ args = [
"--locked",
"--manifest-path",
"./defuse/Cargo.toml",
"--features",
"abi,contract",
"--features=contract",
"--abi-features=abi,contract",
"--out-dir",
"${TARGET_DIR}",
"--no-embed-abi",
Expand All @@ -56,8 +56,8 @@ args = [
"--locked",
"--manifest-path",
"./escrow-swap/Cargo.toml",
"--features",
"abi,contract",
"--features=contract",
"--abi-features=abi,contract",
"--out-dir",
"${TARGET_DIR}",
"--no-embed-abi",
Expand All @@ -73,8 +73,7 @@ args = [
"--locked",
"--manifest-path",
"./poa-factory/Cargo.toml",
"--features",
"contract",
"--features=contract",
"--out-dir",
"${TARGET_DIR}",
"--no-embed-abi",
Expand All @@ -90,8 +89,7 @@ args = [
"--locked",
"--manifest-path",
"./poa-token/Cargo.toml",
"--features",
"contract",
"--features=contract",
"--out-dir",
"${TARGET_DIR}",
"--no-embed-abi",
Expand All @@ -107,8 +105,7 @@ args = [
"--locked",
"--manifest-path",
"./poa-token/Cargo.toml",
"--features",
"contract,no-registration",
"--features=contract,no-registration",
"--out-dir",
"${POA_TOKEN_WITH_NO_REGISTRATION_DIR}",
"--no-embed-abi",
Expand Down Expand Up @@ -251,8 +248,7 @@ args = [
"--locked",
"--manifest-path",
"./tests/contracts/multi-token-receiver-stub/Cargo.toml",
"--features",
"abi",
"--abi-features=abi",
"--out-dir",
"${MT_RECEIVER_STUB_DIR}",
"--no-embed-abi",
Expand Down
2 changes: 1 addition & 1 deletion core/src/amounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ where
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::schemars::{r#gen::SchemaGenerator, schema::Schema};
use serde_with::schemars_0_8::JsonSchemaAs;
Expand Down
2 changes: 1 addition & 1 deletion core/src/nonce/salted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl FromStr for Salt {
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::schemars::{
JsonSchema,
Expand Down
2 changes: 1 addition & 1 deletion core/src/payload/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<T> ExtractDefusePayload<T> for DefusePayload<T> {
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
mod examples {
use super::*;

Expand Down
2 changes: 1 addition & 1 deletion crypto/src/public_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl FromStr for PublicKey {
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::{
schemars::{
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/serde/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl<'de, C: TypedCurve, const N: usize> DeserializeAs<'de, [u8; N]> for AsCurve
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::schemars::{
JsonSchema,
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl FromStr for Signature {
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::{
schemars::{
Expand Down
3 changes: 2 additions & 1 deletion defuse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ container_build_command = [
"build",
"non-reproducible-wasm",
"--locked",
"--features=abi,contract",
"--features=contract",
"--abi-features=abi,contract",
"--no-embed-abi",
]

Expand Down
2 changes: 1 addition & 1 deletion defuse/src/contract/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
mod abi;
mod accounts;
mod admin;
Expand Down
2 changes: 1 addition & 1 deletion escrow-swap/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@ pub trait EscrowIntentEmit<'a>: Into<Event<'a>> {
impl<'a, T> EscrowIntentEmit<'a> for T where T: Into<Event<'a>> {}

// fix JsonSchema macro bug
#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
use near_sdk::serde;
2 changes: 1 addition & 1 deletion escrow-swap/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,5 @@ pub struct State {
}

// fix JsonSchema macro bug
#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
use near_sdk::serde;
2 changes: 1 addition & 1 deletion serde-utils/src/base58.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ where
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::schemars::{
JsonSchema,
Expand Down
2 changes: 1 addition & 1 deletion serde-utils/src/base64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl<T> AsBase64<T> {
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::schemars::{
JsonSchema,
Expand Down
2 changes: 1 addition & 1 deletion serde-utils/src/tlb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::schemars::{SchemaGenerator, schema::Schema};
use serde_with::schemars_0_8::JsonSchemaAs;
Expand Down
2 changes: 1 addition & 1 deletion token-id/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl FromStr for TokenId {
}
}

#[cfg(all(feature = "abi", not(target_arch = "wasm32")))]
#[cfg(feature = "abi")]
const _: () = {
use near_sdk::schemars::{
JsonSchema,
Expand Down
Loading