Skip to content

Commit 43214d3

Browse files
committed
Fix CI
1 parent 63a6ca1 commit 43214d3

25 files changed

+36
-41
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- Implement `bn128` precompiles ‒ [2708](https://github.com/use-ink/ink/pull/2718)
1111

1212
### Changed
13-
- Change `selector_bytes!` + `selector_id!` macro to accept `Abi` argument ‒ [2721](https://github.com/use-ink/ink/pull/2721)
13+
- Change `selector_bytes!` macro to accept `Abi` argument ‒ [2721](https://github.com/use-ink/ink/pull/2721)
1414
- Refactor contract ref generation and add automatic re-exporting ‒ [#2710](https://github.com/use-ink/ink/pull/2710)
1515
- Implement and stabilize `terminate_contract`[2708](https://github.com/use-ink/ink/pull/2708)
1616

crates/ink/macro/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,7 @@ pub fn blake2x256(input: TokenStream) -> TokenStream {
7979
///
8080
/// ```
8181
/// # use ink_macro::selector_id;
82-
/// # use ink_primitives::abi::Abi;
83-
/// // ink! ABI (BLAKE-2)
84-
/// assert_eq!(selector_id!(Abi::Ink, "hello"), 843960066,);
85-
///
86-
/// // Solidity ABI (Keccak-256)
87-
/// assert_eq!(selector_id!(Abi::Sol, "hello"), 0x19cb10b7,);
82+
/// assert_eq!(selector_id!("hello"), 843960066,);
8883
/// ```
8984
#[proc_macro]
9085
pub fn selector_id(input: TokenStream) -> TokenStream {

crates/ink/tests/ui/abi/all/pass/message-name-override.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ unsafe extern "Rust" {
2727
fn main() {
2828
// Message selector and selector id both use the name override.
2929
// `blake2b("myMessage")` == `0x6fdbfc04`
30-
const MESSAGE_ID: u32 = ::ink::selector_id!(Abi::Ink, "myMessage");
30+
const MESSAGE_ID: u32 = ::ink::selector_id!("myMessage");
3131
assert_eq!(
3232
<Contract as ::ink::reflect::DispatchableMessageInfo<MESSAGE_ID>>::SELECTOR,
3333
[0x6f, 0xdb, 0xfc, 0x04],

crates/ink/tests/ui/abi/all/pass/message-selector-encoding.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ mod contract {
5151

5252
fn main() {
5353
// ink! `message_0` trait definition
54-
const TRAIT_ID: u32 = ::ink::selector_id!(Abi::Ink, "Messages::message_0");
54+
const TRAIT_ID: u32 = ::ink::selector_id!("Messages::message_0");
5555
assert_eq!(
5656
<Contract as ::ink::reflect::DispatchableMessageInfo<TRAIT_ID>>::SELECTOR,
5757
[0xFB, 0xAB, 0x03, 0xCE],
@@ -85,7 +85,7 @@ fn main() {
8585
);
8686

8787
// ink! `message_3` inherent
88-
const INHERENT_ID: u32 = ::ink::selector_id!(Abi::Ink, "message_3");
88+
const INHERENT_ID: u32 = ::ink::selector_id!("message_3");
8989
assert_eq!(
9090
<Contract as ::ink::reflect::DispatchableMessageInfo<INHERENT_ID>>::SELECTOR,
9191
[0xB6, 0xC3, 0x27, 0x49],

crates/ink/tests/ui/abi/all/pass/trait-def-message-name-override.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn main() {
2727
}
2828

2929
// ink! selector
30-
assert_selector_eq!(selector_id!(Abi::Ink, "myMessage"), selector_bytes!(Abi::Ink, "TraitDefinition::myMessage"));
30+
assert_selector_eq!(selector_id!("myMessage"), selector_bytes!(Abi::Ink, "TraitDefinition::myMessage"));
3131

3232
// `keccak256("myMessage()")` == `0x1b008a9f`
3333
assert_selector_eq!(0x1b008a9f_u32, [0x1b, 0x00, 0x8a, 0x9f]);

crates/ink/tests/ui/contract/pass/constructor/constructor-name-override.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ unsafe extern "Rust" {
2525
fn main() {
2626
// Constructor selector and selector id both use the name override.
2727
// `blake2b("myConstructor")` == `0xca295c67`
28-
const CTOR_ID: u32 = ::ink::selector_id!(Abi::Ink, "myConstructor");
28+
const CTOR_ID: u32 = ::ink::selector_id!("myConstructor");
2929
assert_eq!(
3030
<Contract as ::ink::reflect::DispatchableConstructorInfo<CTOR_ID>>::SELECTOR.unwrap(),
3131
[0xca, 0x29, 0x5c, 0x67],

crates/ink/tests/ui/contract/pass/constructor/constructor-return-result-alias.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() {
2828
use contract::Contract;
2929
use std::any::TypeId;
3030

31-
const ID: u32 = ::ink::selector_id!(Abi::Ink, "constructor");
31+
const ID: u32 = ::ink::selector_id!("constructor");
3232
assert_eq!(
3333
<Contract as ::ink::reflect::DispatchableConstructorInfo<ID>>::IS_RESULT,
3434
true

crates/ink/tests/ui/contract/pass/constructor/constructor-return-result-err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626
use contract::Contract;
2727
use std::any::TypeId;
2828

29-
const ID: u32 = ::ink::selector_id!(Abi::Ink, "constructor");
29+
const ID: u32 = ::ink::selector_id!("constructor");
3030
assert_eq!(
3131
<Contract as ::ink::reflect::DispatchableConstructorInfo<ID>>::IS_RESULT,
3232
true

crates/ink/tests/ui/contract/pass/constructor/constructor-return-result-explicit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626
use contract::Contract;
2727
use std::any::TypeId;
2828

29-
const ID: u32 = ::ink::selector_id!(Abi::Ink, "constructor");
29+
const ID: u32 = ::ink::selector_id!("constructor");
3030

3131
assert_eq!(
3232
<Contract as ::ink::reflect::DispatchableConstructorInfo<ID>>::IS_RESULT,

crates/ink/tests/ui/contract/pass/constructor/constructor-selector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mod contract {
3030
}
3131

3232
fn main() {
33-
const ID: u32 = ::ink::selector_id!(Abi::Ink, "constructor_0");
33+
const ID: u32 = ::ink::selector_id!("constructor_0");
3434
assert_eq!(
3535
<Contract as ::ink::reflect::DispatchableConstructorInfo<ID>>::SELECTOR.unwrap(),
3636
selector_bytes!(Abi::Ink, "constructor_0")

0 commit comments

Comments
 (0)