-
Notifications
You must be signed in to change notification settings - Fork 76
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
1 parent
4b3fac8
commit 6b98a3b
Showing
10 changed files
with
71 additions
and
94 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
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
8 changes: 4 additions & 4 deletions
8
cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/metadata.rs
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
use soroban_sdk::{Env, String}; | ||
use soroban_token_sdk::{metadata::TokenMetadata, TokenUtils}; | ||
|
||
pub fn read_decimal(e: &Env) -> u32 { | ||
pub fn decimal(e: &Env) -> u32 { | ||
let util = TokenUtils::new(e); | ||
util.metadata().get_metadata().decimal | ||
} | ||
|
||
pub fn read_name(e: &Env) -> String { | ||
pub fn name(e: &Env) -> String { | ||
let util = TokenUtils::new(e); | ||
util.metadata().get_metadata().name | ||
} | ||
|
||
pub fn read_symbol(e: &Env) -> String { | ||
pub fn symbol(e: &Env) -> String { | ||
let util = TokenUtils::new(e); | ||
util.metadata().get_metadata().symbol | ||
} | ||
|
||
pub fn write_metadata(e: &Env, metadata: TokenMetadata) { | ||
pub fn write(e: &Env, metadata: TokenMetadata) { | ||
let util = TokenUtils::new(e); | ||
util.metadata().set_metadata(&metadata); | ||
} |
Oops, something went wrong.