virtualeconomy / v-systems

V Systems Reference Full Node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Lock contract] Failed VSYS deposit on testnet

speedmax opened this issue · comments

Deposit shows InvalidFunctionIndex status for a tx that looks okay. still charged bunch of VSYS

Tried both function index (5,6) with same result.

let function_index = constants.DEPOSIT_FUNCIDX_SPLIT; // constants.DEPOSIT_FUNCIDX

Tx: (failed tx, but commited to chain)
https://testexplorer.v.systems/transactions/56Vs1htRYh6bo72DwsFn2N1giqYLSKpuKRZKLThq4EUE

{
  type: 9,
  id: '56Vs1htRYh6bo72DwsFn2N1giqYLSKpuKRZKLThq4EUE',
  fee: 30000000,
  feeScale: 100,
  timestamp: 1604482774078000000,
  proofs: [
    {
      proofType: 'Curve25519',
      publicKey: 'FYe7qa7V4F2UEKSwSVwUMpgm4mCyGeQnD8FRQBwq6o1i',
      address: 'ATxhj8g5XRWvqsLRkRU5coqdtnbU8EoM5rf',
      signature: 'wPtVsY9dytk7jhhGDY4rg4AEAeeKVX8Z8avpMj46cDtAWd3qHa4uok7YYEYDmjxgokj1NBUMFiQ7MKgpoE7CfGK'
    }
  ],
  contractId: 'CFFCvyPhPDGehnqExZ4AjDuTAWd5btat9Wh',
  functionIndex: 6,
  functionData: '14VJY1DxvcU3kCbEVbgVEVosQfV6xjhMyn3LPQg51JapPzKQnUNwHPiGu8JcmuPtYApKFmkvtaPck93Ha98KKzAb',
  attachment: '2964YDnHvedKGWVTs'
}

Deposit: Nodejs code
https://repl.it/repls/VividGlamorousWeblogsoftware

Transaction status should be failure it failed to involve contract methods

There are over 10 failed transactions with InvalidFunctionIndex, Is this normal behaviour to charge user transaction fees ? Or it should simply reject that is similar to InvalidDataEntry error.

Resolved?

yes, I didn't use the correct function index/params