1

I am trying to send tez from my tz1-AAA account to KT1-AAA contract address means I want my contract address to hold some tez.

Disclaimer - I have knowingly replaced some part of address with "....(s)"

const tezosNode = 'https://rpcalpha.tzbeta.net';
conseiljs.setLogLevel('debug');
async function sendTransaction() {
    const keystore = {
        publicKey: 'edpku.............',
        privateKey: 'edskRrEcP1QJXdFB25a7yJsLUrYcU3uQJ5xwyW.............',
        publicKeyHash: 'tz1UCUZ3vFv8sXwDCg............',
        seed: '',
        storeType: conseiljs.StoreType.Fundraiser
    };

    const result = await conseiljs.TezosNodeWriter.sendTransactionOperation(tezosNode, keystore, 'KT1J5YznidNBkenu............', 16000000, 1500, '');
    console.log(`Injected operation group id ${result.operationGroupID}`);
}

sendTransaction();

I am using above conseiljs function to do the same. It is giving following error

Gas quota exceeded for the operation
A script or one of its callee took more time than the operation said it would

I also tried to change the gas amount but still it didn't worked.

2 Answers 2

0

It sounds like you exceeded the "burn cap" of how much XTZ it can cost to run the operation.

The arguments to sendTransactionOperation are:

sendTransactionOperation(server: string, keyStore: KeyStore, to: string, amount: number, fee: number, derivationPath: string = '')

Your fee is 1500: it may work if you specify a larger fee.

1
  • I tried with larger burn fee also still it's not working. Commented Mar 12, 2020 at 5:36
0

While I am not familiar with ConseilJS library, please be aware and check the following: 1) Reveal Fee: If you are using this public key first time i.e. it is not yet revealed on the work, there would be a reveal fee 1268 mutez (0.1268 xtz) 2) Origination Fee: If the new contract (KT1...) is getting deployed first time, there would be origination fee of 257,000 mutes (0.257xtz)

So, you may need to add the above fees to what you are already providing.

Additionally, if you have the Tezos Client setup, you can run the following simulation command which can give you the detail of fee breakdown and the total fee you would need for this transaction to go through.

./babylonnet.sh client transfer 16 from tz1... to KT1J5Y... --arg '"Unit"' --dry-run

note: Remember to replace tz1 and KT address in this command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.