Following is my code, I’ve cloned piggy bank frontend repo and unable to send ccd from frontend but its working from concordium-clint cli
console.log(new CcdAmount(BigInt('1')), contract.name);
return {
amount: new CcdAmount(BigInt(1)),
address: {
index: BigInt('4836'),
subindex: BigInt('0'),
},
receiveName: `ves-contract.vest`,
maxContractExecutionEnergy: MAX_CONTRACT_EXECUTION_ENERGY,
};
}
export async function submitDeposit(connection: WalletConnection, amount: CcdAmount, account: string, contract: Info) {
return connection.signAndSendTransaction(
account,
AccountTransactionType.Update,
contractUpdatePayload(amount, contract, 'insert'),
{},
''
);
}
function contractUpdatePayload(amount: CcdAmount, contract: Info, method: string) {
console.log(new CcdAmount(BigInt('1')), contract.name);
return {
amount: new CcdAmount(BigInt(1)),
address: {
index: BigInt('4836'),
subindex: BigInt('0'),
},
receiveName: `ves-contract.vest`,
maxContractExecutionEnergy: MAX_CONTRACT_EXECUTION_ENERGY,
};
}
export async function submitDeposit(connection: WalletConnection, amount: CcdAmount, account: string, contract: Info) {
return connection.signAndSendTransaction(
account,
AccountTransactionType.Update,
contractUpdatePayload(amount, contract, 'insert'),
{},
''
);
}```