Optional
contract
contract?: TypedContractActions<
readonly [
{
interface_name: "switchboard::ISwitchboard";
name: "SwitchboardImpl";
type: "impl";
},
{
members: readonly [
{ name: "result"; type: "core::integer::i128" },
{ name: "min_timestamp"; type: "core::integer::u64" },
{ name: "max_timestamp"; type: "core::integer::u64" },
{ name: "min_result"; type: "core::integer::i128" },
{ name: "max_result"; type: "core::integer::i128" },
{ name: "stdev"; type: "core::integer::u128" },
{ name: "range"; type: "core::integer::i128" },
{ name: "mean"; type: "core::integer::i128" },
];
name: "switchboard::aggregator::CurrentResult";
type: "struct";
},
{
members: readonly [
{
name: "data";
type: "core::array::Array::<core::bytes_31::bytes31>";
},
{ name: "pending_word"; type: "core::felt252" },
{ name: "pending_word_len"; type: "core::integer::u32" },
];
name: "core::byte_array::ByteArray";
type: "struct";
},
{
members: readonly [
{ name: "low"; type: "core::integer::u128" },
{ name: "high"; type: "core::integer::u128" },
];
name: "core::integer::u256";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "tolerated_delta"; type: "core::integer::u64" },
{ name: "feed_hash"; type: "core::integer::u256" },
{ name: "created_at"; type: "core::integer::u64" },
{ name: "max_variance"; type: "core::integer::u64" },
{ name: "min_responses"; type: "core::integer::u32" },
{ name: "min_samples"; type: "core::integer::u8" },
{ name: "max_staleness"; type: "core::integer::u64" },
{
name: "current_result";
type: "switchboard::aggregator::CurrentResult";
},
{ name: "update_idx"; type: "core::integer::u64" },
];
name: "switchboard::aggregator::Aggregator";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<switchboard::aggregator::Aggregator>";
},
];
name: "core::array::Span::<switchboard::aggregator::Aggregator>";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "tolerated_delta"; type: "core::integer::u64" },
{ name: "feed_hash"; type: "core::integer::u256" },
{ name: "max_variance"; type: "core::integer::u64" },
{ name: "min_responses"; type: "core::integer::u32" },
{ name: "min_samples"; type: "core::integer::u8" },
{ name: "max_staleness"; type: "core::integer::u64" },
];
name: "switchboard::aggregator::CreateAggregatorParams";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{ name: "name"; type: "core::felt252" },
{ name: "tolerated_delta"; type: "core::integer::u64" },
{ name: "feed_hash"; type: "core::integer::u256" },
{ name: "max_variance"; type: "core::integer::u64" },
{ name: "min_responses"; type: "core::integer::u32" },
{ name: "min_samples"; type: "core::integer::u8" },
{ name: "max_staleness"; type: "core::integer::u64" },
];
name: "switchboard::aggregator::UpdateAggregatorParams";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "switchboard::aggregator::SetAggregatorAuthorityParams";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "fee"; type: "core::integer::u256" },
{
name: "fee_recipient";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_attestations"; type: "core::integer::u64" },
{ name: "tolerated_timestamp_delta"; type: "core::integer::u64" },
{ name: "oracle_validity_length"; type: "core::integer::u64" },
{ name: "last_queue_override"; type: "core::integer::u64" },
{ name: "guardian_queue_id"; type: "core::integer::u256" },
];
name: "switchboard::queue::Queue";
type: "struct";
},
{
members: readonly [{ name: "address"; type: "core::felt252" }];
name: "core::starknet::eth_address::EthAddress";
type: "struct";
},
{
members: readonly [
{
name: "authority";
type: "core::starknet::eth_address::EthAddress";
},
{ name: "oracle_id"; type: "core::integer::u256" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "mr_enclave"; type: "core::integer::u256" },
{ name: "expiration_time"; type: "core::integer::u64" },
{ name: "fees_owed"; type: "core::integer::u64" },
];
name: "switchboard::oracle::Oracle";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<switchboard::oracle::Oracle>";
},
];
name: "core::array::Span::<switchboard::oracle::Oracle>";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)>";
},
];
name: "core::array::Span::<(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)>";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "fee"; type: "core::integer::u256" },
{
name: "fee_recipient";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_attestations"; type: "core::integer::u64" },
{ name: "tolerated_timestamp_delta"; type: "core::integer::u64" },
{ name: "oracle_validity_length"; type: "core::integer::u64" },
{ name: "guardian_queue_id"; type: "core::integer::u256" },
];
name: "switchboard::queue::CreateQueueParams";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "name"; type: "core::felt252" },
{ name: "fee"; type: "core::integer::u256" },
{
name: "fee_recipient";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_attestations"; type: "core::integer::u64" },
{ name: "tolerated_timestamp_delta"; type: "core::integer::u64" },
{ name: "oracle_validity_length"; type: "core::integer::u64" },
{ name: "guardian_queue_id"; type: "core::integer::u256" },
];
name: "switchboard::queue::UpdateQueueParams";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "switchboard::queue::SetQueueAuthorityParams";
type: "struct";
},
{
members: readonly [
{ name: "oracle_id"; type: "core::integer::u256" },
{
name: "oracle_authority";
type: "core::starknet::eth_address::EthAddress";
},
{ name: "value"; type: "core::integer::u256" },
{ name: "settled_at"; type: "core::integer::u64" },
];
name: "switchboard::randomness::RandomnessResult";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "created_at"; type: "core::integer::u64" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "roll_timestamp"; type: "core::integer::u256" },
{ name: "min_settlement_delay"; type: "core::integer::u64" },
{ name: "result"; type: "switchboard::randomness::RandomnessResult" },
];
name: "switchboard::randomness::Randomness";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<switchboard::randomness::Randomness>";
},
];
name: "core::array::Span::<switchboard::randomness::Randomness>";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_settlement_delay"; type: "core::integer::u64" },
];
name: "switchboard::randomness::CreateRandomnessParams";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "min_settlement_delay"; type: "core::integer::u64" },
];
name: "switchboard::randomness::UpdateRandomnessParams";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::randomness::CommitRandomnessExternalParams";
type: "struct";
},
{
items: readonly [
{
inputs: readonly [{ name: "aggregator_id"; type: "core::felt252" }];
name: "latest_result";
outputs: readonly [{ type: "switchboard::aggregator::CurrentResult" }];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{ name: "bytes"; type: "core::byte_array::ByteArray" },
];
name: "update_feed_data";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [{ name: "aggregator_id"; type: "core::felt252" }];
name: "get_aggregator";
outputs: readonly [{ type: "switchboard::aggregator::Aggregator" }];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "get_all_aggregators";
outputs: readonly [
{
type: "core::array::Span::<switchboard::aggregator::Aggregator>";
},
];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::aggregator::CreateAggregatorParams";
},
];
name: "create_aggregator";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::aggregator::UpdateAggregatorParams";
},
];
name: "update_aggregator";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::aggregator::SetAggregatorAuthorityParams";
},
];
name: "set_aggregator_authority";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [{ name: "queue_id"; type: "core::integer::u256" }];
name: "get_queue";
outputs: readonly [
{
type: "(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)";
},
];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [];
name: "get_all_queues";
outputs: readonly [
{
type: "core::array::Span::<(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)>";
},
];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{ name: "params"; type: "switchboard::queue::CreateQueueParams" },
];
name: "create_queue";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{ name: "params"; type: "switchboard::queue::UpdateQueueParams" },
];
name: "update_queue";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::queue::SetQueueAuthorityParams";
},
];
name: "set_queue_authority";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "oracles";
type: "core::array::Span::<switchboard::oracle::Oracle>";
},
];
name: "override_queue_oracles";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
];
name: "get_randomness";
outputs: readonly [{ type: "switchboard::randomness::Randomness" }];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "get_all_randomness";
outputs: readonly [
{
type: "core::array::Span::<switchboard::randomness::Randomness>";
},
];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::randomness::CreateRandomnessParams";
},
];
name: "create_randomness";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::randomness::UpdateRandomnessParams";
},
];
name: "update_randomness";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::randomness::CommitRandomnessExternalParams";
},
];
name: "commit_randomness";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "new_class_hash";
type: "core::starknet::class_hash::ClassHash";
},
];
name: "upgrade_contract";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "owner";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "set_owner";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
];
name: "switchboard::ISwitchboard";
type: "interface";
},
{ inputs: readonly []; name: "constructor"; type: "constructor" },
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "owner";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "switchboard::switchboard::OwnerUpdated";
type: "event";
},
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "new_class_hash";
type: "core::starknet::class_hash::ClassHash";
},
];
name: "switchboard::switchboard::ContractUpgraded";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "message"; type: "core::felt252" },
];
name: "switchboard::switchboard::InvalidSecpSignature";
type: "event";
},
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "expected";
type: "core::starknet::eth_address::EthAddress";
},
{
kind: "data";
name: "actual";
type: "core::starknet::eth_address::EthAddress";
},
];
name: "switchboard::switchboard::InvalidSecpAuthority";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "queue_id"; type: "core::integer::u256" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::switchboard::InvalidQueue";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
{ kind: "data"; name: "expiration_time"; type: "core::integer::u64" },
];
name: "switchboard::switchboard::OracleExpired";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "aggregator_id"; type: "core::felt252" },
{ kind: "data"; name: "valid_responses"; type: "core::integer::u32" },
{ kind: "data"; name: "min_responses"; type: "core::integer::u32" },
];
name: "switchboard::switchboard::NotEnoughResponses";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "aggregator_id"; type: "core::felt252" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
{ kind: "data"; name: "timestamp"; type: "core::integer::u64" },
{ kind: "data"; name: "result"; type: "core::integer::i128" },
];
name: "switchboard::switchboard::AddedUpdate";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "queue_id"; type: "core::integer::u256" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::switchboard::QuorumNotReached";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "queue_id"; type: "core::integer::u256" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::switchboard::OracleAdded";
type: "event";
},
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "secp256k1_key";
type: "core::byte_array::ByteArray";
},
];
name: "switchboard::switchboard::InvalidSecpPublicKey";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "randomness_id"; type: "core::integer::u256" },
{ kind: "data"; name: "settled_at"; type: "core::integer::u64" },
];
name: "switchboard::switchboard::RandomnessAlreadySettled";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "randomness_id"; type: "core::integer::u256" },
{ kind: "data"; name: "roll_timestamp"; type: "core::integer::u256" },
{
kind: "data";
name: "min_settlement_delay";
type: "core::integer::u64";
},
];
name: "switchboard::switchboard::RandomnessTooEarly";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "randomness_id"; type: "core::integer::u256" },
{ kind: "data"; name: "value"; type: "core::integer::u256" },
{ kind: "data"; name: "settled_at"; type: "core::integer::u64" },
];
name: "switchboard::switchboard::RandomnessResolved";
type: "event";
},
{
kind: "enum";
name: "switchboard::switchboard::Event";
type: "event";
variants: readonly [
{
kind: "nested";
name: "OwnerUpdated";
type: "switchboard::switchboard::OwnerUpdated";
},
{
kind: "nested";
name: "ContractUpgraded";
type: "switchboard::switchboard::ContractUpgraded";
},
{
kind: "nested";
name: "InvalidSecpSignature";
type: "switchboard::switchboard::InvalidSecpSignature";
},
{
kind: "nested";
name: "InvalidSecpAuthority";
type: "switchboard::switchboard::InvalidSecpAuthority";
},
{
kind: "nested";
name: "InvalidQueue";
type: "switchboard::switchboard::InvalidQueue";
},
{
kind: "nested";
name: "OracleExpired";
type: "switchboard::switchboard::OracleExpired";
},
{
kind: "nested";
name: "NotEnoughResponses";
type: "switchboard::switchboard::NotEnoughResponses";
},
{
kind: "nested";
name: "AddedUpdate";
type: "switchboard::switchboard::AddedUpdate";
},
{
kind: "nested";
name: "QuorumNotReached";
type: "switchboard::switchboard::QuorumNotReached";
},
{
kind: "nested";
name: "OracleAdded";
type: "switchboard::switchboard::OracleAdded";
},
{
kind: "nested";
name: "InvalidSecpPublicKey";
type: "switchboard::switchboard::InvalidSecpPublicKey";
},
{
kind: "nested";
name: "RandomnessAlreadySettled";
type: "switchboard::switchboard::RandomnessAlreadySettled";
},
{
kind: "nested";
name: "RandomnessTooEarly";
type: "switchboard::switchboard::RandomnessTooEarly";
},
{
kind: "nested";
name: "RandomnessResolved";
type: "switchboard::switchboard::RandomnessResolved";
},
];
},
],
> & ContractFunctions<
readonly [
{
interface_name: "switchboard::ISwitchboard";
name: "SwitchboardImpl";
type: "impl";
},
{
members: readonly [
{ name: "result"; type: "core::integer::i128" },
{ name: "min_timestamp"; type: "core::integer::u64" },
{ name: "max_timestamp"; type: "core::integer::u64" },
{ name: "min_result"; type: "core::integer::i128" },
{ name: "max_result"; type: "core::integer::i128" },
{ name: "stdev"; type: "core::integer::u128" },
{ name: "range"; type: "core::integer::i128" },
{ name: "mean"; type: "core::integer::i128" },
];
name: "switchboard::aggregator::CurrentResult";
type: "struct";
},
{
members: readonly [
{
name: "data";
type: "core::array::Array::<core::bytes_31::bytes31>";
},
{ name: "pending_word"; type: "core::felt252" },
{ name: "pending_word_len"; type: "core::integer::u32" },
];
name: "core::byte_array::ByteArray";
type: "struct";
},
{
members: readonly [
{ name: "low"; type: "core::integer::u128" },
{ name: "high"; type: "core::integer::u128" },
];
name: "core::integer::u256";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "tolerated_delta"; type: "core::integer::u64" },
{ name: "feed_hash"; type: "core::integer::u256" },
{ name: "created_at"; type: "core::integer::u64" },
{ name: "max_variance"; type: "core::integer::u64" },
{ name: "min_responses"; type: "core::integer::u32" },
{ name: "min_samples"; type: "core::integer::u8" },
{ name: "max_staleness"; type: "core::integer::u64" },
{
name: "current_result";
type: "switchboard::aggregator::CurrentResult";
},
{ name: "update_idx"; type: "core::integer::u64" },
];
name: "switchboard::aggregator::Aggregator";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<switchboard::aggregator::Aggregator>";
},
];
name: "core::array::Span::<switchboard::aggregator::Aggregator>";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "tolerated_delta"; type: "core::integer::u64" },
{ name: "feed_hash"; type: "core::integer::u256" },
{ name: "max_variance"; type: "core::integer::u64" },
{ name: "min_responses"; type: "core::integer::u32" },
{ name: "min_samples"; type: "core::integer::u8" },
{ name: "max_staleness"; type: "core::integer::u64" },
];
name: "switchboard::aggregator::CreateAggregatorParams";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{ name: "name"; type: "core::felt252" },
{ name: "tolerated_delta"; type: "core::integer::u64" },
{ name: "feed_hash"; type: "core::integer::u256" },
{ name: "max_variance"; type: "core::integer::u64" },
{ name: "min_responses"; type: "core::integer::u32" },
{ name: "min_samples"; type: "core::integer::u8" },
{ name: "max_staleness"; type: "core::integer::u64" },
];
name: "switchboard::aggregator::UpdateAggregatorParams";
type: "struct";
},
{
members: readonly [
{ name: "aggregator_id"; type: "core::felt252" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "switchboard::aggregator::SetAggregatorAuthorityParams";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "fee"; type: "core::integer::u256" },
{
name: "fee_recipient";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_attestations"; type: "core::integer::u64" },
{ name: "tolerated_timestamp_delta"; type: "core::integer::u64" },
{ name: "oracle_validity_length"; type: "core::integer::u64" },
{ name: "last_queue_override"; type: "core::integer::u64" },
{ name: "guardian_queue_id"; type: "core::integer::u256" },
];
name: "switchboard::queue::Queue";
type: "struct";
},
{
members: readonly [{ name: "address"; type: "core::felt252" }];
name: "core::starknet::eth_address::EthAddress";
type: "struct";
},
{
members: readonly [
{
name: "authority";
type: "core::starknet::eth_address::EthAddress";
},
{ name: "oracle_id"; type: "core::integer::u256" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "mr_enclave"; type: "core::integer::u256" },
{ name: "expiration_time"; type: "core::integer::u64" },
{ name: "fees_owed"; type: "core::integer::u64" },
];
name: "switchboard::oracle::Oracle";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<switchboard::oracle::Oracle>";
},
];
name: "core::array::Span::<switchboard::oracle::Oracle>";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)>";
},
];
name: "core::array::Span::<(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)>";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "name"; type: "core::felt252" },
{ name: "fee"; type: "core::integer::u256" },
{
name: "fee_recipient";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_attestations"; type: "core::integer::u64" },
{ name: "tolerated_timestamp_delta"; type: "core::integer::u64" },
{ name: "oracle_validity_length"; type: "core::integer::u64" },
{ name: "guardian_queue_id"; type: "core::integer::u256" },
];
name: "switchboard::queue::CreateQueueParams";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "name"; type: "core::felt252" },
{ name: "fee"; type: "core::integer::u256" },
{
name: "fee_recipient";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_attestations"; type: "core::integer::u64" },
{ name: "tolerated_timestamp_delta"; type: "core::integer::u64" },
{ name: "oracle_validity_length"; type: "core::integer::u64" },
{ name: "guardian_queue_id"; type: "core::integer::u256" },
];
name: "switchboard::queue::UpdateQueueParams";
type: "struct";
},
{
members: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "switchboard::queue::SetQueueAuthorityParams";
type: "struct";
},
{
members: readonly [
{ name: "oracle_id"; type: "core::integer::u256" },
{
name: "oracle_authority";
type: "core::starknet::eth_address::EthAddress";
},
{ name: "value"; type: "core::integer::u256" },
{ name: "settled_at"; type: "core::integer::u64" },
];
name: "switchboard::randomness::RandomnessResult";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "queue_id"; type: "core::integer::u256" },
{ name: "created_at"; type: "core::integer::u64" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "roll_timestamp"; type: "core::integer::u256" },
{ name: "min_settlement_delay"; type: "core::integer::u64" },
{ name: "result"; type: "switchboard::randomness::RandomnessResult" },
];
name: "switchboard::randomness::Randomness";
type: "struct";
},
{
members: readonly [
{
name: "snapshot";
type: "@core::array::Array::<switchboard::randomness::Randomness>";
},
];
name: "core::array::Span::<switchboard::randomness::Randomness>";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "authority";
type: "core::starknet::contract_address::ContractAddress";
},
{ name: "min_settlement_delay"; type: "core::integer::u64" },
];
name: "switchboard::randomness::CreateRandomnessParams";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "min_settlement_delay"; type: "core::integer::u64" },
];
name: "switchboard::randomness::UpdateRandomnessParams";
type: "struct";
},
{
members: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
{ name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::randomness::CommitRandomnessExternalParams";
type: "struct";
},
{
items: readonly [
{
inputs: readonly [{ name: "aggregator_id"; type: "core::felt252" }];
name: "latest_result";
outputs: readonly [{ type: "switchboard::aggregator::CurrentResult" }];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{ name: "bytes"; type: "core::byte_array::ByteArray" },
];
name: "update_feed_data";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [{ name: "aggregator_id"; type: "core::felt252" }];
name: "get_aggregator";
outputs: readonly [{ type: "switchboard::aggregator::Aggregator" }];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "get_all_aggregators";
outputs: readonly [
{
type: "core::array::Span::<switchboard::aggregator::Aggregator>";
},
];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::aggregator::CreateAggregatorParams";
},
];
name: "create_aggregator";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::aggregator::UpdateAggregatorParams";
},
];
name: "update_aggregator";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::aggregator::SetAggregatorAuthorityParams";
},
];
name: "set_aggregator_authority";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [{ name: "queue_id"; type: "core::integer::u256" }];
name: "get_queue";
outputs: readonly [
{
type: "(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)";
},
];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [];
name: "get_all_queues";
outputs: readonly [
{
type: "core::array::Span::<(switchboard::queue::Queue, core::array::Span::<switchboard::oracle::Oracle>)>";
},
];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{ name: "params"; type: "switchboard::queue::CreateQueueParams" },
];
name: "create_queue";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{ name: "params"; type: "switchboard::queue::UpdateQueueParams" },
];
name: "update_queue";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::queue::SetQueueAuthorityParams";
},
];
name: "set_queue_authority";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{ name: "queue_id"; type: "core::integer::u256" },
{
name: "oracles";
type: "core::array::Span::<switchboard::oracle::Oracle>";
},
];
name: "override_queue_oracles";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{ name: "randomness_id"; type: "core::integer::u256" },
];
name: "get_randomness";
outputs: readonly [{ type: "switchboard::randomness::Randomness" }];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "get_all_randomness";
outputs: readonly [
{
type: "core::array::Span::<switchboard::randomness::Randomness>";
},
];
state_mutability: "view";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::randomness::CreateRandomnessParams";
},
];
name: "create_randomness";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::randomness::UpdateRandomnessParams";
},
];
name: "update_randomness";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "params";
type: "switchboard::randomness::CommitRandomnessExternalParams";
},
];
name: "commit_randomness";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "new_class_hash";
type: "core::starknet::class_hash::ClassHash";
},
];
name: "upgrade_contract";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
{
inputs: readonly [
{
name: "owner";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "set_owner";
outputs: readonly [];
state_mutability: "external";
type: "function";
},
];
name: "switchboard::ISwitchboard";
type: "interface";
},
{ inputs: readonly []; name: "constructor"; type: "constructor" },
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "owner";
type: "core::starknet::contract_address::ContractAddress";
},
];
name: "switchboard::switchboard::OwnerUpdated";
type: "event";
},
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "new_class_hash";
type: "core::starknet::class_hash::ClassHash";
},
];
name: "switchboard::switchboard::ContractUpgraded";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "message"; type: "core::felt252" },
];
name: "switchboard::switchboard::InvalidSecpSignature";
type: "event";
},
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "expected";
type: "core::starknet::eth_address::EthAddress";
},
{
kind: "data";
name: "actual";
type: "core::starknet::eth_address::EthAddress";
},
];
name: "switchboard::switchboard::InvalidSecpAuthority";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "queue_id"; type: "core::integer::u256" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::switchboard::InvalidQueue";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
{ kind: "data"; name: "expiration_time"; type: "core::integer::u64" },
];
name: "switchboard::switchboard::OracleExpired";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "aggregator_id"; type: "core::felt252" },
{ kind: "data"; name: "valid_responses"; type: "core::integer::u32" },
{ kind: "data"; name: "min_responses"; type: "core::integer::u32" },
];
name: "switchboard::switchboard::NotEnoughResponses";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "aggregator_id"; type: "core::felt252" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
{ kind: "data"; name: "timestamp"; type: "core::integer::u64" },
{ kind: "data"; name: "result"; type: "core::integer::i128" },
];
name: "switchboard::switchboard::AddedUpdate";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "queue_id"; type: "core::integer::u256" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::switchboard::QuorumNotReached";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "queue_id"; type: "core::integer::u256" },
{ kind: "data"; name: "oracle_id"; type: "core::integer::u256" },
];
name: "switchboard::switchboard::OracleAdded";
type: "event";
},
{
kind: "struct";
members: readonly [
{
kind: "data";
name: "secp256k1_key";
type: "core::byte_array::ByteArray";
},
];
name: "switchboard::switchboard::InvalidSecpPublicKey";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "randomness_id"; type: "core::integer::u256" },
{ kind: "data"; name: "settled_at"; type: "core::integer::u64" },
];
name: "switchboard::switchboard::RandomnessAlreadySettled";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "randomness_id"; type: "core::integer::u256" },
{ kind: "data"; name: "roll_timestamp"; type: "core::integer::u256" },
{
kind: "data";
name: "min_settlement_delay";
type: "core::integer::u64";
},
];
name: "switchboard::switchboard::RandomnessTooEarly";
type: "event";
},
{
kind: "struct";
members: readonly [
{ kind: "data"; name: "randomness_id"; type: "core::integer::u256" },
{ kind: "data"; name: "value"; type: "core::integer::u256" },
{ kind: "data"; name: "settled_at"; type: "core::integer::u64" },
];
name: "switchboard::switchboard::RandomnessResolved";
type: "event";
},
{
kind: "enum";
name: "switchboard::switchboard::Event";
type: "event";
variants: readonly [
{
kind: "nested";
name: "OwnerUpdated";
type: "switchboard::switchboard::OwnerUpdated";
},
{
kind: "nested";
name: "ContractUpgraded";
type: "switchboard::switchboard::ContractUpgraded";
},
{
kind: "nested";
name: "InvalidSecpSignature";
type: "switchboard::switchboard::InvalidSecpSignature";
},
{
kind: "nested";
name: "InvalidSecpAuthority";
type: "switchboard::switchboard::InvalidSecpAuthority";
},
{
kind: "nested";
name: "InvalidQueue";
type: "switchboard::switchboard::InvalidQueue";
},
{
kind: "nested";
name: "OracleExpired";
type: "switchboard::switchboard::OracleExpired";
},
{
kind: "nested";
name: "NotEnoughResponses";
type: "switchboard::switchboard::NotEnoughResponses";
},
{
kind: "nested";
name: "AddedUpdate";
type: "switchboard::switchboard::AddedUpdate";
},
{
kind: "nested";
name: "QuorumNotReached";
type: "switchboard::switchboard::QuorumNotReached";
},
{
kind: "nested";
name: "OracleAdded";
type: "switchboard::switchboard::OracleAdded";
},
{
kind: "nested";
name: "InvalidSecpPublicKey";
type: "switchboard::switchboard::InvalidSecpPublicKey";
},
{
kind: "nested";
name: "RandomnessAlreadySettled";
type: "switchboard::switchboard::RandomnessAlreadySettled";
},
{
kind: "nested";
name: "RandomnessTooEarly";
type: "switchboard::switchboard::RandomnessTooEarly";
},
{
kind: "nested";
name: "RandomnessResolved";
type: "switchboard::switchboard::RandomnessResolved";
},
];
},
],
> & Contract