I am encountering an error message INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE
while attempting to create a Hedera Token through a smart contract.
The function in question is designed to call the HederaTokenService precompile and create a new token. The objective is to assign the caller's account as the token admin and the treasury account.
Despite the simplicity of the function, I am unable to create the token and instead receive the aforementioned error message.
function myCreateToken() public payable {
IHederaTokenService.TokenKey[]
memory keys = new IHederaTokenService.TokenKey[](0);
IHederaTokenService.Expiry memory expiry = IHederaTokenService.Expiry(
0,
msg.sender,
8000000
);
IHederaTokenService.HederaToken memory token = IHederaTokenService
.HederaToken(
"MyToken",
"MTT",
msg.sender,
"",
true,
10000000,
false,
keys,
expiry
);
(int responseCode, ) = HederaTokenService.createFungibleToken(
token,
10000000,
NUM_DECIMALS
);
require(responseCode == HederaResponseCodes.SUCCESS);
}
Please advise on how I can resolve this issue. Thank you.