Maple
Search…
⌃K

IMapleProxied

A Maple implementation that is to be proxied, must implement IMapleProxied.

Functions

factory

The address of the proxy factory.
function factory()
view
returns (
address factory_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
factory_
address
address

implementation

The address of the implementation contract being proxied.
function implementation()
view
returns (
address implementation_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
implementation_
address
address

migrate

Modifies the proxy's storage by delegate-calling a migrator contract with some arguments. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
function migrate(
address migrator_,
bytes arguments_
)
nonpayable;

Parameters:

Index
Name
Type
Internal Type
Description
0
migrator_
address
address
The address of a migrator contract.
1
arguments_
bytes
bytes
Some encoded arguments to use for the migration.

setImplementation

Modifies the proxy's implementation address.
function setImplementation(
address newImplementation_
)
nonpayable;

Parameters:

Index
Name
Type
Internal Type
Description
0
newImplementation_
address
address
The address of an implementation contract.

upgrade

Upgrades a contract implementation to a specific version. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
function upgrade(
uint256 toVersion_,
bytes arguments_
)
nonpayable;

Parameters:

Index
Name
Type
Internal Type
Description
0
toVersion_
uint256
uint256
The version to upgrade to.
1
arguments_
bytes
bytes
Some encoded arguments to use for the upgrade.

Events

Upgraded

The instance was upgraded.
event Upgraded(
uint256 toVersion_,
bytes arguments_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
toVersion_
uint256
uint256
The new version of the loan.
1
arguments_
bytes
bytes
The upgrade arguments, if any.