sCrypt-Inc / scryptTS-examples

Examples of using scryptTS
https://scrypt.io/scryptTS
11 stars 5 forks source link

p2pkh testnet fails #19

Closed xhliu closed 1 year ago

xhliu commented 1 year ago

Unit test succeeds.

  0 passing (1s)
  1 failing

  1) Test SmartContract `P2PKH` on testnet
       should success:
     TypeError: Cannot set property script of #<Input> which has only a getter
      at _clone (node_modules/clone/clone.js:162:16)
      at _clone (node_modules/clone/clone.js:162:18)
      at _clone (node_modules/clone/clone.js:162:18)
      at _clone (node_modules/clone/clone.js:162:18)
      at _clone (node_modules/clone/clone.js:162:18)
      at clone (node_modules/clone/clone.js:202:10)
      at P2PKH.clone (node_modules/scrypt-ts/dist/smart-contract/contract.js:242:41)
      at P2PKH.getUnlockingScript (node_modules/scrypt-ts/dist/smart-contract/contract.js:199:26)
      at /Users/xhliu/projects/scrypt/scrypt-ts/scryptTS-examples/dist/src/contracts/p2pkh.js:39:25
      at Transaction.setInputScript (node_modules/bsv/lib/transaction/transaction.js:1264:24)
      at P2PKH.getCallTx (dist/src/contracts/p2pkh.js:30:77)
      at main (dist/tests/testnet/p2pkh.js:26:34)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Context.<anonymous> (dist/tests/testnet/p2pkh.js:35:9)
xhliu commented 1 year ago

Found out when debugging https://scryptworkspace.slack.com/archives/CLSHPUZC3/p1674597617233399

xhliu commented 1 year ago

Accumulator

msinkec commented 1 year ago

Seems to also throw the same for other contracts like Auction.

gitzhou commented 1 year ago

just fixed up merge conflicts and opened a pr, all cases in testnet should be fine now