Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Latest commit

 

History

History
179 lines (165 loc) · 5.77 KB

cxTokenFactoryLibV1.md

File metadata and controls

179 lines (165 loc) · 5.77 KB

cxTokenFactoryLibV1.sol

View Source: contracts/libraries/cxTokenFactoryLibV1.sol

cxTokenFactoryLibV1

Functions

getByteCode

Gets the bytecode of the cxToken contract

function getByteCode(IStore s, bytes32 key, uint256 expiryDate, string name, string symbol) external pure
returns(bytecode bytes, salt bytes32)

Arguments

Name Type Description
s IStore Provide the store instance
key bytes32 Provide the cover key
expiryDate uint256 Specify the expiry date of this cxToken instance
name string
symbol string
Source Code
function getByteCode(
    IStore s,
    bytes32 key,
    uint256 expiryDate,
    string memory name,
    string memory symbol
  ) external pure returns (bytes memory bytecode, bytes32 salt) {
    salt = keccak256(abi.encodePacked(ProtoUtilV1.NS_COVER_CXTOKEN, key, expiryDate));

    //slither-disable-next-line too-many-digits
    bytecode = abi.encodePacked(type(cxToken).creationCode, abi.encode(s, key, expiryDate, name, symbol));
  }

Contracts