OpenTermLoanManagerFactory

Constructor

    constructor(
        address globals_
    );

Parameters:

Functions

createInstance

Deploys 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:

Return Values:

defaultImplementation

The address of an implementation for proxies.

    function defaultImplementation()
        view
        returns (
            address defaultImplementation_
        );

Return Values:

defaultVersion

The default version.

    function defaultVersion()
        view
        returns (
            uint256
        );

Return Values:

disableUpgradePath

Disables upgrading from a version to a version of a implementation. Only the Governor can call this function.

    function disableUpgradePath(
        uint256 fromVersion_,
        uint256 toVersion_
    )
        nonpayable;

Parameters:

enableUpgradePath

Enables upgrading from a version to a version of an implementation, with an optional migrator. Only the Governor can call this function.

    function enableUpgradePath(
        uint256 fromVersion_,
        uint256 toVersion_,
        address migrator_
    )
        nonpayable;

Parameters:

getInstanceAddress

Returns the deterministic address of a potential proxy, given some arguments and salt.

    function getInstanceAddress(
        bytes arguments_,
        bytes32 salt_
    )
        view
        returns (
            address instanceAddress_
        );

Parameters:

Return Values:

implementationOf

Returns the address of an implementation version.

    function implementationOf(
        uint256 version_
    )
        view
        returns (
            address implementation_
        );

Parameters:

Return Values:

isInstance

Returns if a given address has been deployed by this factory/

    function isInstance(
        address
    )
        view
        returns (
            bool
        );

Parameters:

Return Values:

mapleGlobals

The address of the MapleGlobals contract.

    function mapleGlobals()
        view
        returns (
            address
        );

Return Values:

migratorForPath

Returns the address of a migrator contract for a migration path (from version, to version). If oldVersion_ == newVersion_, the migrator is an initializer.

    function migratorForPath(
        uint256 oldVersion_,
        uint256 newVersion_
    )
        view
        returns (
            address migrator_
        );

Parameters:

Return Values:

registerImplementation

Registers the address of an implementation contract as a version, with an optional initializer. Only the Governor can call this function.

    function registerImplementation(
        uint256 version_,
        address implementationAddress_,
        address initializer_
    )
        nonpayable;

Parameters:

setDefaultVersion

Sets the default version. Only the Governor can call this function.

    function setDefaultVersion(
        uint256 version_
    )
        nonpayable;

Parameters:

setGlobals

Sets the Maple Globals contract. Only the Governor can call this function.

    function setGlobals(
        address mapleGlobals_
    )
        nonpayable;

Parameters:

upgradeEnabledForPath

Whether the upgrade is enabled for a path from a version to another version.

    function upgradeEnabledForPath(
        uint256,
        uint256
    )
        view
        returns (
            bool
        );

Parameters:

Return Values:

upgradeInstance

Upgrades the calling proxy contract's implementation, with some migration arguments.

    function upgradeInstance(
        uint256 toVersion_,
        bytes arguments_
    )
        nonpayable;

Parameters:

versionOf

Returns the version of an implementation contract.

    function versionOf(
        address implementation_
    )
        view
        returns (
            uint256 version_
        );

Parameters:

Return Values:

Events

DefaultVersionSet

A default version was set.

    event DefaultVersionSet(
        uint256 version_
    );

Parameters:

ImplementationRegistered

A version of an implementation, at some address, was registered, with an optional initializer.

    event ImplementationRegistered(
        uint256 version_,
        address implementationAddress_,
        address initializer_
    );

Parameters:

InstanceDeployed

A proxy contract was deployed with some initialization arguments.

    event InstanceDeployed(
        uint256 version_,
        address instance_,
        bytes initializationArguments_
    );

Parameters:

InstanceUpgraded

A instance has upgraded by proxying to a new implementation, with some migration arguments.

    event InstanceUpgraded(
        address instance_,
        uint256 fromVersion_,
        uint256 toVersion_,
        bytes migrationArguments_
    );

Parameters:

MapleGlobalsSet

The MapleGlobals was set.

    event MapleGlobalsSet(
        address mapleGlobals_
    );

Parameters:

UpgradePathDisabled

An upgrade path was disabled, with an optional migrator contract.

    event UpgradePathDisabled(
        uint256 fromVersion_,
        uint256 toVersion_
    );

Parameters:

UpgradePathEnabled

An upgrade path was enabled, with an optional migrator contract.

    event UpgradePathEnabled(
        uint256 fromVersion_,
        uint256 toVersion_,
        address migrator_
    );

Parameters:

Last updated