axelar-gmp-sdk-solidity

Solidity API

InitProxy

A proxy contract that can be initialized to use a specified implementation and owner. Inherits from BaseProxy and implements the IInitProxy interface.

This proxy is constructed empty and then later initialized with the implementation contract address, new owner address, and any optional setup parameters.

constructor

constructor() public

Initializes the contract and sets the caller as the owner of the contract.

contractId

function contractId() internal pure virtual returns (bytes32)

Returns the contract ID. It can be used as a check during upgrades. Meant to be implemented in derived contracts.

Return Values

Name Type Description
[0] bytes32 bytes32 The contract ID

init

function init(address implementationAddress, address newOwner, bytes params) external

Initializes the proxy contract with the specified implementation, new owner, and any optional setup parameters.

This function is only callable by the owner of the proxy. If the proxy has already been initialized, it will revert. If the contract ID of the implementation is incorrect, it will also revert. It then stores the implementation address and new owner address in the designated storage slots and calls the setup function on the implementation (if setup params exist).

Parameters

Name Type Description
implementationAddress address The address of the implementation contract
newOwner address The address of the new proxy owner
params bytes Optional parameters to be passed to the setup function of the implementation contract