We will work on this...
... Eventually

Meanwhile

SCID: bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0

How to Interact with Ghost Exchange

Use the following curl commands to interact with the Ghost Exchange smart contract.


AddLiquidity

Deposit assets and DERO at the current ratio to mint BOO tokens.

Note: The "destination" parameter requires a valid DERO address DIFFERENT FROM THE SENDER'S but, in this context, it serves solely to satisfy the command syntax. Rest assured, the DERO specified will be transferred to the Smart Contract, not the random address provided.

curl -X POST http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"scid":"bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0","ringsize":2,"sc_rpc":[{"name":"entrypoint","datatype":"S","value":"AddLiquidity"},{"name":"asset_address","datatype":"S","value":"ASSET_SCID_HERE"},{"name":"min_liquidity","datatype":"U","value":MIN_LIQUIDITY_HERE}],"transfers":[{"burn":"DERO_AMOUNT_HERE","destination":"RANDOM_DESTINATION_ADDRESS_HERE"},{"scid":"ASSET_SCID_HERE","burn":"ASSET_AMOUNT_HERE"}]}}' -H 'Content-Type: application/json'

RemoveLiquidity

Burn BOO tokens to withdraw DERO & assets at the current ratio.

curl -X POST http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"scinvoke","params":{"scid":"bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0","ringsize":2,"sc_rpc":[{"name":"entrypoint","datatype":"S","value":"RemoveLiquidity"},{"name":"amount","datatype":"U","value":AMOUNT_HERE},{"name":"min_dero","datatype":"U","value":MIN_DERO_HERE},{"name":"min_assets","datatype":"U","value":MIN_ASSETS_HERE},{"name":"asset_address","datatype":"S","value":"ASSET_SCID_HERE"}]}}' -H 'Content-Type: application/json'

DeroToAssetSwapInput

Convert DERO to Assets, specifying exact input (DEROVALUE()).

curl -X POST http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"scinvoke","params":{"sc_dero_deposit":"DERO_AMOUNT_HERE","scid":"bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0","ringsize":2,"sc_rpc":[{"name":"entrypoint","datatype":"S","value":"DeroToAssetSwapInput"},{"name":"asset_address","datatype":"S","value":"ASSET_SCID_HERE"}]}}' -H 'Content-Type: application/json'

DeroToAssetSwapInputMin

Convert DERO to Assets, specifying exact input (DEROVALUE()) and minimum output.

curl -X POST http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"scinvoke","params":{"sc_dero_deposit":"DERO_AMOUNT_HERE","scid":"bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0","ringsize":2,"sc_rpc":[{"name":"entrypoint","datatype":"S","value":"DeroToAssetSwapInputMin"},{"name":"min_assets","datatype":"U","value":MIN_ASSETS_HERE},{"name":"asset_address","datatype":"S","value":"ASSET_SCID_HERE"}]}}' -H 'Content-Type: application/json'

DeroToAssetSwapOutput

Convert DERO to Assets, specifying maximum input (DEROVALUE()) and exact output.

curl -X POST http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"scinvoke","params":{"sc_dero_deposit":"MAX_DERO_AMOUNT_HERE","scid":"bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0","ringsize":2,"sc_rpc":[{"name":"entrypoint","datatype":"S","value":"DeroToAssetSwapOutput"},{"name":"assets_bought","datatype":"U","value":ASSETS_BOUGHT_HERE},{"name":"asset_address","datatype":"S","value":"ASSET_SCID_HERE"}]}}' -H 'Content-Type: application/json'

AssetToDeroSwapInput

Convert Assets to DERO, specifying exact input (ASSET_VALUE()) and minimum output.

curl -X POST http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"scid":"bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0","ringsize":2,"sc_rpc":[{"name":"entrypoint","datatype":"S","value":"AssetToDeroSwapInput"},{"name":"min_dero","datatype":"U","value":MIN_DERO_HERE},{"name":"asset_address","datatype":"S","value":"ASSET_SCID_HERE"}],"transfers":[{"scid":"ASSET_SCID_HERE","burn":"ASSETS_SOLD_AMOUNT_HERE"}]}}' -H 'Content-Type: application/json'

AssetToDeroSwapOutput

Convert Assets to DERO, specifying maximum input (ASSETVALUE()) and exact output.

curl -X POST http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"scid":"bb8714fefca6187c914872ff138fcf4bf883d2ba81dfa73ea19265a2012f3cd0","ringsize":2,"sc_rpc":[{"name":"entrypoint","datatype":"S","value":"AssetToDeroSwapOutput"},{"name":"dero_bought","datatype":"U","value":DERO_BOUGHT_HERE},{"name":"asset_address","datatype":"S","value":"ASSET_SCID_HERE"}],"transfers":[{"scid":"ASSET_SCID_HERE","burn":"MAX_ASSETS_SOLD_AMOUNT_HERE"}]}}' -H 'Content-Type: application/json'