mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-03 05:29:50 +00:00
fix: update all programs for mint_authority field, regenerate token IDL
This commit is contained in:
parent
cc70332293
commit
0ae30c98ae
@ -153,6 +153,66 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "new_fungible_definition_with_authority",
|
||||
"accounts": [
|
||||
{
|
||||
"name": "definition_target_account",
|
||||
"writable": false,
|
||||
"signer": false,
|
||||
"init": false
|
||||
},
|
||||
{
|
||||
"name": "holding_target_account",
|
||||
"writable": false,
|
||||
"signer": false,
|
||||
"init": false
|
||||
}
|
||||
],
|
||||
"args": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "initial_supply",
|
||||
"type": "u128"
|
||||
},
|
||||
{
|
||||
"name": "mint_authority",
|
||||
"type": {
|
||||
"array": [
|
||||
"u8",
|
||||
32
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "set_authority",
|
||||
"accounts": [
|
||||
{
|
||||
"name": "definition_account",
|
||||
"writable": false,
|
||||
"signer": false,
|
||||
"init": false
|
||||
}
|
||||
],
|
||||
"args": [
|
||||
{
|
||||
"name": "new_authority",
|
||||
"type": {
|
||||
"option": {
|
||||
"array": [
|
||||
"u8",
|
||||
32
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "print_nft",
|
||||
"accounts": [
|
||||
@ -194,6 +254,17 @@
|
||||
"type": {
|
||||
"option": "account_id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mint_authority",
|
||||
"type": {
|
||||
"option": {
|
||||
"array": [
|
||||
"u8",
|
||||
32
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -872,6 +872,7 @@ impl AccountWithMetadataForTests {
|
||||
name: String::from("test"),
|
||||
total_supply: BalanceForTests::lp_supply_init(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
},
|
||||
@ -897,6 +898,7 @@ impl AccountWithMetadataForTests {
|
||||
name: String::from("LP Token"),
|
||||
total_supply: MINIMUM_LIQUIDITY,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
},
|
||||
@ -914,6 +916,7 @@ impl AccountWithMetadataForTests {
|
||||
name: String::from("test"),
|
||||
total_supply: BalanceForTests::lp_supply_init(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
},
|
||||
|
||||
@ -41,6 +41,7 @@ fn definition_account() -> AccountWithMetadata {
|
||||
name: "TEST".to_string(),
|
||||
total_supply: 1000,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: nssa_core::account::Nonce(0),
|
||||
},
|
||||
|
||||
@ -401,6 +401,7 @@ impl Accounts {
|
||||
name: String::from("test"),
|
||||
total_supply: Balances::token_a_supply(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -414,6 +415,7 @@ impl Accounts {
|
||||
name: String::from("test"),
|
||||
total_supply: Balances::token_b_supply(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -427,6 +429,7 @@ impl Accounts {
|
||||
name: String::from("LP Token"),
|
||||
total_supply: Balances::token_lp_supply(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -705,6 +708,7 @@ impl Accounts {
|
||||
name: String::from("LP Token"),
|
||||
total_supply: Balances::token_lp_supply_add(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -797,6 +801,7 @@ impl Accounts {
|
||||
name: String::from("LP Token"),
|
||||
total_supply: Balances::token_lp_supply_remove(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -810,6 +815,7 @@ impl Accounts {
|
||||
name: String::from("LP Token"),
|
||||
total_supply: 0,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -902,6 +908,7 @@ impl Accounts {
|
||||
name: String::from("LP Token"),
|
||||
total_supply: Balances::lp_supply_init(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -1390,6 +1397,7 @@ fn fungible_total_supply(account: &Account) -> u128 {
|
||||
name: _,
|
||||
total_supply,
|
||||
metadata_id: _,
|
||||
mint_authority: _,
|
||||
} = definition
|
||||
else {
|
||||
panic!("expected fungible token definition")
|
||||
|
||||
@ -84,6 +84,7 @@ impl Accounts {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_000_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -121,6 +122,7 @@ impl Accounts {
|
||||
name: String::from("Foreign Gold"),
|
||||
total_supply: 1_000_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -495,6 +497,7 @@ fn ata_burn() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 700_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
|
||||
@ -108,6 +108,7 @@ impl Accounts {
|
||||
name: String::from("Gold"),
|
||||
total_supply: Balances::user_holding_init(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -133,6 +134,7 @@ impl Accounts {
|
||||
name: String::from("DAI"),
|
||||
total_supply: Balances::stablecoin_supply_init(),
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
|
||||
@ -61,6 +61,7 @@ impl Accounts {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_000_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -74,6 +75,7 @@ impl Accounts {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_000_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -164,6 +166,7 @@ fn token_new_fungible_definition() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_000_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(1),
|
||||
}
|
||||
@ -415,6 +418,7 @@ fn token_burn() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 800_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -464,6 +468,7 @@ fn token_mint() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_500_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(1),
|
||||
}
|
||||
@ -585,6 +590,7 @@ fn token_mint_fresh_authorized_public_recipient() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_500_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(1),
|
||||
}
|
||||
|
||||
@ -79,6 +79,7 @@ fn collateral_definition_account() -> AccountWithMetadata {
|
||||
name: "SNT".to_owned(),
|
||||
total_supply: 1_000_000,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
},
|
||||
@ -156,6 +157,7 @@ fn stablecoin_definition_account() -> AccountWithMetadata {
|
||||
name: "DAI".to_owned(),
|
||||
total_supply: 1_000_000,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
},
|
||||
@ -389,6 +391,7 @@ fn open_position_rejects_mismatched_token_definition() {
|
||||
name: "OTHER".to_owned(),
|
||||
total_supply: 1,
|
||||
metadata_id: None,
|
||||
mint_authority: None,
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user