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

Remove cardano-cli address build-script #4700

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cardano-cli/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## vNext

- Remove cardano-cli address build-script ([PR 4700](https://github.com/input-output-hk/cardano-node/pull/4700))

### Features

- Default to the ledger's CDDL format for transaction body creation by removing flags `--cddl-format` and `--cli-format` from `build` and `build-raw` ([PR 4303](https://github.com/input-output-hk/cardano-node/pull/4303))
Expand Down
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/Shelley/Commands.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ data AddressCmd
(Maybe StakeVerifier)
NetworkId
(Maybe OutputFile)
| AddressBuildMultiSig ScriptFile NetworkId (Maybe OutputFile)
| AddressInfo Text (Maybe OutputFile)
deriving Show

Expand All @@ -108,7 +107,6 @@ renderAddressCmd cmd =
AddressKeyGen {} -> "address key-gen"
AddressKeyHash {} -> "address key-hash"
AddressBuild {} -> "address build"
AddressBuildMultiSig {} -> "address build-script"
AddressInfo {} -> "address info"

data StakeAddressCmd
Expand Down
8 changes: 0 additions & 8 deletions cardano-cli/src/Cardano/CLI/Shelley/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ pAddressCmd =
(Opt.info pAddressKeyHash $ Opt.progDesc "Print the hash of an address key.")
, subParser "build"
(Opt.info pAddressBuild $ Opt.progDesc "Build a Shelley payment address, with optional delegation to a stake address.")
, subParser "build-script"
(Opt.info pAddressBuildScript $ Opt.progDesc "Build a Shelley script address. (deprecated; use 'build' instead with '--payment-script-file')")
, subParser "info"
(Opt.info pAddressInfo $ Opt.progDesc "Print information about an address.")
]
Expand All @@ -156,12 +154,6 @@ pAddressCmd =
<*> pNetworkId
<*> pMaybeOutputFile

pAddressBuildScript :: Parser AddressCmd
pAddressBuildScript = AddressBuildMultiSig
<$> pScript
<*> pNetworkId
<*> pMaybeOutputFile

pAddressInfo :: Parser AddressCmd
pAddressInfo = AddressInfo <$> pAddress <*> pMaybeOutputFile

Expand Down
17 changes: 0 additions & 17 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import qualified Data.Text.IO as Text
import Cardano.Api
import Cardano.Api.Shelley

import Cardano.CLI.Helpers
import Cardano.CLI.Shelley.Key (PaymentVerifier (..), StakeVerifier (..),
VerificationKeyTextOrFile, VerificationKeyTextOrFileError (..), generateKeyPair,
readVerificationKeyOrFile, readVerificationKeyTextOrFileAnyOf,
Expand Down Expand Up @@ -62,7 +61,6 @@ runAddressCmd cmd =
AddressKeyGen kt vkf skf -> runAddressKeyGenToFile kt vkf skf
AddressKeyHash vkf mOFp -> runAddressKeyHash vkf mOFp
AddressBuild paymentVerifier mbStakeVerifier nw mOutFp -> runAddressBuild paymentVerifier mbStakeVerifier nw mOutFp
AddressBuildMultiSig sFp nId mOutFp -> runAddressBuildScript sFp nId mOutFp
AddressInfo txt mOFp -> firstExceptT ShelleyAddressCmdAddressInfoError $ runAddressInfo txt mOFp

runAddressKeyGenToFile
Expand Down Expand Up @@ -202,18 +200,3 @@ foldSomeAddressVerificationKey f (AGenesisExtendedVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AVrfVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AStakeVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AStakeExtendedVerificationKey vk) = f vk


--
-- Multisig addresses
--

runAddressBuildScript
:: ScriptFile
-> NetworkId
-> Maybe OutputFile
-> ExceptT ShelleyAddressCmdError IO ()
runAddressBuildScript scriptFile networkId mOutputFile = do
liftIO $ deprecationWarning "'address build'"
runAddressBuild (PaymentVerifierScriptFile scriptFile) Nothing networkId mOutputFile

12 changes: 6 additions & 6 deletions cardano-cli/test/Test/Golden/Shelley/MultiSig/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ golden_shelleyAllMultiSigAddressBuild = propertyOnce . H.moduleWorkspace "tmp" $
allMultiSigFp <- noteInputFile "test/data/golden/shelley/multisig/scripts/all"

allMultiSigAddress <- execCardanoCLI
[ "address", "build-script"
, "--script-file", allMultiSigFp
[ "address", "build"
, "--payment-script-file", allMultiSigFp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should a message about this change go in the changelog?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, "--mainnet"
]

Expand All @@ -36,8 +36,8 @@ golden_shelleyAnyMultiSigAddressBuild = propertyOnce . H.moduleWorkspace "tmp" $
anyMultiSigFp <- noteInputFile "test/data/golden/shelley/multisig/scripts/any"

anyMultiSigAddress <- execCardanoCLI
[ "address", "build-script"
, "--script-file", anyMultiSigFp
[ "address", "build"
, "--payment-script-file", anyMultiSigFp
, "--mainnet"
]

Expand All @@ -52,8 +52,8 @@ golden_shelleyAtLeastMultiSigAddressBuild = propertyOnce . H.moduleWorkspace "tm
atLeastMultiSigFp <- noteInputFile "test/data/golden/shelley/multisig/scripts/atleast"

atLeastMultiSigAddress <- execCardanoCLI
[ "address", "build-script"
, "--script-file", atLeastMultiSigFp
[ "address", "build"
, "--payment-script-file", atLeastMultiSigFp
, "--mainnet"
]

Expand Down
1 change: 0 additions & 1 deletion doc/reference/cardano-node-cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ The `address` command contains the following subcommands:
* `key-gen`: creates a single address key pair
* `key-hash`: prints the hash of an address to stdout
* `build`: builds a payment address, with optional delegation to a stake address
* `build-script`: builds a token locking script
* `info`: prints details about the address

*cardano-cli stake-address*
Expand Down
4 changes: 2 additions & 2 deletions doc/reference/simple-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ as described above. For this example, we will describe the process using an
A script address is required in order to use a script. Construct this as follows:

```
cardano-cli address build-script
--script-file allMultiSigScript
cardano-cli address
--payment-script-file allMultiSigScript
--testnet-magic 42
--out-file script.addr
```
Expand Down