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§
- B20Asset
Create Params - B20Created
- Event with signature
B20Created(address,uint8,string,string,uint8,bytes)and selector0xfd9bf2730513a1709722ff379a0844dfd8f997d600693c2bcc659e188bbdba0d. - B20Stablecoin
Create Params - B20Stablecoin
Event Params - Init
Call Failed - Custom error with signature
InitCallFailed(uint256)and selector0x4eae0860. - Invalid
Currency - Custom error with signature
InvalidCurrency(string)and selector0x997c1de8. - Invalid
Decimals - Custom error with signature
InvalidDecimals(uint8)and selector0xca950391. - Invalid
Variant - Custom error with signature
InvalidVariant()and selector0xf10e8e43. - Missing
Required Field - Custom error with signature
MissingRequiredField(string)and selector0x4a43ae87. - NonPayable
- Custom error with signature
NonPayable()and selector0x6fb1b0e9. - Token
Already Exists - Custom error with signature
TokenAlreadyExists(address)and selector0x15ef3a57. - Unsupported
Version - Custom error with signature
UnsupportedVersion(uint8,uint8)and selector0xc0d8b4e0. - create
B20Call - Function with signature
createB20(uint8,bytes32,bytes,bytes[])and selector0x62975e6a. - create
B20Return - Container type for the return parameters of the
createB20(uint8,bytes32,bytes,bytes[])function. - getB20
Address Call - Function with signature
getB20Address(uint8,address,bytes32)and selector0x8c30260f. - getB20
Address Return - Container type for the return parameters of the
getB20Address(uint8,address,bytes32)function. - isB20
Call - Function with signature
isB20(address)and selector0xfa19b927. - isB20
Initialized Call - Function with signature
isB20Initialized(address)and selector0x6a45ba98. - isB20
Initialized Return - Container type for the return parameters of the
isB20Initialized(address)function. - isB20
Return - Container type for the return parameters of the
isB20(address)function.
Enums§
- B20Variant
- IB20
Factory Calls - Container for all the
IB20Factoryfunction calls. - IB20
Factory Errors - Container for all the
IB20Factorycustom errors. - IB20
Factory Events - Container for all the
IB20Factoryevents.