Hi, I have uploaded a simple contract template onto my Fireblocks Sandbox, here is the implementation of its:
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.22;
contract HelloWorld {
constructor()
{}
function sayHello() public pure returns (string memory) {
return "Hello, World!";
}
}
and this is the function in JavaScript which I use to deploy the contract:
async function deployContract() {
const assetId = “AMOY_POLYGON_TEST”;
const vaultAccountId = “1”;
const constructorParameters = ;
const contractTemplateId = “e06b9427-bb9c-4c59-b4a3-131550f7273a”;
try {
const result = await fireblocks.contractTemplates.deployContract({
contractDeployRequest: {
assetId: assetId,
vaultAccountId: vaultAccountId,
constructorParameters: constructorParameters,
},
contractTemplateId: contractTemplateId,
});
console.log(result);
} catch (e) {
if (e.response && e.response.data && e.response.data.errorMessage) {
console.log(“Detailed error:”, e.response.data.errorMessage);
}
console.error(e);
}
}
So after I have successfully submitted the deployment request onto Fireblocks, I got this error said:
subStatus: ‘SMART_CONTRACT_EXECUTION_FAILED’,
errorDescription: ‘execution reverted’
I don’t know why this is arising since the contract doesn’t require any constructor parameters which may lead to the ‘execution reverted’ problem, and the vault is funded with an adequate amount of token . Can somebody help me?