@debridge-finance/solana-contracts-client
Version:
[Docs](docs/README.md)
1,343 lines (1,342 loc) • 102 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IDL = void 0;
exports.IDL = {
version: "1.4.0",
name: "debridge_settings_program",
docs: [
"The 'debridge_settings_program' is Solana program provider settings for deBridge Protocol",
"For security reasons, ownership of the main structures is carried out from this program.",
"",
"There are several roles for this module.",
'- "👤 Protocol Authority" - multi-signature account with extra privilege for setup protocol settings',
'- "👤 Stop Tap" - this account that has the authority to stop the protocol, but does not have the authority to start it',
'- "👤 User" - user of our Protocol',
'- "👤 Bridge Contract" - debridge contract program. It can change bridge data condition. This type of access can be granted by `mint_authority` account with pubkey from [`Bridge::get_mint_authority_address`]',
],
instructions: [
{
name: "initializeState",
docs: [
"Constructor of program",
"",
"Initializes the state and main roles in the system",
"Whoever calls him becomes authority",
"",
"# Arguments",
"* `confirmation_threshold` - how many transactions are needed within one slot to use `excess_confirmation` instead of `min_confirmations`",
"* `excess_confirmation` - extra number of confirmations required to confirm actions in the system",
"* `min_confirmation` - minimum number of confirmations required to confirm actions in the system",
"",
"# Events",
"* [`events::StateInitialized`]",
"",
"# Roles",
"* 👤 User - anyone can initialize state but program key signature needed",
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: false,
docs: ["👤 Protocol Authority"],
},
{
name: "stopTap",
isMut: false,
isSigner: false,
docs: ["👤 Stop Tap"],
},
{
name: "feeBeneficiary",
isMut: false,
isSigner: false,
docs: [
"Beneficiary of the commission in the system",
"Implied that this will be an account belonging to another program (FeeProxy),",
"which will be responsible for the distribution of commissions",
],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
docs: ["System program account"],
},
{
name: "settingsProgram",
isMut: false,
isSigner: true,
docs: ["Need settings program signature to initialize state"],
},
{
name: "payer",
isMut: true,
isSigner: true,
docs: ["👤 User: Fund account for state initializing"],
},
],
args: [
{
name: "confirmationThreshold",
type: "u32",
},
{
name: "excessConfirmations",
type: "u32",
},
{
name: "minConfirmations",
type: "u32",
},
],
},
{
name: "addOracle",
docs: [
"Add a public address (from Ethereum network) as an oracle to our protocol",
"",
"Oracles are those who can sign certain actions prescribed by the protocol by secp256k1",
"algorithm.",
"",
"# Arguments",
"* `oracle` - public address. Truncated hash from public key secp256k1",
"* `is_required` - Is this oracle required to sign all actions to the system?",
"",
"# Events",
"* [`events::OracleAdded`]",
"",
"# Roles",
'* "👤 Protocol Authority" only',
"",
"# Errors",
"* `ErrorCode::OracleDuplication` - If the oracle is already present inside the State",
"* `ErrorCode::MaxOracleCount` - Oracles must be less",
"than [`state::ORACLES_MAX_SIZE`] & [`state::REQUIRED_ORACLES_MAX_SIZE`] respectively",
"* `ErrorCode::InvalidMinConfirmationCount` - If the new number of oracles violates the",
"invariant for min confirmations (`min_confirmation > (oracles_len / 2) + 1`)",
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "oracle",
type: {
array: ["u8", 20],
},
},
{
name: "isRequired",
type: "bool",
},
],
},
{
name: "removeOracle",
docs: [
"Remove a public address from Ethereum network from the list of oracles of our protocol",
"",
"Oracles are those who can sign certain actions prescribed by the protocol by secp256k1",
"algorithm.",
"",
"# Arguments",
"* `removing_oracle` - public address. Truncated hash from public key secp256k1",
"* `is_required` - Is this oracle required to sign all actions to the system?",
"In this case, it is used to optimize the search in the list of oracles",
"# Events",
"* [`events::OracleRemoved`]",
"",
"# Roles",
'* "👤 Protocol Authority" only',
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "removingOracle",
type: {
array: ["u8", 20],
},
},
{
name: "isRequired",
type: "bool",
},
],
},
{
name: "updateMinConfirmationCount",
docs: [
"Updates the number of minimum confirmations required for actions under the protocol",
"",
"# Arguments",
"* `min_confirmation` - new number of minimum confirmations",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
'* "👤 Protocol Authority" only',
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "minConfirmation",
type: "u32",
},
],
},
{
name: "updateExcessConfirmationTimeslot",
docs: [
"Updates the timer, for check excess confirmation count",
"",
"# Arguments",
"* `new_excess_confirmation_timeslot_seconds` - new timeslot duration in seconds",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
'* "👤 Protocol Authority" only',
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "newExcessConfirmationTimeslotSeconds",
type: "u64",
},
],
},
{
name: "updateExcessConfirmationCount",
docs: [
"Updates the number of excess confirmations required for actions under the protocol",
"",
"# Arguments",
"* `excess_confirmation` - new number of excess confirmations",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
'* "👤 Protocol Authority" only',
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "excessConfirmations",
type: "u32",
},
],
},
{
name: "updateConfirmationThreshold",
docs: [
"Updates the number of how many transactions are needed within one slot",
"to use `excess_confirmation` instead of `min_confirmations` from [`State`]",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
"* 👤 Protocol Authority only",
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "confirmationThreshold",
type: "u32",
},
],
},
{
name: "updateGlobalFee",
docs: [
"Updates values of global fix fee and transfer fee bps",
"",
"# Arguments",
"* `global_fixed_fee` - new global fixed fee",
"* `global_transfer_fee` - new global transfer fee bps",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
"* 👤 Protocol Authority only",
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "globalFixedFee",
type: "u64",
},
{
name: "globalTransferFeeBps",
type: "u64",
},
],
},
{
name: "pauseState",
docs: ["Pause state", "", "# Events", "* [`events::StateUpdated`]", "", "# Roles", "* 👤 Stop tap only"],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "stopTap",
isMut: false,
isSigner: true,
docs: ["👤 Stop Tap"],
},
],
args: [],
},
{
name: "unpauseState",
docs: ["Unpause state", "", "# Events", "* [`events::StateUpdated`]", "", "# Roles", "* 👤 Protocol Authority only"],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [],
},
{
name: "updateStopTap",
docs: [
"Update StopTap account in [`State`] that has the authority to stop the protocol, but does not have the authority to start it",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
"* 👤 Protocol Authority only",
],
accounts: [
{
name: "updateState",
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
},
{
name: "account",
isMut: false,
isSigner: false,
docs: ["New value of some account stored in state"],
},
],
args: [],
},
{
name: "updateFeeBeneficiary",
docs: [
"Update FeeBeneficiary account in [`State`] that has the authority to stop the protocol, but does not have the authority to start it",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
"* 👤 Protocol Authority only",
],
accounts: [
{
name: "updateState",
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
},
{
name: "account",
isMut: false,
isSigner: false,
docs: ["New value of some account stored in state"],
},
],
args: [],
},
{
name: "updateProtocolAuthority",
docs: [
"Update Protocol Authority account in [`State`]",
"",
"# Events",
"* [`events::StateUpdated`]",
"",
"# Roles",
"* 👤 Protocol Authority only",
],
accounts: [
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
{
name: "newProtocolAuthority",
isMut: false,
isSigner: true,
docs: ["New authority of protocol"],
},
],
args: [],
},
{
name: "storeConfirmations",
docs: [
"Initialize or update [`ConfirmationStorage`] storage",
"",
"Due to the limitations of Solana on the length of transactions,",
"we create a temporary storage for verified oracle keys that have already signed the message",
"",
"# Arguments",
"* `msg` - Message whose signature is being verified",
"",
"# Events",
"* [`events::OracleSignatureVerified]",
"* [`events::Log]",
"",
"# Roles",
"* 👤 User - anyone can store signature.",
],
accounts: [
{
name: "state",
isMut: false,
isSigner: false,
docs: [
"State account with service information",
"There is a single state account for the entire program",
"",
"We use it here for filter oracle keys from instructions",
],
},
{
name: "confirmationStorage",
isMut: true,
isSigner: false,
docs: [
"Temporary storage for signatures",
"Stores signatures for one day. Access is obtained by a signed message bytes",
"[`ConfirmationStorage`] inside account data",
],
},
{
name: "instructions",
isMut: false,
isSigner: false,
docs: [
"Instructions system variable account",
"",
"Stores previous instructions within a transaction",
"We use to check the signatures",
],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
docs: ["System program account"],
},
{
name: "payer",
isMut: false,
isSigner: false,
docs: ["👤 User", "Signer if [`Self::confirmation_storage] not exists"],
},
],
args: [
{
name: "msg",
type: "bytes",
},
],
},
{
name: "closeConfirmationStorageForSubmission",
docs: [
"Close the signature storage",
"",
"",
"# Arguments",
"* `msg` - Message whose signature is being verified",
"",
"# Roles",
"* 👤 Protocol Authority",
"If the composition of the oracles has completely changed, then it may be necessary to",
"close the confirmation storage for create it anew and empty",
"* 👤 User",
"If the storage was used, then you can return the funds to the creator of the vault.",
],
accounts: [
{
name: "state",
isMut: false,
isSigner: false,
docs: [
"State account with service information",
"There is a single state account for the entire program",
"",
"We use it here for filter oracle keys from instructions",
],
},
{
name: "confirmationStorage",
isMut: true,
isSigner: false,
docs: [
"Temporary storage for signatures",
"Stores signatures for one day. Access is obtained by a signed message bytes",
"[`ConfirmationStorage`] inside account data",
],
},
{
name: "confirmationStorageCreator",
isMut: true,
isSigner: false,
},
{
name: "submission",
isMut: false,
isSigner: false,
docs: ["An account proving that the transfer was mad and with information", "about `original_claimer` account"],
},
{
name: "payer",
isMut: false,
isSigner: true,
docs: ["Transaction payer."],
},
],
args: [
{
name: "msg",
type: {
array: ["u8", 32],
},
},
],
},
{
name: "initializeMintBridge",
docs: [
"Initialize new [`bridge::BridgeVariant::Mint`] bridge",
"",
"The action requires the signatures of the oracles",
"The signatures are verified by the Solana runtime ([`anchor_lang::solana_program::secp256k1_program`]).",
"We look at the previous instructions (the depth is calculated based on the number of oracles in the [`State`]) and if",
"the instructions passed, then we confirm the action",
"",
"# Arguments",
"* `deploy_info` - information about the new token signed in the previous transaction instruction",
"",
"# Events",
"* [`events::Log`]",
"* [`events::MintBridgeCreated`]",
"",
"# Roles",
"* 👤 User - anyone can create a Mint Bridge by this method, however they need oracle signatures",
],
accounts: [
{
name: "bridgeData",
isMut: true,
isSigner: false,
docs: ["The account that we initialize to store data about the [`bridge::BridgeVariant::Mint`]"],
},
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "feeBeneficiary",
isMut: false,
isSigner: false,
docs: [
"Beneficiary of the commission in the system",
"Implied that this will be an account belonging to another program (FeeProxy),",
"which will be responsible for the distribution of commissions",
],
},
{
name: "payer",
isMut: true,
isSigner: true,
docs: ["👤 User"],
},
{
name: "tokenMint",
isMut: true,
isSigner: false,
docs: [
"This is our wrapped token [`token::Mint`] that we will be using",
"to represent tokens from [`deploy_info::DeployInfo::chain_id`] chain",
"",
"Initialization will take place inside [`Self::init_token_mint`]",
],
},
{
name: "mintAuthority",
isMut: false,
isSigner: false,
docs: [
"A non-existent account belonging to our `debridge_program` to authorize program actions",
"with `staking_wallet` and mint new wrapping tokens",
],
},
{
name: "confirmationStorage",
isMut: true,
isSigner: false,
docs: ["Confirmation storage"],
},
{
name: "confirmationStorageCreator",
isMut: true,
isSigner: false,
docs: ["Confirmation storage creator. Need for `confirmation_storage` creation fund returning"],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
docs: ["System program account"],
},
{
name: "tokenProgram",
isMut: false,
isSigner: false,
docs: ["System spl token program"],
},
{
name: "rent",
isMut: false,
isSigner: false,
docs: ["Sysvar rent for init mint inside"],
},
{
name: "tokenMetadataMaster",
isMut: false,
isSigner: false,
docs: ["Account with URI mask for mint bridge token logo"],
},
{
name: "tokenMetadataProgram",
isMut: false,
isSigner: false,
docs: ["Metaplex metadata program"],
},
{
name: "tokenMetadata",
isMut: true,
isSigner: false,
docs: ["Account with mint bridge token metadata"],
},
],
args: [
{
name: "deployInfo",
type: {
defined: "DeployInfo",
},
},
],
},
{
name: "initializeSendBridge",
docs: [
"Initialize new [`bridge::BridgeVariant::Send`] bridge",
"",
"# Events",
"* [`events::Log`]",
"* [`events::SendBridgeCreated`]",
"",
"# Roles",
"* 👤 User - anyone can create a Send Bridge by this method, if it's not exists",
],
accounts: [
{
name: "bridgeData",
isMut: true,
isSigner: false,
docs: ["The account that we initialize to store data about the [`bridge::BridgeVariant::Send`]"],
},
{
name: "bridgeIdMap",
isMut: true,
isSigner: false,
},
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "stakingWallet",
isMut: true,
isSigner: false,
docs: [
"Account for initialization that will store the token fee and staking native Solana tokens",
"It is owned by [`Self::mint_authority`]",
],
},
{
name: "tokenMint",
isMut: false,
isSigner: false,
docs: ["This is native SPL Solana token for send it by new bridge"],
},
{
name: "mintAuthority",
isMut: false,
isSigner: false,
docs: [
"A non-existent account belonging to our `debridge_program` to authorize program actions",
"with `staking_wallet`",
],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
docs: ["System program account"],
},
{
name: "tokenProgram",
isMut: false,
isSigner: false,
docs: ["System spl token program"],
},
{
name: "payer",
isMut: true,
isSigner: true,
docs: ["👤 User"],
},
{
name: "tokenMetadata",
isMut: false,
isSigner: false,
},
],
args: [],
},
{
name: "updateFeeBridgeInfo",
docs: [
"Update or initialize new [`BridgeFeeInfo`] bridge",
"",
"This structure store information about asset fee in Bridge -> Chain",
"",
"# Arguments",
"* `target_chain_id` - the commission chain for which we set",
"* `chain_fee` - new chain fee",
"",
"# Events",
"* [`events::BridgeFeeInfoInitialized`]",
"",
"# Roles",
"* 👤 User - can create a [`BridgeFeeInfo`], but not set `chain_fee`",
"* 👤 Protocol Authority - can initialize or update a [`BridgeFeeInfo`] and set `chain_fee`",
],
accounts: [
{
name: "bridgeData",
isMut: false,
isSigner: false,
docs: ["This is the bridge for which we add additional information with a commission"],
},
{
name: "tokenMint",
isMut: false,
isSigner: false,
docs: ["Bridge mint token, for additional validation that the bridge correct"],
},
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "bridgeFee",
isMut: true,
isSigner: false,
docs: ["New account for storing commission information between Bridge -> Chain"],
},
{
name: "payer",
isMut: true,
isSigner: true,
docs: ["👤 User or 👤 Protocol Authority"],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
docs: ["System program account"],
},
{
name: "tokenProgram",
isMut: false,
isSigner: false,
docs: ["System spl token program"],
},
],
args: [
{
name: "targetChainId",
type: {
array: ["u8", 32],
},
},
{
name: "chainFee",
type: "u64",
},
],
},
{
name: "initializeDiscountInfo",
docs: [
"Initialize new [`DiscountInfo`] structure",
"",
"This structure store information about discount for [`InitDiscountInfo::user`]",
"",
"# Arguments",
"* `fix_bps` - information about fix fee discount",
"* `transfer_bps` - information about transfer fee discount",
"",
"# Events",
"* [`events::DiscountInitialized]",
"",
"# Roles",
"* 👤 Protocol Authority",
],
accounts: [
{
name: "state",
isMut: false,
isSigner: false,
docs: ["State account with service information", "Use here for check [`Self::protocol_authority`]"],
},
{
name: "discountInfo",
isMut: true,
isSigner: false,
docs: ["Program account with information about user discount"],
},
{
name: "user",
isMut: false,
isSigner: false,
docs: ["The user for whom we are creating a discount"],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
docs: ["System program account"],
},
{
name: "protocolAuthority",
isMut: true,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "fixBps",
type: "u16",
},
{
name: "transferBps",
type: "u16",
},
],
},
{
name: "updateDiscountInfo",
docs: [
"Update account with [`DiscountInfo`] structure",
"",
"This structure store information about discount for [`UpdateDiscountInfo::user`]",
"",
"# Arguments",
"* `is_active` - disable or enable discount for user",
"* `fix_bps` - information about fix fee discount",
"* `transfer_bps` - information about transfer fee discount",
"",
"# Events",
"* [`events::DiscountInitialized]",
"",
"# Roles",
"* 👤 Protocol Authority",
],
accounts: [
{
name: "state",
isMut: false,
isSigner: false,
docs: ["State account with service information", "Use here for check [`Self::protocol_authority`]"],
},
{
name: "discountInfo",
isMut: true,
isSigner: false,
docs: ["Program account with information about user discount"],
},
{
name: "user",
isMut: false,
isSigner: false,
docs: ["The user for whom the discount is being created"],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
docs: ["System program account"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
],
args: [
{
name: "isActive",
type: "bool",
},
{
name: "fixBps",
type: "u16",
},
{
name: "transferBps",
type: "u16",
},
],
},
{
name: "updateChainSupportInfo",
docs: [
"Initialize account with [`ChainSupportInfo`]",
"",
"This structure store information about fees in transfer with `target_chain_id`",
"",
"# Arguments",
"* `target_chain_id` - target chain",
"* `chain_support_info_bump` - service information about public key of [`UpdateChainSupportInfo::chain_support_info`]",
"* `is_supported` - disable or enable chain support",
"* `fixed_fee` - new value for [`ChainSupportInfoVariant::Supported`] `fixed_fee` field",
"* `transfer_fee` - new value for [`ChainSupportInfoVariant::Supported`] `transfer_fee` field",
"* `chain_address_len` - specified for chain address len",
"",
"# Events",
"* [`events::SupportChainInfoUpdated`]",
"",
"# Roles",
"* 👤 Protocol Authority",
],
accounts: [
{
name: "state",
isMut: false,
isSigner: false,
docs: ["State account with service information", "Use here for check [`Self::protocol_authority`]"],
},
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
{
name: "payer",
isMut: true,
isSigner: true,
},
{
name: "chainSupportInfo",
isMut: true,
isSigner: false,
docs: ["An account that stores support and commission information for a specific chain"],
},
{
name: "systemProgram",
isMut: false,
isSigner: false,
},
],
args: [
{
name: "targetChainId",
type: {
array: ["u8", 32],
},
},
{
name: "isSupported",
type: "bool",
},
{
name: "fixedFee",
type: {
option: "u64",
},
},
{
name: "transferFee",
type: {
option: "u64",
},
},
{
name: "chainAddressLen",
type: "u16",
},
],
},
{
name: "setBridgeMaxAmount",
docs: [
"Set bridge max amount parameter",
"",
"# Arguments",
"* `new_max_amount` - new maximum amount value for bridge",
"",
"# Events",
"* [`events::BridgeMaxAmountSetted`]",
"",
"# Roles",
"* 👤 Protocol Authority",
],
accounts: [
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
{
name: "bridgeData",
isMut: true,
isSigner: false,
docs: [
"The account contains all the information about the operation of the bridge",
"",
"There are the address of the token with which the bridge works,",
"the amount of liquidity stored, the collected fee amount and",
"the settings for the operation of the bridge",
],
},
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "tokenMint",
isMut: false,
isSigner: false,
docs: ["The mint account of the token with which the bridge works"],
},
{
name: "tokenProgram",
isMut: false,
isSigner: false,
docs: ["System spl token program"],
},
],
args: [
{
name: "newMaxAmount",
type: "u64",
},
],
},
{
name: "setBridgeMinReservedBps",
docs: [
"Set bridge min reserved bps parameter",
"",
"# Arguments",
"* `new_min_reserved_bps` - new minimum reserved bps value for bridge",
"# Events",
"* [`events::BridgeMinReservedBpsSetted`]",
"",
"# Roles",
"* 👤 Protocol Authority",
],
accounts: [
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
{
name: "bridgeData",
isMut: true,
isSigner: false,
docs: [
"The account contains all the information about the operation of the bridge",
"",
"There are the address of the token with which the bridge works,",
"the amount of liquidity stored, the collected fee amount and",
"the settings for the operation of the bridge",
],
},
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "tokenMint",
isMut: false,
isSigner: false,
docs: ["The mint account of the token with which the bridge works"],
},
{
name: "tokenProgram",
isMut: false,
isSigner: false,
docs: ["System spl token program"],
},
],
args: [
{
name: "newMinReservedBps",
type: "u64",
},
],
},
{
name: "pauseBridge",
docs: ["Emergency bridge stop", "", "# Events", "* [`events::BridgeWorkToggled`]", "", "# Roles", "* 👤 Stop Tap"],
accounts: [
{
name: "stopTap",
isMut: false,
isSigner: true,
docs: ["👤 Stop Tap"],
},
{
name: "bridgeData",
isMut: true,
isSigner: false,
docs: ["Bridge account to be stopped"],
},
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "tokenMint",
isMut: false,
isSigner: false,
docs: ["The mint account of the token with which the bridge works"],
},
{
name: "tokenProgram",
isMut: false,
isSigner: false,
docs: ["System spl token program"],
},
],
args: [],
},
{
name: "unpauseBridge",
docs: ["Unlocking the bridge", "", "# Events", "* [`events::BridgeWorkToggled`]", "", "# Roles", "* 👤 Protocol Authority"],
accounts: [
{
name: "protocolAuthority",
isMut: false,
isSigner: true,
docs: ["Authority of protocol"],
},
{
name: "bridgeData",
isMut: true,
isSigner: false,
docs: ["Bridge account to be run"],
},
{
name: "state",
isMut: true,
isSigner: false,
docs: ["State account with service information", "There is a single state account for the entire program"],
},
{
name: "tokenMint",
isMut: false,
isSigner: false,
docs: ["The mint account of the token with which the bridge works"],
},
{
name: "tokenProgram",
isMut: false,
isSigner: false,
docs: ["System spl token program"],
},
],
args: [],
},
{
name: "resetFreezeAuthorityBatch",
accounts: [
{
name: "tokenProgram",
isMut: false,
isSigner: false,