I am developing smart contracts in AssemblyScript, deploying contracts via RPC (Remote Procedural Calls), that is dynamically, while coding as and when required. Below is the code that carries out this task.
log(): void {
logging.log(this.owner);
const access_key = base58.decode(Context.senderPublicKey);
logging.log(access_key);
const CODE = base58.decode("build/release/nft.wasm");
ContractPromiseBatch
.create("d4." + this.owner)
.create_account()
.transfer(ONE_NEAR)
.add_full_access_key(access_key)
.deploy_contract(CODE);
}
After the code the new account has been created and the contract code deployed, I get a deserialization error even while carrying out the init calls for initialising the contract.
The error log is :
Failure:
{
"ActionError": {
"index": 0,
"kind": {
"FunctionCallError": {
"CompilationError": {
"PrepareError": "Deserialization"
}
}
}
}
}
The link to the transaction : https://explorer.testnet.near.org/transactions/2HjNsq6ytnN3hT9odoijaYxBsByhQQcwSUTZNwGgzuyg
Heres the init method of the contract I am trying to initialize