Name | mxops JSON |
Version |
2.2.0
JSON |
| download |
home_page | None |
Summary | Python package to automate MultiversX smart contracts deployment and contract interactions in general |
upload_time | 2024-04-16 16:44:57 |
maintainer | None |
docs_url | None |
author | Etienne Wallet |
requires_python | >=3.10 |
license | None |
keywords |
elrond
multiversx
smart-contract
devops
tests
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MxOps
MxOps is a python package created to automate MultiversX transactions: be it smart contracts deployments, calls, queries or just simple transfers. Inspired from DevOps tools and built on top of [mxpy](https://github.com/multiversx/mx-sdk-py-cli), it aims to ease and make reproducible any set of these interactions with the blockchain.
MxOps aims to be useful in these situations:
- deployment automation
- on-chain integration tests
- contract interaction automation
## Quick Overview
Here are some basic uses cases to illustrate how MxOps works.
### Token Mint
```yaml
allowed_networks:
- devnet
- localnet
allowed_scenario:
- "alice_mint"
accounts: # define the accounts to use
- account_name: alice
pem_path: ./wallets/alice.pem
steps:
- type: FungibleIssue # Issue the fungible token
sender: alice
token_name: AliceToken
token_ticker: ATK
initial_supply: 1000000000 # 1,000,000.000 ATK
num_decimals: 3
can_add_special_roles: true
- type: ManageFungibleTokenRoles # assign mint and burn roles to alice
sender: alice
is_set: true
token_identifier: "%AliceToken.identifier"
target: alice
roles:
- ESDTRoleLocalMint
- ESDTRoleLocalBurn
- type: FungibleMint # make alice mint some tokens
sender: alice
token_identifier: "%AliceToken.identifier"
amount: 100000000 # 100,000.000 ATK
```
### Query with ABI
```yaml
allowed_networks:
- mainnet
allowed_scenario:
- .*
external_contracts:
onedex-swap:
address: erd1qqqqqqqqqqqqqpgqqz6vp9y50ep867vnr296mqf3dduh6guvmvlsu3sujc
abi_path: ./abis/onedex-sc.abi.json
steps:
- type: ContractQuery
contract: onedex-swap
endpoint: viewPair
arguments:
- 10 # id of the pair to get the details of
print_results: true
```
```bash
[
{
"pair_id": 10,
"state": {
"name": "Active",
"discriminant": 1,
"values": null
},
"enabled": true,
"owner": "erd1rfs4pg224d2wmndmntvu2dhfhesmuda6m502vt5mfctn3wg7tu4sk6rtku",
"first_token_id": "MPH-f8ea2b",
"second_token_id": "USDC-c76f1f",
"lp_token_id": "MPHUSDC-777138",
"lp_token_decimal": 18,
"first_token_reserve": 16,
"second_token_reserve": 1076937,
"lp_token_supply": 393944771203191982,
"lp_token_roles_are_set": true
}
]
```
### Query without ABI
```yaml
allowed_networks:
- mainnet
allowed_scenario:
- .*
external_contracts:
xexchange-wegld-usdc: erd1qqqqqqqqqqqqqpgqeel2kumf0r8ffyhth7pqdujjat9nx0862jpsg2pqaq
steps:
- type: ContractQuery
contract: xexchange-wegld-usdc
endpoint: getReservesAndTotalSupply
print_results: true
results_types:
- type: BigUint
- type: BigUint
- type: BigUint
```
```bash
[
81478482319716395147753,
4878990096191,
9390873908175
]
```
### Contract Call with Payments
```yaml
allowed_networks:
- localnet
- testnet
- devnet
allowed_scenario:
- .*
steps:
- type: ContractCall
sender: thomas
contract: pair-contract
endpoint: addLiquidity
arguments:
- 984849849765987 # (min amount out for slippage protection)
esdt_transfers:
- token_identifier: TOKENA-abcdef
amount: 894916519846515
nonce: 0
- token_identifier: TOKENB-abcdef
amount: 710549841216484
nonce: 0
gas_limit: 12000000
```
## Getting Started
You have seen above some basic use-cases but MxOps has much more avaible features!
Heads up to the [documentation](https://mxops.readthedocs.io) to get started! You will find tutorials, user documentation and examples 🚀
## Contribution
This tool is an humble proposal by [Catenscia](https://catenscia.com/) to have a standard way of writing deployment files, integration tests and others.
If you want this tool to improve, please tell us your issues and proposals!
And if you're motivated, we will always welcome hepling hands onboard :grin: !
Read the [contribution guidelines](https://github.com/Catenscia/MxOps/blob/main/CONTRIBUTING.md) for more :wink:
Raw data
{
"_id": null,
"home_page": null,
"name": "mxops",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "elrond, multiversx, smart-contract, devops, tests",
"author": "Etienne Wallet",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/70/fe/af77d813e25280d29597fe457e73a6f027d93391580df25a0d1d85258f18/mxops-2.2.0.tar.gz",
"platform": null,
"description": "# MxOps\n\nMxOps is a python package created to automate MultiversX transactions: be it smart contracts deployments, calls, queries or just simple transfers. Inspired from DevOps tools and built on top of [mxpy](https://github.com/multiversx/mx-sdk-py-cli), it aims to ease and make reproducible any set of these interactions with the blockchain.\n\nMxOps aims to be useful in these situations:\n\n- deployment automation\n- on-chain integration tests\n- contract interaction automation\n\n\n## Quick Overview\n\nHere are some basic uses cases to illustrate how MxOps works.\n\n### Token Mint\n\n```yaml\nallowed_networks:\n - devnet\n - localnet\n\nallowed_scenario:\n - \"alice_mint\"\n\naccounts: # define the accounts to use\n - account_name: alice\n pem_path: ./wallets/alice.pem\n\nsteps:\n - type: FungibleIssue # Issue the fungible token\n sender: alice\n token_name: AliceToken\n token_ticker: ATK\n initial_supply: 1000000000 # 1,000,000.000 ATK\n num_decimals: 3\n can_add_special_roles: true\n\n - type: ManageFungibleTokenRoles # assign mint and burn roles to alice\n sender: alice\n is_set: true\n token_identifier: \"%AliceToken.identifier\"\n target: alice\n roles:\n - ESDTRoleLocalMint\n - ESDTRoleLocalBurn\n \n - type: FungibleMint # make alice mint some tokens\n sender: alice\n token_identifier: \"%AliceToken.identifier\"\n amount: 100000000 # 100,000.000 ATK\n\n```\n\n### Query with ABI\n\n```yaml\nallowed_networks:\n - mainnet\n\nallowed_scenario:\n - .*\n\nexternal_contracts:\n onedex-swap: \n address: erd1qqqqqqqqqqqqqpgqqz6vp9y50ep867vnr296mqf3dduh6guvmvlsu3sujc\n abi_path: ./abis/onedex-sc.abi.json\n\nsteps:\n\n - type: ContractQuery\n contract: onedex-swap\n endpoint: viewPair\n arguments:\n - 10 # id of the pair to get the details of\n print_results: true\n```\n\n```bash\n[\n {\n \"pair_id\": 10,\n \"state\": {\n \"name\": \"Active\",\n \"discriminant\": 1,\n \"values\": null\n },\n \"enabled\": true,\n \"owner\": \"erd1rfs4pg224d2wmndmntvu2dhfhesmuda6m502vt5mfctn3wg7tu4sk6rtku\",\n \"first_token_id\": \"MPH-f8ea2b\",\n \"second_token_id\": \"USDC-c76f1f\",\n \"lp_token_id\": \"MPHUSDC-777138\",\n \"lp_token_decimal\": 18,\n \"first_token_reserve\": 16,\n \"second_token_reserve\": 1076937,\n \"lp_token_supply\": 393944771203191982,\n \"lp_token_roles_are_set\": true\n }\n]\n```\n\n### Query without ABI\n\n```yaml\nallowed_networks:\n - mainnet\n\nallowed_scenario:\n - .*\n\nexternal_contracts:\n xexchange-wegld-usdc: erd1qqqqqqqqqqqqqpgqeel2kumf0r8ffyhth7pqdujjat9nx0862jpsg2pqaq\n\nsteps:\n\n - type: ContractQuery\n contract: xexchange-wegld-usdc\n endpoint: getReservesAndTotalSupply\n print_results: true\n results_types:\n - type: BigUint\n - type: BigUint\n - type: BigUint\n```\n\n```bash\n[\n 81478482319716395147753,\n 4878990096191,\n 9390873908175\n]\n```\n\n### Contract Call with Payments\n\n```yaml\nallowed_networks:\n - localnet\n - testnet\n - devnet\n\nallowed_scenario:\n - .*\n\nsteps:\n - type: ContractCall\n sender: thomas\n contract: pair-contract\n endpoint: addLiquidity\n arguments:\n - 984849849765987 # (min amount out for slippage protection)\n esdt_transfers:\n - token_identifier: TOKENA-abcdef\n amount: 894916519846515\n nonce: 0\n - token_identifier: TOKENB-abcdef\n amount: 710549841216484\n nonce: 0\n gas_limit: 12000000\n```\n\n## Getting Started\n\nYou have seen above some basic use-cases but MxOps has much more avaible features!\nHeads up to the [documentation](https://mxops.readthedocs.io) to get started! You will find tutorials, user documentation and examples \ud83d\ude80\n\n## Contribution\n\nThis tool is an humble proposal by [Catenscia](https://catenscia.com/) to have a standard way of writing deployment files, integration tests and others.\nIf you want this tool to improve, please tell us your issues and proposals!\n\nAnd if you're motivated, we will always welcome hepling hands onboard :grin: !\n\nRead the [contribution guidelines](https://github.com/Catenscia/MxOps/blob/main/CONTRIBUTING.md) for more :wink:\n",
"bugtrack_url": null,
"license": null,
"summary": "Python package to automate MultiversX smart contracts deployment and contract interactions in general",
"version": "2.2.0",
"project_urls": {
"Homepage": "https://github.com/Catenscia/MxOps"
},
"split_keywords": [
"elrond",
" multiversx",
" smart-contract",
" devops",
" tests"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a3fac03b0e4a9a03a6ea65a7e75c187cc98e1c99f534b9cb9816b33327aceb56",
"md5": "e63c88d81cee9cee71e3df5df9a9a708",
"sha256": "7ee57b7eeb7fe4905cd4cb6333ab57a222a5f2f56ee9432c88aeff82b2756f51"
},
"downloads": -1,
"filename": "mxops-2.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e63c88d81cee9cee71e3df5df9a9a708",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 66038,
"upload_time": "2024-04-16T16:44:56",
"upload_time_iso_8601": "2024-04-16T16:44:56.063691Z",
"url": "https://files.pythonhosted.org/packages/a3/fa/c03b0e4a9a03a6ea65a7e75c187cc98e1c99f534b9cb9816b33327aceb56/mxops-2.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "70feaf77d813e25280d29597fe457e73a6f027d93391580df25a0d1d85258f18",
"md5": "0748cfaa247a0cd7da2b328a2e1feb5a",
"sha256": "b0f33f421af6341c343aa48e4bd0f063f096525ebcc372ff73502a8f83c26a26"
},
"downloads": -1,
"filename": "mxops-2.2.0.tar.gz",
"has_sig": false,
"md5_digest": "0748cfaa247a0cd7da2b328a2e1feb5a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 63340,
"upload_time": "2024-04-16T16:44:57",
"upload_time_iso_8601": "2024-04-16T16:44:57.973018Z",
"url": "https://files.pythonhosted.org/packages/70/fe/af77d813e25280d29597fe457e73a6f027d93391580df25a0d1d85258f18/mxops-2.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-16 16:44:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Catenscia",
"github_project": "MxOps",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "mxops"
}