A quickstart guide to writing assertions and using the Credible Layer CLI
pcl
(Phylax Credible Layer) CLI. By the end of this tutorial, you’ll understand how to:
pcl
pcl
CLI installed (see the Installation Guide)credible-layer-starter
repo has several examples that you can deploy and try out once you’re done with this guide.
Specific instructions can be found in the README.pcl
CLI to run your tests:
<RPC_URL>
: The RPC URL of the network you’re deploying to<PRIVATE_KEY>
: The private key of the account you used to sign in to the dApp<DEPLOYER_ADDRESS>
: The address of the account you used to sign in to the dAppDeployed to:
address in the output of the command.
pcl
CLI uses the correct urlpcl
CLI is properly installedpcl auth login
command and create a new project. When asked to link your contract, use the address of the contract you deployed in the previous step.
For a more detailed overview of how to use the dApp and manage projects, see the dApp Guide.
OwnableAssertion
is the name of the assertion.
This command submits your assertion’s bytecode and source code to be stored by the Assertion DA, making it available for verification by the network.
pcl store
command:
<project_name>
is the name of the project you created in the dApp, capitalized in the same way as you did when creating the project.
pcl auth login
command and navigate to the project that the assertions was added to.
You’ll notice that there’s one assertion ready for submission, go ahead and proceed to review and activate it.
For a more detailed overview of how to use the dApp, see the dApp Guide.
ADDRESS_OF_OWNABLE_CONTRACT
with the address of your deployed Ownable contract and RPC_URL
with your network’s RPC URL:
NEW_OWNER_ADDRESS
with an address that is not the initial owner and PRIVATE_KEY_OF_THE_OWNER
with the private key of the owner of the contract. This transaction should trigger the assertion and revert: