Skip to content

Commit 9674819

Browse files
tests: Use #[ink::error] in integration tests (#2679)
1 parent 1f6baa0 commit 9674819

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

integration-tests/public/dns/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod dns {
8282

8383
/// Errors that can occur upon calling this contract.
8484
#[derive(Debug, PartialEq, Eq)]
85-
#[ink::scale_derive(Encode, Decode, TypeInfo)]
85+
#[ink::error]
8686
pub enum Error {
8787
/// Returned if the name already exists upon registration.
8888
NameAlreadyExists,

integration-tests/public/erc1155/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub type TokenId = u128;
2828

2929
// The ERC-1155 error types.
3030
#[derive(Debug, PartialEq, Eq)]
31-
#[ink::scale_derive(Encode, Decode, TypeInfo)]
31+
#[ink::error]
3232
pub enum Error {
3333
/// This token ID has not yet been created by the contract.
3434
UnexistentToken,

integration-tests/public/erc20/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mod erc20 {
4343

4444
/// The ERC-20 error types.
4545
#[derive(Debug, PartialEq, Eq)]
46-
#[ink::scale_derive(Encode, Decode, TypeInfo)]
46+
#[ink::error]
4747
pub enum Error {
4848
/// Returned if not enough balance to fulfill a request is available.
4949
InsufficientBalance,

integration-tests/public/erc721/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ mod erc721 {
7373
}
7474

7575
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
76-
#[ink::scale_derive(Encode, Decode, TypeInfo)]
76+
#[ink::error]
7777
pub enum Error {
7878
NotOwner,
7979
NotApproved,

integration-tests/public/multisig/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ mod multisig {
137137

138138
/// Errors that can occur upon calling this contract.
139139
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
140-
#[ink::scale_derive(Encode, Decode, TypeInfo)]
140+
#[ink::error]
141141
pub enum Error {
142142
/// Returned if the call failed.
143143
TransactionFailed,

integration-tests/public/payment-channel/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mod payment_channel {
6565

6666
/// Errors that can occur upon calling this contract.
6767
#[derive(Debug, PartialEq, Eq)]
68-
#[ink::scale_derive(Encode, Decode, TypeInfo)]
68+
#[ink::error]
6969
pub enum Error {
7070
/// Returned if caller is not the `sender` while required to.
7171
CallerIsNotSender,

integration-tests/public/trait-erc20/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mod erc20 {
99

1010
/// The ERC-20 error types.
1111
#[derive(Debug, PartialEq, Eq)]
12-
#[ink::scale_derive(Encode, Decode, TypeInfo)]
12+
#[ink::error]
1313
pub enum Error {
1414
/// Returned if not enough balance to fulfill a request is available.
1515
InsufficientBalance,

0 commit comments

Comments
 (0)