Skip to content

Commit

Permalink
use inline_always_uapi branch
Browse files Browse the repository at this point in the history
Test with inline always

fix clip
  • Loading branch information
pgherveou committed Jan 10, 2024
1 parent 71a7080 commit 3519e2c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const_env = { version = "0.1"}
# Substrate dependencies
pallet-contracts-primitives = { version = "26.0.0", default-features = false }
# TODO update once released
pallet-contracts-uapi = { git = "https://github.com/paritytech/polkadot-sdk.git", branch="pg/add-fixtures-test-size", default-features = false }
pallet-contracts-uapi = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "pg/inline_always_uapi", default-features = false }
sp-core = { version = "23.0.0", default-features = false }
sp-keyring = { version = "26.0.0", default-features = false }
sp-runtime = { version = "26.0.0", default-features = false }
Expand Down
9 changes: 2 additions & 7 deletions integration-tests/call-runtime/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ mod runtime_call {
RuntimeCall,
};

use ink::env::{
Error as EnvError,
ReturnErrorCode,
};
use ink::env::Error as EnvError;

/// A trivial contract with a single message, that uses `call-runtime` API for
/// performing native token transfer.
Expand All @@ -66,9 +63,7 @@ mod runtime_call {
impl From<EnvError> for RuntimeError {
fn from(e: EnvError) -> Self {
match e {
EnvError::CallRuntimeFailed => {
RuntimeError::CallRuntimeFailed
}
EnvError::CallRuntimeFailed => RuntimeError::CallRuntimeFailed,
_ => panic!("Unexpected error from `pallet-contracts`."),
}
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/erc1155/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ mod erc1155 {
}
Err(e) => {
match e {
ink::env::Error::CodeNotFound | ink::env::Error::NotCallable,
) => {
ink::env::Error::CodeNotFound
| ink::env::Error::NotCallable => {
// Our recipient wasn't a smart contract, so there's
// nothing more for
// us to do
Expand Down
15 changes: 3 additions & 12 deletions integration-tests/sr25519-verification/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ pub mod sr25519_verification {
143,
];
let result = ink::env::sr25519_verify(&signature, &message, &public_key);
assert_eq!(
result,
Err(ink::env::Error::Sr25519VerifyFailed)
);
assert_eq!(result, Err(ink::env::Error::Sr25519VerifyFailed));
}

#[ink::test]
Expand All @@ -102,10 +99,7 @@ pub mod sr25519_verification {
143,
];
let result = ink::env::sr25519_verify(&signature, &message, &public_key);
assert_eq!(
result,
Err(ink::env::Error::Sr25519VerifyFailed)
);
assert_eq!(result, Err(ink::env::Error::Sr25519VerifyFailed));
}

#[ink::test]
Expand All @@ -131,10 +125,7 @@ pub mod sr25519_verification {
143,
];
let result = ink::env::sr25519_verify(&signature, &message, &public_key);
assert_eq!(
result,
Err(ink::env::Error::Sr25519VerifyFailed)
);
assert_eq!(result, Err(ink::env::Error::Sr25519VerifyFailed));
}
}
}

0 comments on commit 3519e2c

Please sign in to comment.