Skip to main content

Module IB20Factory

Module IB20Factory 

Source
Available on crate feature base only.
Expand description

Mirror of base_common_precompiles::IB20Factory, the surface frozen at Beryl.

interface IB20Factory {
    enum B20Variant { ASSET, STABLECOIN }
    struct B20StablecoinCreateParams { uint8 version; string name; string symbol; address initialAdmin; string currency; }
    struct B20AssetCreateParams { uint8 version; string name; string symbol; address initialAdmin; uint8 decimals; }
    error NonPayable();
    error TokenAlreadyExists(address token);
    error InvalidVariant();
    error UnsupportedVersion(uint8 version, B20Variant variant);
    error MissingRequiredField(string field);
    error InvalidCurrency(string code);
    error InvalidDecimals(uint8 decimals);
    error InitCallFailed(uint256 index);
    event B20Created(address indexed token, B20Variant indexed variant, string name, string symbol, uint8 decimals, bytes variantParams);
    struct B20StablecoinEventParams { uint8 version; string currency; }
    function createB20(B20Variant variant, bytes32 salt, bytes calldata params, bytes[] calldata initCalls) external returns (address token);
    function getB20Address(B20Variant variant, address sender, bytes32 salt) external view returns (address);
    function isB20(address token) external view returns (bool);
    function isB20Initialized(address token) external view returns (bool);
}

Modules§

abi
Contains dynamic ABI definitions for this contract.

Structs§

B20AssetCreateParams
B20Created
Event with signature B20Created(address,uint8,string,string,uint8,bytes) and selector 0xfd9bf2730513a1709722ff379a0844dfd8f997d600693c2bcc659e188bbdba0d.
B20StablecoinCreateParams
B20StablecoinEventParams
InitCallFailed
Custom error with signature InitCallFailed(uint256) and selector 0x4eae0860.
InvalidCurrency
Custom error with signature InvalidCurrency(string) and selector 0x997c1de8.
InvalidDecimals
Custom error with signature InvalidDecimals(uint8) and selector 0xca950391.
InvalidVariant
Custom error with signature InvalidVariant() and selector 0xf10e8e43.
MissingRequiredField
Custom error with signature MissingRequiredField(string) and selector 0x4a43ae87.
NonPayable
Custom error with signature NonPayable() and selector 0x6fb1b0e9.
TokenAlreadyExists
Custom error with signature TokenAlreadyExists(address) and selector 0x15ef3a57.
UnsupportedVersion
Custom error with signature UnsupportedVersion(uint8,uint8) and selector 0xc0d8b4e0.
createB20Call
Function with signature createB20(uint8,bytes32,bytes,bytes[]) and selector 0x62975e6a.
createB20Return
Container type for the return parameters of the createB20(uint8,bytes32,bytes,bytes[]) function.
getB20AddressCall
Function with signature getB20Address(uint8,address,bytes32) and selector 0x8c30260f.
getB20AddressReturn
Container type for the return parameters of the getB20Address(uint8,address,bytes32) function.
isB20Call
Function with signature isB20(address) and selector 0xfa19b927.
isB20InitializedCall
Function with signature isB20Initialized(address) and selector 0x6a45ba98.
isB20InitializedReturn
Container type for the return parameters of the isB20Initialized(address) function.
isB20Return
Container type for the return parameters of the isB20(address) function.

Enums§

B20Variant
IB20FactoryCalls
Container for all the IB20Factory function calls.
IB20FactoryErrors
Container for all the IB20Factory custom errors.
IB20FactoryEvents
Container for all the IB20Factory events.