Skip to content

Add check for UnverifiedCovenantError #56

@dagurval

Description

@dagurval

While trying to narrow down an issue with items left on the stack, I stumbled on a different issue:

$ ts-node bug.ts 
Contract address: bitcoincash:pzq7x3fpxgus4dcwsyu8mxh6gcttxncf3y2qjakgsu
Contract balance: 20000
contract opcount: undefined
contract bytesize: undefined
{ TfTypeError: Expected property "3" of type UInt32, got Number -1
    at captureStackTrace (/home/dagurval/cashscript/node_modules/typeforce/errors.js:20:11)
    at tfSubError (/home/dagurval/cashscript/node_modules/typeforce/errors.js:99:3)
    at /home/dagurval/cashscript/node_modules/typeforce/index.js:190:17
    at Array.every (<anonymous>)
    at _tuple (/home/dagurval/cashscript/node_modules/typeforce/index.js:186:20)
    at typeforce (/home/dagurval/cashscript/node_modules/typeforce/index.js:233:9)
    at Transaction.sigHashPreimageBufChunks (/home/dagurval/cashscript/node_modules/cramer-bch/src/transaction.js:321:3)
    at Transaction.sigHashPreimageBuf (/home/dagurval/cashscript/node_modules/cramer-bch/src/transaction.js:416:29)
    at inputs.forEach (/home/dagurval/cashscript/examples/node_modules/cashscript/src/Transaction.ts:154:22)
    at Array.forEach (<anonymous>)
  message: 'Expected property "3" of type UInt32, got Number -1',
  __label: undefined,
  __property: 3,
  __type: { [Function: UInt32] toJSON: [Function: bound ] },
  __value: -1,
  __valueTypeName: 'Number' }
transaction details: undefined

Code: dagurval@53ff201

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcashc-compilerRelates to the cashc compiler

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions