OpenTermLoanManagerFactory
Constructor
constructor(
address globals_
);Parameters:
0
globals_
address
address
Functions
createInstance
createInstanceDeploys a new instance proxying the default implementation version, with some initialization arguments. Uses a nonce and `msg.sender` as a salt for the CREATE2 opcode during instantiation to produce deterministic addresses.
function createInstance(
bytes arguments_,
bytes32 salt_
)
nonpayable
returns (
address instance_
);Parameters:
0
arguments_
bytes
bytes
The initialization arguments to use for the instance deployment, if any.
1
salt_
bytes32
bytes32
The salt to use in the contract creation process.
Return Values:
0
instance_
address
address
The address of the deployed proxy contract.
defaultImplementation
defaultImplementationThe address of an implementation for proxies.
Return Values:
0
defaultImplementation_
address
address
defaultVersion
defaultVersionThe default version.
Return Values:
0
uint256
uint256
disableUpgradePath
disableUpgradePathDisables upgrading from a version to a version of a implementation. Only the Governor can call this function.
Parameters:
0
fromVersion_
uint256
uint256
The starting version of the upgrade path.
1
toVersion_
uint256
uint256
The destination version of the upgrade path.
enableUpgradePath
enableUpgradePathEnables upgrading from a version to a version of an implementation, with an optional migrator. Only the Governor can call this function.
Parameters:
0
fromVersion_
uint256
uint256
The starting version of the upgrade path.
1
toVersion_
uint256
uint256
The destination version of the upgrade path.
2
migrator_
address
address
The address of the migrator, if any.
getInstanceAddress
getInstanceAddressReturns the deterministic address of a potential proxy, given some arguments and salt.
Parameters:
0
arguments_
bytes
bytes
The initialization arguments to be used when deploying the proxy.
1
salt_
bytes32
bytes32
The salt to be used when deploying the proxy.
Return Values:
0
instanceAddress_
address
address
The deterministic address of a potential proxy.
implementationOf
implementationOfReturns the address of an implementation version.
Parameters:
0
version_
uint256
uint256
The implementation version.
Return Values:
0
implementation_
address
address
The address of the implementation.
isInstance
isInstanceReturns if a given address has been deployed by this factory/
Parameters:
0
``
address
address
Return Values:
0
bool
bool
mapleGlobals
mapleGlobalsThe address of the MapleGlobals contract.
Return Values:
0
address
address
migratorForPath
migratorForPathReturns the address of a migrator contract for a migration path (from version, to version). If oldVersion_ == newVersion_, the migrator is an initializer.
Parameters:
0
oldVersion_
uint256
uint256
The old version.
1
newVersion_
uint256
uint256
The new version.
Return Values:
0
migrator_
address
address
The address of a migrator contract.
registerImplementation
registerImplementationRegisters the address of an implementation contract as a version, with an optional initializer. Only the Governor can call this function.
Parameters:
0
version_
uint256
uint256
The version to register.
1
implementationAddress_
address
address
The address of the implementation.
2
initializer_
address
address
The address of the initializer, if any.
setDefaultVersion
setDefaultVersionSets the default version. Only the Governor can call this function.
Parameters:
0
version_
uint256
uint256
The implementation version to set as the default.
setGlobals
setGlobalsSets the Maple Globals contract. Only the Governor can call this function.
Parameters:
0
mapleGlobals_
address
address
The address of a Maple Globals contract.
upgradeEnabledForPath
upgradeEnabledForPathWhether the upgrade is enabled for a path from a version to another version.
Parameters:
0
``
uint256
uint256
1
``
uint256
uint256
Return Values:
0
bool
bool
upgradeInstance
upgradeInstanceUpgrades the calling proxy contract's implementation, with some migration arguments.
Parameters:
0
toVersion_
uint256
uint256
The implementation version to upgrade the proxy contract to.
1
arguments_
bytes
bytes
The migration arguments, if any.
versionOf
versionOfReturns the version of an implementation contract.
Parameters:
0
implementation_
address
address
The address of an implementation contract.
Return Values:
0
version_
uint256
uint256
The version of the implementation contract.
Events
DefaultVersionSet
DefaultVersionSetA default version was set.
Parameters:
0
version_
uint256
uint256
The default version.
ImplementationRegistered
ImplementationRegisteredA version of an implementation, at some address, was registered, with an optional initializer.
Parameters:
0
version_
uint256
uint256
The version registered.
1
implementationAddress_
address
address
The address of the implementation.
2
initializer_
address
address
The address of the initializer, if any.
InstanceDeployed
InstanceDeployedA proxy contract was deployed with some initialization arguments.
Parameters:
0
version_
uint256
uint256
The version of the implementation being proxied by the deployed proxy contract.
1
instance_
address
address
The address of the proxy contract deployed.
2
initializationArguments_
bytes
bytes
The arguments used to initialize the proxy contract, if any.
InstanceUpgraded
InstanceUpgradedA instance has upgraded by proxying to a new implementation, with some migration arguments.
Parameters:
0
instance_
address
address
The address of the proxy contract.
1
fromVersion_
uint256
uint256
The initial implementation version being proxied.
2
toVersion_
uint256
uint256
The new implementation version being proxied.
3
migrationArguments_
bytes
bytes
The arguments used to migrate, if any.
MapleGlobalsSet
MapleGlobalsSetThe MapleGlobals was set.
Parameters:
0
mapleGlobals_
address
address
The address of a Maple Globals contract.
UpgradePathDisabled
UpgradePathDisabledAn upgrade path was disabled, with an optional migrator contract.
Parameters:
0
fromVersion_
uint256
uint256
The starting version of the upgrade path.
1
toVersion_
uint256
uint256
The destination version of the upgrade path.
UpgradePathEnabled
UpgradePathEnabledAn upgrade path was enabled, with an optional migrator contract.
Parameters:
0
fromVersion_
uint256
uint256
The starting version of the upgrade path.
1
toVersion_
uint256
uint256
The destination version of the upgrade path.
2
migrator_
address
address
The address of the migrator, if any.
Last updated