开始

This guide will explain how to install the python-mcs-sdk and its basic usage

Prerequisites

Mumbai Testnet USDC and MATIC funds are also necessary - Swan Faucet Tutorial

Installation

Install package using pip

pip install python-mcs-sdk

Or Install the package from https://github.com/filswan/python-mcs-sdkarrow-up-right.

$ git clone https://github.com/filswan/python-mcs-sdk.git

Install required packages using pip.

pip install -r requirements.txt

Environment Variables

Once you have your Mumbai wallet and RPC URL, store your wallet's private key and the RPC URL.

circle-info

Be careful not to expose this information! Revealing your private key to others will give them access to your wallet.

Writing SDK Scripts

To begin writing a script utilizing the SDK, create a new .py file. Let's create a file named demo.py

At the top of this file, require the necessary packages for the script. (pytest is only necessary if you are running a test)

Next, after requiring the SDK, set up the wallet information.

Now we can begin using the SDK methods.

Last updated