Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ext_contract macro to FungibleTokenMetadataProvider trait #836

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion near-contract-standards/src/fungible_token/metadata.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize};
use near_sdk::json_types::Base64VecU8;
use near_sdk::require;
use near_sdk::serde::{Deserialize, Serialize};
use near_sdk::{ext_contract, require};

pub const FT_METADATA_SPEC: &str = "ft-1.0.0";

Expand All @@ -17,6 +17,7 @@ pub struct FungibleTokenMetadata {
pub decimals: u8,
}

#[ext_contract(ext_ft_metadata)]
pub trait FungibleTokenMetadataProvider {
fn ft_metadata(&self) -> FungibleTokenMetadata;
}
Expand Down