Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions contracts/token-factory/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ pub enum Error {
/// Fee split basis points do not sum to 10_000
InvalidFeeSplit = 17,
/// Fee split recipient count exceeds `MAX_FEE_SPLIT_RECIPIENTS`
TooManyFeeSplitRecipients = 19,
TooManyFeeSplitRecipients = 18,
/// `backfill_capped_supply` already applied for this token
AlreadyBackfilled = 19,
Expand Down Expand Up @@ -1470,10 +1469,6 @@ impl TokenFactory {
/// addresses.
pub fn get_token_info_by_address(env: Env, token_address: Address) -> Result<TokenInfo, Error> {
let index: u32 = Self::read_addr_keyed(&env, &DataKey::TokenIndex(token_address))
let index: u32 = env
.storage()
.instance()
.get(&DataKey::TokenIndex(token_address))
.ok_or(Error::TokenNotFound)?;
Self::read_addr_keyed(&env, &DataKey::TokenInfo(index)).ok_or(Error::TokenNotFound)
}
Expand Down
3 changes: 3 additions & 0 deletions contracts/token-factory/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,9 @@ fn test_fee_split_zero_share_recipient_skipped_remainder_to_treasury() {
.mint_tokens(&token_addr, &admin, &mint_to, &1, &fee);

let big_share: i128 = fee * 9_999 / 10_000; // = 98
// `identity_op` is allowed here: the `* 1` is the 1-bps share and is kept
// literal so the formula reads in parallel with `big_share` above.
#[allow(clippy::identity_op)]
let tiny_share: i128 = fee * 1 / 10_000; // = 0 (floors to zero)

// The tiny recipient's share computes to 0 — the transfer is skipped.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,33 @@
},
"live_until": 6311999
},
{
"entry": {
"last_modified_ledger_seq": 0,
"data": {
"contract_data": {
"ext": "v0",
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4",
"key": {
"vec": [
{
"symbol": "wl"
},
{
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM"
}
]
},
"durability": "persistent",
"val": {
"bool": true
}
}
},
"ext": "v0"
},
"live_until": 535000
},
{
"entry": {
"last_modified_ledger_seq": 0,
Expand Down
Loading
Loading