{"id":13408889,"url":"https://github.com/Catenscia/MxOps","last_synced_at":"2025-03-14T13:32:17.516Z","repository":{"id":65441862,"uuid":"569113497","full_name":"Catenscia/MxOps","owner":"Catenscia","description":"Python package to automate MultiversX transactions: be it smart contracts deployments, calls, queries or just simple transfers","archived":false,"fork":false,"pushed_at":"2024-09-10T05:21:28.000Z","size":1882,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-10T07:51:00.002Z","etag":null,"topics":["cicd","devops","elrond","multiversx","mxpy","python","smart-contract"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Catenscia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-22T05:26:08.000Z","updated_at":"2024-08-02T09:37:25.000Z","dependencies_parsed_at":"2023-02-13T02:00:39.821Z","dependency_job_id":"543cb403-d185-42dc-b5ee-b5fb6c823477","html_url":"https://github.com/Catenscia/MxOps","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.08571428571428574,"last_synced_commit":"2cd7bce18ba4341410c2164a76af5d9a4e75ba28"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catenscia%2FMxOps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catenscia%2FMxOps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catenscia%2FMxOps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catenscia%2FMxOps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Catenscia","download_url":"https://codeload.github.com/Catenscia/MxOps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243584539,"owners_count":20314783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","devops","elrond","multiversx","mxpy","python","smart-contract"],"created_at":"2024-07-30T20:00:56.178Z","updated_at":"2025-03-14T13:32:14.239Z","avatar_url":"https://github.com/Catenscia.png","language":"Python","funding_links":[],"categories":["MultiversX community"],"sub_categories":["SDKs and dev tools"],"readme":"# 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 🚀\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCatenscia%2FMxOps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCatenscia%2FMxOps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCatenscia%2FMxOps/lists"}