TaxStrategyRegistry
TaxStrategyRegistry
TaxStrategyRegistryInitParams
struct TaxStrategyRegistryInitParams {
contract IACL acl;
contract IMetahub metahub;
}
onlyRegisteredListingTaxStrategy
modifier onlyRegisteredListingTaxStrategy(bytes4 listingTaxStrategyId)
Modifier to make a function callable only for the registered listing tax strategy.
constructor
constructor() public
initialize
function initialize(struct TaxStrategyRegistry.TaxStrategyRegistryInitParams params) external
Contract initializer.
Name | Type | Description |
---|---|---|
params | struct TaxStrategyRegistry.TaxStrategyRegistryInitParams | Tax Strategy Registry initialization params. |
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. |
contractKey
function contractKey() external pure returns (bytes4)
Returns implemented contract key.
Name | Type | Description |
---|---|---|
[0] | bytes4 | Contract key; |
isRegisteredTaxStrategy
function isRegisteredTaxStrategy(bytes4 taxStrategyId) public view returns (bool)
Checks tax strategy registration.
Name | Type | Description |
---|---|---|
taxStrategyId | bytes4 | Listing strategy ID. |
checkRegisteredTaxStrategy
function checkRegisteredTaxStrategy(bytes4 taxStrategyId) public view
Reverts if tax strategy is not registered.
Name | Type | Description |
---|---|---|
taxStrategyId | bytes4 | Listing strategy ID. |
supportsInterface
function supportsInterface(bytes4 interfaceId) public view returns (bool)
_Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created.
This function call must use less than 30 000 gas._
_authorizeUpgrade
function _authorizeUpgrade(address newImplementation) internal
_Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by {upgradeTo} and {upgradeToAndCall}.
Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
```solidity function authorizeUpgrade(address) internal override onlyOwner {} ```
_checkValidTaxController
function _checkValidTaxController(bytes4 taxStrategyId, address controller) internal view
Reverts if provided address is not a valid tax controller.
Name | Type | Description |
---|---|---|
taxStrategyId | bytes4 | Tax strategy ID. |
controller | address | Tax controller address. |
_acl
function _acl() internal view returns (contract IACL)
return the IACL address