Skip to content
Merged
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
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,22 @@ target/wasm32-unknown-unknown/debug/aurora_engine.wasm: Cargo.toml Cargo.lock $(
test: test-mainnet

mainnet-test-build: FEATURES=mainnet,integration-test,meta-call
mainnet-test-build: mainnet-release.wasm
mainnet-test-build: mainnet-test.wasm

betanet-test-build: FEATURES=betanet,integration-test,meta-call
betanet-test-build: betanet-release.wasm
betanet-test-build: betanet-test.wasm

testnet-test-build: FEATURES=testnet,integration-test,meta-call
testnet-test-build: testnet-release.wasm
testnet-test-build: testnet-test.wasm

mainnet-test.wasm: target/wasm32-unknown-unknown/release/aurora_engine.wasm
cp $< $@

testnet-test.wasm: target/wasm32-unknown-unknown/release/aurora_engine.wasm
cp $< $@

betanet-test.wasm: target/wasm32-unknown-unknown/release/aurora_engine.wasm
cp $< $@

test-mainnet: mainnet-test-build
$(CARGO) test --features mainnet-test
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,14 @@ mod contract {
/// MUTATIVE METHODS
///

#[cfg(feature = "integration-test")]
#[no_mangle]
pub extern "C" fn deploy_code() {
sdk::panic_utf8(b"ERR_DEPLOYED_TEST_VERSION");
Comment thread
sept-en marked this conversation as resolved.
}

/// Deploy code into the EVM.
#[cfg(not(feature = "integration-test"))]
#[no_mangle]
pub extern "C" fn deploy_code() {
let input = sdk::read_input();
Expand Down
6 changes: 3 additions & 3 deletions src/test_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ use crate::types::AccountId;
not(any(feature = "testnet", feature = "betanet"))
))]
lazy_static_include::lazy_static_include_bytes! {
EVM_WASM_BYTES => "mainnet-release.wasm"
EVM_WASM_BYTES => "mainnet-test.wasm"
}

#[cfg(all(
feature = "testnet-test",
not(any(feature = "mainnet", feature = "betanet"))
))]
lazy_static_include::lazy_static_include_bytes! {
EVM_WASM_BYTES => "testnet-release.wasm"
EVM_WASM_BYTES => "testnet-test.wasm"
}

#[cfg(all(
feature = "betanet-test",
not(any(feature = "mainnet", feature = "testnet"))
))]
lazy_static_include::lazy_static_include_bytes! {
EVM_WASM_BYTES => "betanet-release.wasm"
EVM_WASM_BYTES => "betanet-test.wasm"
}

// TODO(Copied from #84): Make sure that there is only one Signer after both PR are merged.
Expand Down