mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-25 22:21:16 +00:00
fix(idl): align LEZ account metadata
Mark unconditional signer, init, and mutable accounts in guest entrypoints. Regenerate IDL artifacts for token, ATA, stablecoin, TWAP oracle, and AMM.
This commit is contained in:
@@ -19,7 +19,9 @@ mod token {
|
||||
/// Fresh public recipients must be explicitly authorized in the same transaction.
|
||||
#[instruction]
|
||||
pub fn transfer(
|
||||
#[account(mut, signer)]
|
||||
sender: AccountWithMetadata,
|
||||
#[account(mut)]
|
||||
recipient: AccountWithMetadata,
|
||||
amount_to_transfer: u128,
|
||||
) -> SpelResult {
|
||||
@@ -34,7 +36,9 @@ mod token {
|
||||
/// Definition and holding targets must be uninitialized and authorized.
|
||||
#[instruction]
|
||||
pub fn new_fungible_definition(
|
||||
#[account(init, signer)]
|
||||
definition_target_account: AccountWithMetadata,
|
||||
#[account(init, signer)]
|
||||
holding_target_account: AccountWithMetadata,
|
||||
name: String,
|
||||
total_supply: u128,
|
||||
@@ -58,8 +62,11 @@ mod token {
|
||||
)]
|
||||
#[instruction]
|
||||
pub fn new_definition_with_metadata(
|
||||
#[account(init, signer)]
|
||||
definition_target_account: AccountWithMetadata,
|
||||
#[account(init, signer)]
|
||||
holding_target_account: AccountWithMetadata,
|
||||
#[account(init, signer)]
|
||||
metadata_target_account: AccountWithMetadata,
|
||||
new_definition: token_core::NewTokenDefinition,
|
||||
metadata: Box<token_core::NewTokenMetadata>,
|
||||
@@ -82,6 +89,7 @@ mod token {
|
||||
pub fn initialize_account(
|
||||
ctx: ProgramContext,
|
||||
definition_account: AccountWithMetadata,
|
||||
#[account(init, signer)]
|
||||
account_to_initialize: AccountWithMetadata,
|
||||
) -> SpelResult {
|
||||
Ok(spel_framework::SpelOutput::execute(
|
||||
@@ -97,7 +105,9 @@ mod token {
|
||||
/// Burn tokens from the holder's account.
|
||||
#[instruction]
|
||||
pub fn burn(
|
||||
#[account(mut)]
|
||||
definition_account: AccountWithMetadata,
|
||||
#[account(mut, signer)]
|
||||
user_holding_account: AccountWithMetadata,
|
||||
amount_to_burn: u128,
|
||||
) -> SpelResult {
|
||||
@@ -113,7 +123,9 @@ mod token {
|
||||
#[instruction]
|
||||
pub fn mint(
|
||||
ctx: ProgramContext,
|
||||
#[account(mut, signer)]
|
||||
definition_account: AccountWithMetadata,
|
||||
#[account(mut)]
|
||||
user_holding_account: AccountWithMetadata,
|
||||
amount_to_mint: u128,
|
||||
) -> SpelResult {
|
||||
@@ -129,7 +141,9 @@ mod token {
|
||||
/// The printed copy target must be uninitialized and authorized.
|
||||
#[instruction]
|
||||
pub fn print_nft(
|
||||
#[account(mut, signer)]
|
||||
master_account: AccountWithMetadata,
|
||||
#[account(init, signer)]
|
||||
printed_account: AccountWithMetadata,
|
||||
) -> SpelResult {
|
||||
Ok(spel_framework::SpelOutput::execute(token_program::print_nft::print_nft(
|
||||
|
||||
Reference in New Issue
Block a user