Contract 4d1302d9e6b29e8fa57c42b80a302c8638281257399287d08a482ab0b0f53feb

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.4#1d4afb3b981a4f4b2bbc19f0ce38af85c4ab316a
rsver 1.83.0

Instances

  • CA2OIIQO7X7FF4ETXKZCDPRCZOURQS5753OS54TMVNTM44JGS6JX3KZG

Interface

  • Constructor
    • Function to initialize the contract.
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
  • Name
    • Function to get the name of the contract.
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
  • Version
    • Function to get the version of the contract.
fn version(env: soroban_sdk::Env) -> soroban_sdk::String
  • Upgrade
    • Function to upgrade the contract.
fn upgrade(
    env: soroban_sdk::Env,
    upgrader: soroban_sdk::Address,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), Errors>
  • Has Role
    • Function to check if an account has a role.
fn has_role(env: soroban_sdk::Env, account: soroban_sdk::Address, role: Role) -> bool
  • Grant Role
    • Function to grant a role to an account.
fn grant_role(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    account: soroban_sdk::Address,
    role: Role,
) -> Result<(), Errors>
  • Revoke Role
    • Function to revoke a role from an account.
fn revoke_role(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    account: soroban_sdk::Address,
    role: Role,
) -> Result<(), Errors>
  • Get invoice count
    • Function to get the total number of invoices.
fn get_invoices_count(env: soroban_sdk::Env) -> u128
  • Get invoices config
    • Function to get the invoices config.
fn get_invoices_config(env: soroban_sdk::Env) -> InvoicesConfig
  • Get invoice
    • Function to get an invoice by its ID.
fn get_invoice(env: soroban_sdk::Env, invoice_id: u128) -> Result
  • Set invoices config
    • Function to set the invoices config.
fn set_invoices_config(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    new_min_amount: i128,
    new_allowed_tokens: soroban_sdk::Vec,
) -> Result<(), Errors>
  • Send invoice
    • Function to send an invoice.
fn send_invoice(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
) -> Result
  • Refund invoice
    • Function to refund an invoice.
fn refund_invoice(env: soroban_sdk::Env, invoice_id: u128) -> Result<(), Errors>
  • Get deals count
    • Function to get the total number of deals.
fn get_deals_count(env: soroban_sdk::Env) -> u128
  • Get deal
    • Function to get a deal by its ID.
fn get_deal(env: soroban_sdk::Env, deal_id: u128) -> Result
  • Create deal
    • Function to create a deal.
fn create_deal(
    env: soroban_sdk::Env,
    manager: soroban_sdk::Address,
    deal_type: DealType,
    deal_metadata_uri: soroban_sdk::String,
    deal_metadata_hash: soroban_sdk::BytesN<32>,
    invoice_ids: soroban_sdk::Vec,
) -> Result
  • Update deal
    • Function to update a deal.
fn update_deal(
    env: soroban_sdk::Env,
    manager: soroban_sdk::Address,
    deal_id: u128,
    new_deal_status: DealStatus,
    new_deal_metadata_uri: soroban_sdk::String,
    new_deal_metadata_hash: soroban_sdk::BytesN<32>,
) -> Result<(), Errors>

Imports

WebAssembly Text (WAT) ▶