-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: sczembor <[email protected]>
- Loading branch information
1 parent
0641d65
commit babd065
Showing
7 changed files
with
324 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use near_sdk::env::panic_str; | ||
use near_sdk::FunctionError; | ||
|
||
#[cfg_attr(not(target_arch = "wasm32"), derive(PartialEq, Debug))] | ||
pub enum IsHumanCallErr { | ||
NotHuman, | ||
} | ||
|
||
impl FunctionError for IsHumanCallErr { | ||
fn panic(&self) -> ! { | ||
match self { | ||
IsHumanCallErr::NotHuman => panic_str("caller is not a human"), | ||
} | ||
} | ||
} | ||
|
||
#[cfg_attr(not(target_arch = "wasm32"), derive(PartialEq, Debug))] | ||
pub enum SoulTransferErr { | ||
TransferLocked, | ||
} | ||
|
||
impl FunctionError for SoulTransferErr { | ||
fn panic(&self) -> ! { | ||
match self { | ||
SoulTransferErr::TransferLocked => { | ||
panic_str("soul transfer not possible: owner has a transfer lock") | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.