Skip to content

Releases: pegasuszone/pegasus

Alpha pre-release

06 Sep 15:22
Compare
Choose a tag to compare
Alpha pre-release Pre-release
Pre-release

About this release

This is a pre-release of the pegasus Stargaze contract.

Pegasus allows NFT holders to trade one or multiple of their assets for another user’s asset(s) directly. The contract does not require these assets to be sent to it and therefore are not locked up while the offer is active, rather the user gives the contract an “authorization” (Cw721::Approve) to transfer the NFT.

This isn’t done in the contract, but rather must be done in the frontend or from wherever you’re sending the transaction from. If grouping messages, make sure the authorizations come before the execute message to the contract, or you’ll get an error.

The contract then uses this authorization to complete the trade. If the trade is retracted, the user will also have to revoke this authorization, which is done automatically on the frontend.

Deploying the contract

Before attempting to deploy the contract, you will need a key to sign the transaction. Create a key like this:

starsd keys add <key-name>

Then provide the deploy script with the name of your key by replacing line 7:

6   export CONTRACT_NAME=pegasus;
7   export KEY_NAME=<key-name>; # < Replace this with the name of your key
8
9   export WALLET_DATA=$(starsd keys show $KEY_NAME --output json | jq .);

To deploy the contract to testnet, run the following:

zsh ./scripts/deploy_testnet.sh