Skip to content

TaxTermsRegistry

TaxTermsRegistry

TaxTermsRegistryInitParams

struct TaxTermsRegistryInitParams {
  contract IACL acl;
  contract IMetahub metahub;
}

onlyAuthorizedToAlterUniverseTaxTerms

modifier onlyAuthorizedToAlterUniverseTaxTerms()

Modifier to make sure the function is called by the account with UNIVERSE_WIZARD.

constructor

constructor() public

initialize

function initialize(struct TaxTermsRegistry.TaxTermsRegistryInitParams params) external

Contract initializer.

Name Type Description
params struct TaxTermsRegistry.TaxTermsRegistryInitParams Initialization params.

registerUniverseLocalTaxTerms

function registerUniverseLocalTaxTerms(uint256 universeId, struct ITaxTermsRegistry.TaxTerms terms) external

Registers universe local tax terms.

Name Type Description
universeId uint256 Universe ID.
terms struct ITaxTermsRegistry.TaxTerms Tax terms data.

removeUniverseLocalTaxTerms

function removeUniverseLocalTaxTerms(uint256 universeId, bytes4 taxStrategyId) external

Removes universe local tax terms.

Name Type Description
universeId uint256 Universe ID.
taxStrategyId bytes4 Tax strategy ID.

registerUniverseWarperTaxTerms

function registerUniverseWarperTaxTerms(uint256 universeId, address warperAddress, struct ITaxTermsRegistry.TaxTerms terms) external

Registers universe warper tax terms.

Name Type Description
universeId uint256 Universe ID.
warperAddress address Warper address.
terms struct ITaxTermsRegistry.TaxTerms Tax terms data.

removeUniverseWarperTaxTerms

function removeUniverseWarperTaxTerms(uint256 universeId, address warperAddress, bytes4 taxStrategyId) external

Removes universe warper tax terms.

Name Type Description
universeId uint256 Universe ID.
warperAddress address Warper address.
taxStrategyId bytes4 Tax strategy ID.

registerProtocolGlobalTaxTerms

function registerProtocolGlobalTaxTerms(struct ITaxTermsRegistry.TaxTerms terms) external

Registers protocol global tax terms.

Name Type Description
terms struct ITaxTermsRegistry.TaxTerms Tax terms.

removeProtocolGlobalTaxTerms

function removeProtocolGlobalTaxTerms(bytes4 taxStrategyId) external

Removes protocol global tax terms.

Name Type Description
taxStrategyId bytes4 Tax strategy ID.

registerProtocolUniverseTaxTerms

function registerProtocolUniverseTaxTerms(uint256 universeId, struct ITaxTermsRegistry.TaxTerms terms) external

Registers protocol universe tax terms.

Name Type Description
universeId uint256 Universe ID.
terms struct ITaxTermsRegistry.TaxTerms Tax terms.

removeProtocolUniverseTaxTerms

function removeProtocolUniverseTaxTerms(uint256 universeId, bytes4 taxStrategyId) external

Removes protocol universe tax terms.

Name Type Description
universeId uint256 Universe ID
taxStrategyId bytes4 Tax strategy ID.

registerProtocolWarperTaxTerms

function registerProtocolWarperTaxTerms(address warperAddress, struct ITaxTermsRegistry.TaxTerms terms) external

Registers protocol warper tax terms.

Name Type Description
warperAddress address Warper address.
terms struct ITaxTermsRegistry.TaxTerms Tax terms.

removeProtocolWarperTaxTerms

function removeProtocolWarperTaxTerms(address warperAddress, bytes4 taxStrategyId) external

Removes protocol warper tax terms.

Name Type Description
warperAddress address Warper address.
taxStrategyId bytes4 Tax strategy ID.

universeTaxTerms

function universeTaxTerms(struct ITaxTermsRegistry.Params params) external view returns (struct ITaxTermsRegistry.TaxTerms taxTerms)

Returns universe's tax terms.

