Skip to content

ITaxStrategyRegistry

ITaxStrategyRegistry

InvalidTaxControllerInterface

error InvalidTaxControllerInterface()

Thrown when tax controller does not implement the required interface.

TaxStrategyMismatch

error TaxStrategyMismatch(bytes4 provided, bytes4 required)

Thrown when the tax cannot be processed by the specific controller due to the tax strategy ID mismatch.

Name Type Description
provided bytes4 Provided tax strategy ID.
required bytes4 Required tax strategy ID.

TaxStrategyIsAlreadyRegistered

error TaxStrategyIsAlreadyRegistered(bytes4 taxStrategyId)

Thrown upon attempting to register a tax strategy twice.

Name Type Description
taxStrategyId bytes4 Duplicate taxation strategy ID.

UnregisteredTaxStrategy

error UnregisteredTaxStrategy(bytes4 taxStrategyId)

Thrown upon attempting to work with non-existent tax strategy.

Name Type Description
taxStrategyId bytes4 Taxation strategy ID.

TaxStrategyRegistered

event TaxStrategyRegistered(bytes4 taxStrategyId, address controller)

Emitted when the new tax strategy has been registered.

Name Type Description
taxStrategyId bytes4 Tax strategy ID.
controller address Controller address.

TaxStrategyControllerChanged

event TaxStrategyControllerChanged(bytes4 taxStrategyId, address newController)

Emitted when the tax strategy controller has been changed.

Name Type Description
taxStrategyId bytes4 Tax strategy ID.
newController address Controller address.

TaxStrategyConfig

struct TaxStrategyConfig {
  address controller;
}

registerTaxStrategy

function registerTaxStrategy(bytes4 taxStrategyId, struct ITaxStrategyRegistry.TaxStrategyConfig config) external

Registers new tax strategy.

Name Type Description
taxStrategyId bytes4 Tax strategy ID.
config struct ITaxStrategyRegistry.TaxStrategyConfig Taxation strategy configuration.

setTaxController

function setTaxController(bytes4 taxStrategyId, address controller) external

Sets tax strategy controller.

Name Type Description
taxStrategyId bytes4 Tax strategy ID.
controller address Tax controller address.

taxController

function taxController(bytes4 taxStrategyId) external view returns (address)

Returns tax strategy controller.

Name Type Description
taxStrategyId bytes4 Tax strategy ID.
Name Type Description
[0] address Tax controller address.

taxStrategy

function taxStrategy(bytes4 taxStrategyId) external view returns (struct ITaxStrategyRegistry.TaxStrategyConfig)

Returns tax strategy configuration.

Name Type Description
taxStrategyId bytes4 Tax strategy ID.
Name Type Description
[0] struct ITaxStrategyRegistry.TaxStrategyConfig Tax strategy information.

isRegisteredTaxStrategy

function isRegisteredTaxStrategy(bytes4 taxStrategyId) external view returns (bool)

Checks tax strategy registration.

Name Type Description
taxStrategyId bytes4 Listing strategy ID.

checkRegisteredTaxStrategy

function checkRegisteredTaxStrategy(bytes4 taxStrategyId) external view

Reverts if tax strategy is not registered.

Name Type Description
taxStrategyId bytes4 Listing strategy ID.