Skip to content

flyworker/swan-test

Repository files navigation

Swan Sample Test

This is a sample test for Swan. It is a simple test that tests the basic functionality of Swan.

Install

Get Orchestrator API Key

To use swan-sdk, an Orchestrator API key is required.

  • Go to Orchestrator Dashboard, switch network to Mainnet.
  • Login through MetaMask.
  • Click the user icon on the top right.
  • Click 'Show API-Key' -> 'New API Key'

Install dependency

pip install -r requirements.txt

Set up environment variables

Create a .env file in the root directory and add the following environment variables:

WALLET_ADDRESS=<your_wallet_address>
PRIVATE_KEY=<your_private_key>
SWAN_API_KEY=<your_swanchain_api_key>

Make sure to replace the placeholders with your actual values. And have enough balance in your wallet to run the test.

Run the test

Set Up the Virtual Environment:

```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

** Run the test

python -m pytest <test_file_name>.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages