axelar-gmp-sdk-solidity

Solidity API

Create2

This contract can be used to deploy a contract with a deterministic address that depends on the contract bytecode, deployer address, and deployment salt.

_create2

function _create2(bytes bytecode, bytes32 deploySalt) internal returns (address deployed)

Deploys a new contract using the CREATE2 method.

This function deploys the contract using CREATE2 opcode.

Parameters

Name Type Description
bytecode bytes The bytecode of the contract to be deployed
deploySalt bytes32 A salt to influence the contract address

Return Values

Name Type Description
deployed address The address of the deployed contract

_create2Address

function _create2Address(bytes bytecode, bytes32 deploySalt) internal view returns (address)

Computes the deployed address that will result from the CREATE2 method.

Parameters

Name Type Description
bytecode bytes The bytecode of the contract to be deployed
deploySalt bytes32 A salt to influence the contract address

Return Values

Name Type Description
[0] address address The deterministic contract address if it was deployed