⚙️Self deploy

How to deploy your SmartContract without the Scheduler

You can deploy an SmartContract with the Minteandome SDK.

Make sure you are executing this library on a browser with Metamask installed. For now, Minteandome does not support deploys using your private keys.

You need to retrieve an existing SmartContract which has not been deployed yet.

const sc = await sdk.getSmartContract('6436ce57cf37d2d6a4ffe50a');

The id is obtained the first time you generate the SmartContract, its unique for each SmartContract.

Another option would be to get the pending SmartContracts.

const smartContracts = await sdk.getPendingSmartContracts();
// Look for the specific SmartContract you want on the previous list

You need to get the SmartContractCompiled before deploying. By default, that field is not informed in your SmartContract.

await sc.compile()

The SmartContract class has a method for deploying itself.

await sc.deploy();

MAKE SURE DEPLOY IS EXECUTED ON A BROWSER WITH METAMASK

GenerateDeploy

Minteandome SDK offers an option for saving time.

const sc = await sdk.generateDeploySmartContract({
        name: 'Test SDK',
        blockchain: 4,
        standard: 'ERC-1155',
        symbol: 'SDK',
        maxNFTs: 100,
        description: 'description',
        configuration: {
            mintPrice: 10
        }
});

This generates, deploys and returns the deployed SmartContract

Last updated