开始
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
Or Install the package from https://github.com/filswan/python-mcs-sdk.
Install required packages using pip.
Environment Variables
Once you have your Mumbai wallet and RPC URL, store your wallet's private key and the RPC URL.
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