Views
31 read-only calls. They cost no gas when queried through a node’s vm-values endpoint and are the
authority for anything the API reports about entitlement, pricing and the relayer registry.
Contract crate corelayer 1.0.0, built with
multiversx-sc 0.66.2 on rustc 1.94.1 (e408947bf 2026-03-25).
The ABI itself is served at /abi/corelayer.abi.json.
getConfig
view
No arguments.
| Returns | Type | |
|---|---|---|
— | ConfigView |
getPauseState
view
No arguments.
| Returns | Type | |
|---|---|---|
— | PauseStateView |
getRelayerReserve
view
Effective reserve address (lazy activation); zero while never set.
| Argument | Type | |
|---|---|---|
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | Address |
getSwapBudget
view
(max_deposit, used_in_window, window_end_ms); (0, 0, 0) when unlimited. The bucket SLIDES (SPEC-DEVIATIONS DEV-18), so used_in_window is the level after draining it to at_ms — exactly what a deposit at at_ms would measure its amount against — and window_end_ms is when the level reaches 0. A fully drained bucket reads as the fresh window a deposit at at_ms would open, which is what the previous tumbling window reported.
| Argument | Type | |
|---|---|---|
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | u64 | |
— | u64 | |
— | u64 |
getTariff
view
Raw storage: (current, pending, pending_effective_ms, version).
No arguments.
| Returns | Type | |
|---|---|---|
— | u64 | |
— | u64 | |
— | u64 | |
— | u32 |
getEffectiveTariff
view
(tariff, version) with the lazy rule applied.
| Argument | Type | |
|---|---|---|
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | u64 | |
— | u32 |
getTariffByVersion
view
| Argument | Type | |
|---|---|---|
version | u32 |
| Returns | Type | |
|---|---|---|
— | TariffEntry |
getTariffHistory
view
1-based, at most TARIFF_HISTORY_PAGE_MAX entries per call; a range past the end is clamped.
| Argument | Type | |
|---|---|---|
from_idx | u32 | |
count | u32 |
| Returns | Type | |
|---|---|---|
— | variadic<TariffEntry> | variadic |
getRuSchedule
view
| Argument | Type | |
|---|---|---|
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | RuScheduleView |
getPricingConfig
view
One call for /v1/pricing.
| Argument | Type | |
|---|---|---|
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | PricingConfigView |
getTier
view
| Argument | Type | |
|---|---|---|
tier_id | u32 |
| Returns | Type | |
|---|---|---|
— | TierV1 |
getTiers
view
Bounded by MAX_TIERS.
No arguments.
| Returns | Type | |
|---|---|---|
— | variadic<TierV1> | variadic |
getRateClass
view
| Argument | Type | |
|---|---|---|
class | u8 |
| Returns | Type | |
|---|---|---|
— | RateClassV1 |
getRateClasses
view
Probes the whole u8 class space (1..=255): bounded by the key type, no index key needed.
No arguments.
| Returns | Type | |
|---|---|---|
— | List<RateClassEntry> |
isCustomBuyer
view
| Argument | Type | |
|---|---|---|
tier_id | u32 | |
address | Address |
| Returns | Type | |
|---|---|---|
— | bool |
getPrice
view
micro-USDC for months of tier_id at the effective tariff. Same months rule as subscribe: 1..=12 for a period tier, 0 for a no-period tier.
| Argument | Type | |
|---|---|---|
tier_id | u32 | |
months | u8 | |
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | u64 |
getPaygPrice
view
micro-USDC per RU at the effective tariff.
| Argument | Type | |
|---|---|---|
tier_id | u32 | |
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | u64 |
getAccount
view
The record after a VIRTUAL advance at t = max(at_ms, created_ms), plus the settlement field names of S §3.1 that are derived rather than stored. Nothing is written: a view always shows what the next transaction would see.
| Argument | Type | |
|---|---|---|
address | Address | |
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | optional<AccountView> | variadic |
getAccountById
view
The reconciliation direction: id -> address plus the same view.
| Argument | Type | |
|---|---|---|
account_id | u32 | |
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | optional<multi<Address,AccountView>> | variadic |
isAuthorizedSender
view
added_at_ms, or 0 when the sender is not authorised by this account.
| Argument | Type | |
|---|---|---|
account | Address | |
sender | Address |
| Returns | Type | |
|---|---|---|
— | u64 |
quoteRenew
view
The settler's prediction (S §8): exactly the decision half renew runs, so a quote and the transaction cannot drift apart.
| Argument | Type | |
|---|---|---|
account | Address | |
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | RenewQuote |
quotePaygPrice
view
The settler's pre-flight: micro-USDC per RU the contract would apply to this line, 0 when the line would be rejected. Like settleUsage itself it does NOT advance the plan (INV-C3).
| Argument | Type | |
|---|---|---|
account | Address | |
period_id | u32 | |
tariff_idx | u16 | |
at_ms | optional<u64> | variadic |
| Returns | Type | |
|---|---|---|
— | u64 |
getSettlementState
view
reporter is the EFFECTIVE address (a due pending reporter is already in force even though it has not been materialised yet), so the settler sees the same address require_reporter would accept.
No arguments.
| Returns | Type | |
|---|---|---|
— | SettlementStateView |
getTotalOutstandingCredits
view
(free_credits, payg_escrow) — the tariff-down exposure check of pricing.md §3.6, read before a tariff change.
No arguments.
| Returns | Type | |
|---|---|---|
— | u64 | |
— | u64 |
getRelayerState
view
A bare u8 with no optional argument on purpose: this is the call agents make through third-party gateways, so it must stay trivially encodable. 0 = not ours, 2 = Active = safe to sign for.
| Argument | Type | |
|---|---|---|
address | Address |
| Returns | Type | |
|---|---|---|
— | u8 |
getRelayer
view
| Argument | Type | |
|---|---|---|
address | Address |
| Returns | Type | |
|---|---|---|
— | optional<RelayerInfo> | variadic |
getActiveRelayers
view
(address, shard, weight) per active relayer, from ONE storage read.
No arguments.
| Returns | Type | |
|---|---|---|
— | variadic<multi<Address,u8,u32>> | variadic |
getRelayers
view
Bounded by MAX_RELAYERS. The two trailing optionals are positional and 255 means "any", so a caller can filter by state without naming a shard.
| Argument | Type | |
|---|---|---|
shard | optional<u8> | variadic |
state | optional<u8> | variadic |
| Returns | Type | |
|---|---|---|
— | variadic<RelayerRow> | variadic |
getRegistryVersion
view
No arguments.
| Returns | Type | |
|---|---|---|
— | u64 |
getShardWeights
view
(w0, w1, w2, total) — "where does the 70 % go", derived from the same single blob the push uses.
No arguments.
| Returns | Type | |
|---|---|---|
— | u64 | |
— | u64 | |
— | u64 | |
— | u64 |
getDistributionState
view
No arguments.
| Returns | Type | |
|---|---|---|
— | DistributionStateView |