Skip to content

Commit

Permalink
feat: add IsChequeCell function
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Dec 27, 2020
1 parent e52135b commit 8af982e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/cheque_cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ func ChequeCellArgs(senderLock, receiverLock *types.Script) ([]byte, error) {
}
return append(receiverLockHash.Bytes()[0:20], senderLockHash.Bytes()[0:20]...), nil
}

func IsChequeCell(o *types.CellOutput, systemScripts SystemScripts) bool {
return o.Lock.CodeHash == systemScripts.ChequeCell.CellHash
}

0 comments on commit 8af982e

Please sign in to comment.