Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Fix soroban_sdk::i128 -> i128 (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Dec 3, 2022
1 parent 52c7ba4 commit 10cd25f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/common-interfaces/token.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,41 @@ pub trait Contract {
fn burn(
env: soroban_sdk::Env,
admin: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
from: soroban_auth::Identifier,
amount: soroban_sdk::i128,
amount: i128,
);

/// If "admin" is the administrator, mint "amount" to "to".
fn mint(
env: soroban_sdk::Env,
admin: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
to: soroban_auth::Identifier,
amount: soroban_sdk::i128,
amount: i128,
);

/// If "admin" is the administrator, set the administrator to "id".
fn set_admin(
env: soroban_sdk::Env,
admin: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
new_admin: soroban_auth::Identifier,
);

/// If "admin" is the administrator, freeze "id".
fn freeze(
env: soroban_sdk::Env,
admin: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
id: soroban_auth::Identifier,
);

/// If "admin" is the administrator, unfreeze "id".
fn unfreeze(
env: soroban_sdk::Env,
admin: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
id: soroban_auth::Identifier,
);

Expand All @@ -70,44 +70,44 @@ pub trait Contract {
env: soroban_sdk::Env,
from: soroban_auth::Identifier,
spender: soroban_auth::Identifier,
) -> soroban_sdk::i128;
) -> i128;

/// Set the allowance to "amount" for "spender" to transfer from "from".
fn approve(
env: soroban_sdk::Env,
from: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
spender: soroban_auth::Identifier,
amount: soroban_sdk::i128,
amount: i128,
);

/// Get the balance of "id".
fn balance(env: soroban_sdk::Env, id: soroban_auth::Identifier) -> soroban_sdk::i128;
fn balance(env: soroban_sdk::Env, id: soroban_auth::Identifier) -> i128;

/// Transfer "amount" from "from" to "to.
fn xfer(
env: soroban_sdk::Env,
from: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
to: soroban_auth::Identifier,
amount: soroban_sdk::i128,
amount: i128,
);

/// Transfer "amount" from "from" to "to", consuming the allowance of "spender".
fn xfer_from(
env: soroban_sdk::Env,
spender: soroban_auth::Signature,
nonce: soroban_sdk::i128,
nonce: i128,
from: soroban_auth::Identifier,
to: soroban_auth::Identifier,
amount: soroban_sdk::i128,
amount: i128,
);

// Returns true if "id" is frozen.
fn is_frozen(env: soroban_sdk::Env, id: soroban_auth::Identifier) -> bool;

// Returns the current nonce for "id".
fn nonce(env: soroban_sdk::Env, id: soroban_auth::Identifier) -> soroban_sdk::i128;
fn nonce(env: soroban_sdk::Env, id: soroban_auth::Identifier) -> i128;

// --------------------------------------------------------------------------------
// Descriptive Interface
Expand Down

0 comments on commit 10cd25f

Please sign in to comment.