-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
329 additions
and
475 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
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,47 @@ | ||
use super::*; | ||
use near_sdk::{ | ||
borsh::{self, BorshSerialize}, | ||
serde::Serialize, | ||
}; | ||
|
||
/// NEP-171 mint action. | ||
#[derive(Clone, Debug, Serialize, BorshSerialize, PartialEq, Eq)] | ||
pub struct Nep171Mint<'a> { | ||
/// Token IDs to mint. | ||
pub token_ids: &'a [TokenId], | ||
/// Account ID of the receiver. | ||
pub receiver_id: &'a AccountId, | ||
/// Optional memo string. | ||
pub memo: Option<&'a str>, | ||
} | ||
|
||
/// NEP-171 burn action. | ||
#[derive(Clone, Debug, Serialize, BorshSerialize, PartialEq, Eq)] | ||
pub struct Nep171Burn<'a> { | ||
/// Token IDs to burn. | ||
pub token_ids: &'a [TokenId], | ||
/// Account ID of the owner. | ||
pub owner_id: &'a AccountId, | ||
/// Optional memo string. | ||
pub memo: Option<&'a str>, | ||
} | ||
|
||
/// Transfer metadata generic over both types of transfer (`nft_transfer` and | ||
/// `nft_transfer_call`). | ||
#[derive(Serialize, BorshSerialize, PartialEq, Eq, Clone, Debug, Hash)] | ||
pub struct Nep171Transfer<'a> { | ||
/// Why is this sender allowed to perform this transfer? | ||
pub authorization: Nep171TransferAuthorization, | ||
/// Sending account ID. | ||
pub sender_id: &'a AccountId, | ||
/// Receiving account ID. | ||
pub receiver_id: &'a AccountId, | ||
/// Token ID. | ||
pub token_id: &'a TokenId, | ||
/// Optional memo string. | ||
pub memo: Option<&'a str>, | ||
/// Message passed to contract located at `receiver_id` in the case of `nft_transfer_call`. | ||
pub msg: Option<&'a str>, | ||
/// `true` if the transfer is a revert for a `nft_transfer_call`. | ||
pub revert: bool, | ||
} |
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.