Contract ce84b965f3fdbf4ff9ea4c28813a7a30d6dd65c69d0d1bc19834d907a5e0d27b

← Back to Index 📥 Download WASM

Meta

cliver 23.4.0#fc6745f3d4e90d1ef68d14d0ae947404768fa5c0
home_domain voltacircuit.com
rssdkver 23.4.1#e671b396f8bacf1370925f722df158b31c0baae5
rsver 1.93.0
source_commit 6bc166b49b188fc4d10f0f66bb9a65c265666afc
source_repo github:VoltaHQ/smart-contract-soroban

Instances

  • CAKI7RXQ4IYXZFBX6BSJWKMTBTONNPH74NKKY7DVJ5EBEZ5E4SSIFX34
  • CAOHAK6NJV5M5MF5DG3EEJKMC2NFIBTWK3HKTODMLCRY62U25KMMO7UN
  • CASFJQ376BFMX4GHTFP4H24KA4GLJBCC5UCFRIXK5QKJRMU5P4RUL73G
  • CAYITAMADHU6Y2DTHNYPOYLZ2ZGVSOFIG3EKS5JKD35A3JDOU46FNJYD
  • CAYKOOQ732DIDGT4YSLT63CYN6GWMUZP7FIXUE4UCIICTBJLDWG4OSO3
  • CB4VNS3HFHDI4MO6IQPFT3DG7XJOKYLMDH6JHZO3WKADIYVYHBT5JD4W
  • CB5AUBBMBZ4RQOVO7ND3UYR7AZFUNWPGQZPGMPHBW3BIMRTRAFBWOJAR
  • CBSZNRNQIFHKHBHPZEHJFWGTJMPLYN4NJYGTLEJBHUVQTTOQ2WSQ6OMV
  • CBTN7YLDX6IIPDP2HQKI6DNVIQGQM4JZBLO2JHNOE4JNI4BUUNP5WVGH
  • CBZDBEO7NPRO4YT6ZFJ25J6JFVV2VGM7UF3W4OFETKZJD5JC7TZKQ6NU
  • CC3JGU2T3NBKQXTQBBS7OPVUK33XUCEWI3LAGD5SELXAXZJVWIHQARU4
  • CC4UQND4XSP5MBHYOKGGJZQRONSTSJ3OF2EPEGA5QMCDCCZFLAE43BWJ
  • CCARCJI473RUOMCIJKQUQMP2264ZXDPDR4RCK73EHW2HEWVLRPYDQ74P
  • CCMPLLG5QDWMSTHRNGX2NMR3AVDTEJ2LF2SPCOIJEJBBT3P46IHKBRXD
  • CCMQ72YMSR32Y4KOLYIC35REVXR6GHGDDZ46DZL6CF3XLDPMCAKHOQR6
  • CCNUO3JKKREJ2ZNM757XDSD5KTHZ5G4U3T4E2K5Y5W7FHCCIOJXGYOHN
  • CCOVKOJDWPJUISIPUILDJGSYAVVNVOQEV2IPCYKTWWKFTVDIIBSHWQUF
  • CCXYXTHAYIZS5EOEOR6FISZF6JRGKJ4YJJHRAK7E4OZHXCDJCKWI53IH
  • CD3CQ65X7ZNI3FRPLY6GQAWCZWHNN66HNXPCTAFOURG75YHZQEWCRSAF
  • CDBD2BJXEFF4TBRZ2WPIOZ56I35VIYYKNBRMXHAZGDYUHBZXWOPLO4FL
  • CDIHHSGGWGNBW6TJZEVWEYOKAHYRYOGEBT5C7JBFF2JDDBJO55L2HWOV
  • CDJT4OHJJL64TADLWUXNRXOAJNRBV7WWKR42UXP4H7PINOFAYUBD7GHB
  • CDO6ZGL5AQXVK2JUX4HOTFFEFDNS4H6VPOY6WU44HLZQXCCQ5B46XJ7K
  • CDOCCU2EU6MK3AV5Y67LGFJ6FJNOH4BA2FV7COVFGIBTJA24YLKFQCRJ
  • CDSOXBC3WPI6JCY7JVTOG5D5S6BBZVGNE4P76Z4WNL4YD453KSBYFSXI

Interface

Vote on a proposal. The caller must be an owner and the proposal must be pending. An error is returned if the proposal is not pending, the caller is not an owner, or the voter has already voted (votes cannot be changed once cast).

fn vote(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    proposal_id: u64,
    vote: VoteType,
) -> Result

Propose a new invoke proposal to invoke an arbitrary contract function. The caller must be an owner and the invoke must be valid (i.e. the contract exists and the function is valid). Invoke proposals require (threshold - 1) additional votes since the proposer auto-votes Yes.

fn invoke(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    contract: soroban_sdk::Address,
    fn_name: soroban_sdk::Symbol,
    args: soroban_sdk::Vec,
    auth_entries: soroban_sdk::Vec,
) -> Result<(), ContractError>

Proposes a new proposal. The owner must be the signer of the transaction, and the proposal must be valid (and not an Invoke variant since Invoke proposals are not allowed to be directly proposed).

Proposals have a short TTL (approximately 1 week) and can be implicitly prematurely revoked if the config is changed.

fn propose(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    proposal: ProposalInput,
) -> Result

Returns the version of the contract.

fn version(env: soroban_sdk::Env) -> u32

Returns the config of the contract. There's no practical way this actually returns an error due to other initialization checks, but we return a Result for consistency.

fn get_config(env: soroban_sdk::Env) -> Result

Get a proposal by id, returning an error if the proposal is not pending (which happens if the proposal expires in the ledger, is revoked/rejected, is executed, or is before the last config change).

fn get_proposal(
    env: soroban_sdk::Env,
    proposal_id: u64,
) -> Result

Initializes the contract with a config. The Option<ConfigInput> is used to work around the test harness, which is why we reject any attempt to initialize the contract without a config.

fn __constructor(
    env: soroban_sdk::Env,
    config: Option,
) -> Result<(), ContractError>

Revokes a proposal. The caller must be the original proposer and the proposal must be pending.

fn revoke_proposal(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    proposal_id: u64,
) -> Result<(), ContractError>

Imports

WebAssembly Text (WAT) ▶