Factory for deploying upgradable modules (UpgradableModuleFactory.sol)

View Source: contracts/modules/UpgradableModuleFactory.solarrow-up-right

↗ Extends: ModuleFactoryarrow-up-right ↘ Derived Contracts: BlacklistTransferManagerFactoryarrow-up-right, CappedSTOFactoryarrow-up-right, CountTransferManagerFactoryarrow-up-right, DummySTOFactoryarrow-up-right, ERC20DividendCheckpointFactoryarrow-up-right, EtherDividendCheckpointFactoryarrow-up-right, GeneralPermissionManagerFactoryarrow-up-right, GeneralTransferManagerFactoryarrow-up-right, LockUpTransferManagerFactoryarrow-up-right, ManualApprovalTransferManagerFactoryarrow-up-right, PercentageTransferManagerFactoryarrow-up-right, PLCRVotingCheckpointFactoryarrow-up-right, PreSaleSTOFactoryarrow-up-right, USDTieredSTOFactoryarrow-up-right, VestingEscrowWalletFactoryarrow-up-right, VolumeRestrictionTMFactoryarrow-up-right, WeightedVoteCheckpointFactoryarrow-up-right

UpgradableModuleFactory

Structs

LogicContract

struct LogicContract {
 string version,
 address logicContract,
 bytes upgradeData
}

Contract Members

Constants & Variables

mapping(uint256 => struct UpgradableModuleFactory.LogicContract) public logicContracts;
mapping(address => mapping(address => uint256)) public modules;
mapping(address => address) public moduleToSecurityToken;
uint256 public latestUpgrade;

Events

Functions

Constructor

Arguments

Name

Type

Description

_version

string

_setupCost

uint256

Setup cost of the module

_logicContract

address

Contract address that contains the logic related to description

_polymathRegistry

address

Address of the Polymath registry

_isCostInPoly

bool

true = cost in Poly, false = USD

setLogicContract

Used to upgrade the module factory

Arguments

Name

Type

Description

_version

string

Version of upgraded module

_logicContract

address

Address of deployed module logic contract referenced from proxy

_upgradeData

bytes

Data to be passed in call to upgradeToAndCall when a token upgrades its module

updateLogicContract

Used to update an existing token logic contract

Arguments

Name

Type

Description

_upgrade

uint256

logic contract to upgrade

_version

string

Version of upgraded module

_logicContract

address

Address of deployed module logic contract referenced from proxy

_upgradeData

bytes

Data to be passed in call to upgradeToAndCall when a token upgrades its module

_modifyLogicContract

Arguments

Name

Type

Description

_upgrade

uint256

_version

string

_logicContract

address

_upgradeData

bytes

upgrade

Used by a security token to upgrade a given module

Arguments

Name

Type

Description

_module

address

Address of (proxy) module to be upgraded

_initializeModule

⤾ overrides ModuleFactory._initializeModulearrow-up-right

Used to initialize the module

Arguments

Name

Type

Description

_module

address

Address of module

_data

bytes

Data used for the intialization of the module factory variables

version

⤾ overrides ModuleFactory.versionarrow-up-right

Get the version related to the module factory

Arguments

Name

Type

Description

Last updated

Was this helpful?