Name Type Description
params struct ITaxTermsRegistry.Params The tax terms params.
Name Type Description
taxTerms struct ITaxTermsRegistry.TaxTerms Universe tax terms.

protocolTaxTerms

function protocolTaxTerms(struct ITaxTermsRegistry.Params params) external view returns (struct ITaxTermsRegistry.TaxTerms taxTerms)

Returns protocol's tax terms.

Name Type Description
params struct ITaxTermsRegistry.Params The tax terms params.
Name Type Description
taxTerms struct ITaxTermsRegistry.TaxTerms Protocol tax terms.

areRegisteredUniverseLocalTaxTerms

function areRegisteredUniverseLocalTaxTerms(uint256 universeId, bytes4 taxStrategyId) external view returns (bool)

Checks registration of universe local tax terms.

Name Type Description
universeId uint256 Universe ID.
taxStrategyId bytes4 Tax Strategy ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

areRegisteredUniverseWarperTaxTerms

function areRegisteredUniverseWarperTaxTerms(uint256 universeId, address warperAddress, bytes4 taxStrategyId) external view returns (bool)

Checks registration of universe warper tax terms.

Name Type Description
universeId uint256 Universe ID.
warperAddress address Warper address.
taxStrategyId bytes4 Tax Strategy ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

areRegisteredProtocolGlobalTaxTerms

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

Checks registration of protocol global tax terms.

Name Type Description
taxStrategyId bytes4 Tax Strategy ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

areRegisteredProtocolUniverseTaxTerms

function areRegisteredProtocolUniverseTaxTerms(uint256 universeId, bytes4 taxStrategyId) external view returns (bool)

Checks registration of protocol universe tax terms.

Name Type Description
universeId uint256 Universe ID.
taxStrategyId bytes4 Tax Strategy ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

areRegisteredProtocolWarperTaxTerms

function areRegisteredProtocolWarperTaxTerms(address warperAddress, bytes4 taxStrategyId) external view returns (bool)

Checks registration of global protocol warper tax terms.

Name Type Description
warperAddress address Warper address.
taxStrategyId bytes4 Tax Strategy ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

contractKey

function contractKey() external pure returns (bytes4)

Returns implemented contract key.

Name Type Description
[0] bytes4 Contract key;

checkRegisteredUniverseTaxTermsWithParams

function checkRegisteredUniverseTaxTermsWithParams(struct ITaxTermsRegistry.Params params) public view

Checks registration of universe tax terms on either local or Warper levels. Reverts in case of absence of listing terms on all levels.

Name Type Description
params struct ITaxTermsRegistry.Params ListingTermsParams specific params.

checkRegisteredProtocolTaxTermsWithParams

function checkRegisteredProtocolTaxTermsWithParams(struct ITaxTermsRegistry.Params params) public view

Checks registration of universe tax terms on either global, universe or Warper levels. Reverts in case of absence of listing terms on all levels.

Name Type Description
params struct ITaxTermsRegistry.Params ListingTermsParams specific params.

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 {} ```

_areRegisteredUniverseLocalTaxTerms

function _areRegisteredUniverseLocalTaxTerms(uint256 universeId, bytes4 taxStrategyId) internal view returns (bool)

_areRegisteredUniverseWarperTaxTerms

function _areRegisteredUniverseWarperTaxTerms(uint256 universeId, address warperAddress, bytes4 taxStrategyId) internal view returns (bool)

_areRegisteredProtocolGlobalTaxTerms

function _areRegisteredProtocolGlobalTaxTerms(bytes4 taxStrategyId) internal view returns (bool)

_areRegisteredProtocolUniverseTaxTerms

function _areRegisteredProtocolUniverseTaxTerms(uint256 universeId, bytes4 taxStrategyId) internal view returns (bool)

_areRegisteredProtocolWarperTaxTerms

function _areRegisteredProtocolWarperTaxTerms(address warperAddress, bytes4 taxStrategyId) internal view returns (bool)

_acl

function _acl() internal view returns (contract IACL)

return the IACL address