Skip to main content
Last updated

retrieve-contract

Retrieve a contract from an API using a /local call

ParameterDescriptionRequiredDefault value
-m --moduleThe module you want to retrieve (e.g. "coin")Yes
-o, --outFile to write the contract to (e.g. ./myContract.pact)Yes
-a, --apiAPI to fetch the contract from (e.g. https://api.chainweb.com/chainweb/0.0/mainnet01/chain/8/pact )Yeshttps://api.chainweb.com
-n, --networkNetwork to retrieve from (e.g. testnet)Nomainnet

Retrieve a contract from chain

sh
pactjs retrieve-contract --out ./myContract.pact --module coin --api https://api.chainweb.com/chainweb/0.0/mainnet01/chain/8/pact
sh
pactjs retrieve-contract --out ./myContract.pact --module coin --api https://api.chainweb.com/chainweb/0.0/mainnet01/chain/8/pact