Skip to content

Commit

Permalink
fixed build scripts, ajdusted external mock contract to return the value
Browse files Browse the repository at this point in the history
  • Loading branch information
alenmestrov committed Dec 4, 2024
1 parent 6482a61 commit 4eb7d38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions contracts/icp/proxy-contract/build_mock_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ echo "Building mock ledger contract..."

echo "Building mock external contract..."
./mock/external/build.sh

echo "Building context-config contract..."
../context-config/build.sh
8 changes: 4 additions & 4 deletions contracts/icp/proxy-contract/mock/external/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ thread_local! {

#[ic_cdk::update]
fn test_method(args: Vec<u8>) -> Vec<u8> {
CALLS.with(|calls| {
calls.borrow_mut().push(args.clone());
args // Return the same args back
})
CALLS.with(|calls| {
calls.borrow_mut().push(args.clone());
args // Return the same args back
})
}

#[ic_cdk::query]
Expand Down
1 change: 0 additions & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ cd "$(dirname $0)"
../contracts/proxy-lib/build-test-deps.sh
../contracts/icp/context-config/build.sh
../contracts/icp/proxy-contract/build_mock_contracts.sh
../contracts/icp/proxy-contract/build.sh
# Run cargo test
cargo test

0 comments on commit 4eb7d38

Please sign in to comment.