Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new witness api #763

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

Jimbo4350
Copy link
Contributor

Changelog

- description: |
    <insert-changelog-description-here>
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@@ -0,0 +1,484 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs:3:1-26: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE EmptyCase #-}
  
Perhaps you should remove it.
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs:7:1-31: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE KindSignatures #-}
  
Perhaps you should remove it.
  
Note: Extension KindSignatures is implied by TypeFamilies
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs:14:1-33: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE TypeApplications #-}
  
Perhaps you should remove it.
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs:15:1-29: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE TypeFamilies #-}
  
Perhaps you should remove it.
  
Note: may require {-#&nbsp;LANGUAGE&nbsp;MonoLocalBinds&nbsp;#-} adding to the top of the file, may require {-#&nbsp;LANGUAGE&nbsp;ExplicitNamespaces&nbsp;#-} adding to the top of the file, Extension TypeFamilies is implied by TypeFamilyDependencies
Comment on lines +415 to +512
createIndexedPlutusScriptWitness index witnessable pSwit =
IndexedPlutusScriptWitness witnessable (toPlutusScriptPurpose index witnessable) pSwit

Check warning

Code scanning / HLint

Eta reduce Warning

cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs:(511,1)-(512,88): Warning: Eta reduce
  
Found:
  createIndexedPlutusScriptWitness index witnessable pSwit
    = IndexedPlutusScriptWitness
        witnessable (toPlutusScriptPurpose index witnessable) pSwit
  
Perhaps:
  createIndexedPlutusScriptWitness index witnessable
    = IndexedPlutusScriptWitness
        witnessable (toPlutusScriptPurpose index witnessable)
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE PatternSynonyms #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Tx/BuildTxWith.hs:10:1-32: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE PatternSynonyms #-}
  
Perhaps you should remove it.
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TupleSections #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Tx/BuildTxWith.hs:14:1-30: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE TupleSections #-}
  
Perhaps you should remove it.
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Tx/BuildTxWith.hs:15:1-33: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE TypeApplications #-}
  
Perhaps you should remove it.
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Tx/BuildTxWith.hs:17:1-30: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE TypeOperators #-}
  
Perhaps you should remove it.
  
Note: may require {-#&nbsp;LANGUAGE&nbsp;ExplicitNamespaces&nbsp;#-} adding to the top of the file
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Tx/BuildTxWith.hs:18:1-29: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE ViewPatterns #-}
  
Perhaps you should remove it.
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-scripts-api branch from 41613bf to ee59574 Compare February 25, 2025 19:35
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE InstanceSigs #-}

Check warning

Code scanning / HLint

Unused LANGUAGE pragma Warning

cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/Shim/LegacyScripts.hs:15:1-29: Warning: Unused LANGUAGE pragma
  
Found:
  {-# LANGUAGE InstanceSigs #-}
  
Perhaps you should remove it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant