IAvmDirectory
Overview
Section titled “Overview”Global registry roll-up for tenants, groups, market kinds, deployed markets, and emitter permissions. Composes public caller-permission slices.
IAvmDirectory
Section titled “IAvmDirectory”This interface does not require the directory itself to use a proxy model. Caller-permission slices: - IAvmDirectoryViews: read-only views. - IAvmDirectoryGroupAdmin: market-group-admin operations. - IAvmDirectoryTenantAdmin: tenant-admin operations.
Functions
Section titled “Functions”acceptMarketGroupAdmin
Section titled “acceptMarketGroupAdmin”Inherited from IAvmDirectoryGroupAdmin.
Accept a pending group-admin transfer; caller must match MarketGroup.proposedAdmin.
function acceptMarketGroupAdmin(GroupId groupId) nonpayableParameters
groupId— GroupId
acceptTenantAdmin
Section titled “acceptTenantAdmin”Inherited from IAvmDirectoryTenantAdmin.
Accept a pending tenant-admin transfer; caller must match Tenant.proposedAdmin.
function acceptTenantAdmin(TenantId tenantId) nonpayableParameters
tenantId— TenantId
createMarketGroup
Section titled “createMarketGroup”Inherited from IAvmDirectoryTenantAdmin.
Create a market group under the tenant. Caller must be the parent-tenant admin.
function createMarketGroup(struct CreateMarketGroupArgs args) nonpayableParameters
args— CreateMarketGroupArgs
engineForKind
Section titled “engineForKind”Inherited from IAvmDirectoryViews.
Current canonical pricing-engine proxy for a market kind.
function engineForKind(MarketKind kind) returns (address) viewParameters
kind— MarketKind
Returns
engine—address
eventEmitter
Section titled “eventEmitter”Inherited from IAvmDirectoryViews.
function eventEmitter() returns (address) viewReturns
address
getMarketAddressById
Section titled “getMarketAddressById”Inherited from IAvmDirectoryViews.
function getMarketAddressById(MarketId marketId) returns (address) viewParameters
marketId— MarketId
Returns
marketAddress—address
getMarketGroup
Section titled “getMarketGroup”Inherited from IAvmDirectoryViews.
function getMarketGroup(GroupId groupId) returns (struct DataTypes.MarketGroup) viewParameters
groupId— GroupId
Returns
group— DataTypes.MarketGroup
getMarketIdByAddress
Section titled “getMarketIdByAddress”Inherited from IAvmDirectoryViews.
function getMarketIdByAddress(address marketAddress) returns (MarketId) viewParameters
marketAddress—address
Returns
marketId— MarketId
getMarketKindConfig
Section titled “getMarketKindConfig”Inherited from IAvmDirectoryViews.
function getMarketKindConfig(MarketKind kind) returns (struct DataTypes.MarketTypeConfig) viewParameters
kind— MarketKind
Returns
config— DataTypes.MarketTypeConfig
getTenant
Section titled “getTenant”Inherited from IAvmDirectoryViews.
function getTenant(TenantId tenantId) returns (struct DataTypes.Tenant) viewParameters
tenantId— TenantId
Returns
tenant— DataTypes.Tenant
isAuthorizedEmitter
Section titled “isAuthorizedEmitter”Inherited from IAvmDirectoryViews.
function isAuthorizedEmitter(address caller) returns (bool) viewParameters
caller—address
Returns
bool
marketActionsImpl
Section titled “marketActionsImpl”Inherited from IAvmDirectoryViews.
Current implementation address that every market proxy delegatecalls to for delegated permissionless action methods.
One pointer, shared by every market. Each market re-reads this value on every delegated action call, so a protocol-admin rotation takes effect on every market simultaneously, on the next delegated action call after the rotation transaction is mined. donateLiquidity is served by the market proxy directly and is not routed through this pointer.
function marketActionsImpl() returns (address) viewReturns
address
marketAdminActionsImpl
Section titled “marketAdminActionsImpl”Inherited from IAvmDirectoryViews.
Current implementation address that every market proxy delegatecalls to for auth-gated market admin methods.
One pointer, shared by every market. Each market re-reads this value on every delegated admin call, so a protocol-admin rotation takes effect on every market simultaneously, on the next delegated admin call after the rotation transaction is mined. The proxy keeps the admin auth gates; setting the pointer to address(0) pauses the whole admin family.
function marketAdminActionsImpl() returns (address) viewReturns
address
marketBeacon
Section titled “marketBeacon”Inherited from IAvmDirectoryViews.
Single UpgradeableBeacon shared by every market BeaconProxy.
Every market is engine-agnostic at the bytecode layer; engine flavor differences are resolved through engineForKind, not separate market implementations. So one beacon is sufficient.
function marketBeacon() returns (address) viewReturns
address
marketFactory
Section titled “marketFactory”Inherited from IAvmDirectoryViews.
Canonical factory allowed to call registerMarket.
Deployed by the directory constructor; IAvmFactory.createMarket is the only supported path for new market registration.
function marketFactory() returns (address) viewReturns
address
marketKindExists
Section titled “marketKindExists”Inherited from IAvmDirectoryViews.
function marketKindExists(MarketKind kind) returns (bool) viewParameters
kind— MarketKind
Returns
bool
marketLeverageActionsImpl
Section titled “marketLeverageActionsImpl”Inherited from IAvmDirectoryViews.
Current implementation address that every market proxy delegatecalls to for delegated permissionless leverage-related action methods.
One pointer, shared by every market. Each market re-reads this value on every delegated action call, so a protocol-admin rotation takes effect on every market simultaneously, on the next delegated action call after the rotation transaction is mined.
function marketLeverageActionsImpl() returns (address) viewReturns
address
maxGroupFeeMicroBps
Section titled “maxGroupFeeMicroBps”Inherited from IAvmDirectoryViews.
Maximum allowed group-fee rate for buy, sell, borrow, and exercise-option operations.
Mirrors FeePolicy.MAX_GROUP_FEE_MICRO_BPS. Group fees are charged on gross reserve-token flow for the relevant operation. See IAvmDirectoryGroupAdmin.setMarketGroupFees.
function maxGroupFeeMicroBps() returns (MicroBps) viewReturns
maxPlatformFeeMicroBps
Section titled “maxPlatformFeeMicroBps”Inherited from IAvmDirectoryViews.
Maximum allowed platform-fee share applied to group-fee revenue.
Mirrors FeePolicy.MAX_PLATFORM_FEE_MICRO_BPS. The platform fee is a slice of group-fee revenue, not an additive surcharge on top of the group fee. See IAvmDirectoryProtocolAdmin.setPlatformFee.
function maxPlatformFeeMicroBps() returns (MicroBps) viewReturns
Inherited from IAvmDirectoryViews.
function owner() returns (address) viewReturns
address
proposeMarketGroupAdmin
Section titled “proposeMarketGroupAdmin”Inherited from IAvmDirectoryGroupAdmin.
Propose a new group admin (two-step transfer). Caller must be the current admin.
function proposeMarketGroupAdmin(GroupId groupId, address proposed) nonpayableParameters
groupId— GroupIdproposed—address
proposeTenantAdmin
Section titled “proposeTenantAdmin”Inherited from IAvmDirectoryTenantAdmin.
Propose a new tenant admin (two-step transfer). Caller must be the current admin.
function proposeTenantAdmin(TenantId tenantId, address proposed) nonpayableParameters
tenantId— TenantIdproposed—address
proposedProtocolAdmin
Section titled “proposedProtocolAdmin”Inherited from IAvmDirectoryViews.
function proposedProtocolAdmin() returns (address) viewReturns
address
protocolAdmin
Section titled “protocolAdmin”Inherited from IAvmDirectoryViews.
function protocolAdmin() returns (address) viewReturns
address
setMarketGroupFees
Section titled “setMarketGroupFees”Inherited from IAvmDirectoryGroupAdmin.
Update the fee schedule applied to all markets in this group.
Each rate is a MicroBps value where 100_000_000 represents 100%. Rates apply to gross reserve-token flow for the matching operation (buy on reserve in, sell on reserve out, borrow on debt opened, exerciseOption on floor exercise). Every field must be at most IAvmDirectoryViews.maxGroupFeeMicroBps(). The parent tenant’s platform fee then splits group-fee revenue; it is not additive on top of these rates.
function setMarketGroupFees(GroupId groupId, struct DataTypes.GroupFees fees) nonpayableParameters
groupId— GroupIdfees— DataTypes.GroupFees