Deploy an ERC-1155 Token
OpenZeppelin provides secure, community-vetted smart contract templates that follow best practices for ERC-1155 multi-token contracts. ERC-1155 enables you to deploy multiple fungible and non-fungible tokens from a single contract — ideal for gaming, collectibles, and multi-asset systems.- Deployment with Foundry
- Deployment with Hardhat
Step 0: Setup Foundry
If your Foundry project isn’t set up yet, please go to the Foundry setup section before proceeding.Step 1: Create the ERC-1155 Contract
Create a contract script insrc/MyERC721.sol. Run:- Inherits OpenZeppelin’s
ERC1155 - Supports multiple token types
- Sets a metadata URI using
{id}placeholders - Implements single & batch minting
- Mints initial supply on deployment
The URI string uses
{id} as a placeholder that will be replaced automatically by compatible metadata servers.Step 2: Compile the Contract
Step 3: Prepare Signer for Deployment
Create a Foundry keystore:Be sure to store your keystore password securely — it cannot be recovered.
Step 4: Deploy the Contract
The
--legacy flag is required for SKALE deployments.Step 5: Verify Your Smart Contract
Next Steps
Congratulations! You’ve successfully deployed an ERC-1155 multi-token contract on SKALE. You can now:- Mint fungible and non-fungible tokens
- Batch mint or transfer multiple token types
- Build advanced games, inventories, or multi-asset dApps
- Use metadata per token ID
