开始
This guide will explain how to install the python-mcs-sdk and its basic usage
Prerequisites
Web3 python package
Polygon Mumbai Testnet Wallet - Metamask Tutorial
Polygon Mumbai Testnet Alchemy RPC - Alchemy Tutorial
pytest package (for testing purposes)
Mumbai Testnet USDC and MATIC funds are also necessary - Swan Faucet Tutorial
Installation
Install package using pip
pip install python-mcs-sdkOr Install the package from https://github.com/filswan/python-mcs-sdk.
$ git clone https://github.com/filswan/python-mcs-sdk.gitInstall required packages using pip.
pip install -r requirements.txtEnvironment Variables
Once you have your Mumbai wallet and RPC URL, store your wallet's private key and the RPC URL.
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