fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
operator: soroban_sdk::Address,
)
fn __constructor(env: soroban_sdk::Env, owner: soroban_sdk::Address)
Add a token to the redemption contract. All token contract addresses must be added to the redemption contract.
token_contract_address - The address of the token contract to add.The caller must be the owner.
fn add_token(env: soroban_sdk::Env, token_contract_address: soroban_sdk::Address)
Remove a token from the redemption contract.
token_contract_address - The address of the token contract to remove.The caller must be the owner.
fn remove_token(env: soroban_sdk::Env, token_contract_address: soroban_sdk::Address)
Set the permission manager (central role management authority).
permission_manager - The address of the permission manager.The caller must be the owner.
fn set_permission_manager(
env: soroban_sdk::Env,
permission_manager: soroban_sdk::Address,
)
On redeem. It is called by a registered token contract just after the tokens are transferred to the redemption contract. The redemption is recorded as pending.
token - The address of the token contract.from - The address of the account that redeemed the tokens.amount - The amount of tokens redeemed.salt - The salt used to generate the redemption hash.It must be called by a registered token contract. The redemption hash must be in the Null status. The redemption hash is used to prevent duplicate redemptions. All redemptions are unique.
fn on_redeem(
env: soroban_sdk::Env,
token: soroban_sdk::Address,
from: soroban_sdk::Address,
amount: i128,
salt: soroban_sdk::String,
)
Execute redemptions. It is called by a redemption executor. It will burn the tokens from the redemption contract.
caller - The address of the redemption executor.operations - The operations to execute.The caller must have the REDEMPTION_EXECUTOR_ROLE. The operations must not be empty. All tokens must be registered. All redemptions must be in the Pending status.
fn execute_redemptions(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
operations: soroban_sdk::Vec,
)
Cancel a redemption. It is called by a redemption executor. It will transfer the tokens back to the from address.
caller - The address of the redemption executor.token - The address of the token contract.from - The address of the account that redeemed the tokens.amount - The amount of tokens redeemed.salt - The salt used to generate the redemption hash.The caller must have the REDEMPTION_EXECUTOR_ROLE. The token must be registered. The redemption must be in the Pending status.
fn cancel_redemption(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
token: soroban_sdk::Address,
from: soroban_sdk::Address,
amount: i128,
salt: soroban_sdk::String,
)
fn get_owner(env: soroban_sdk::Env) -> Option
fn transfer_ownership(
env: soroban_sdk::Env,
new_owner: soroban_sdk::Address,
live_until_ledger: u32,
)
fn accept_ownership(env: soroban_sdk::Env)
fn renounce_ownership(env: soroban_sdk::Env)