# Simular
[![pypi](https://img.shields.io/pypi/v/simular-evm.svg)](https://pypi.python.org/pypi/simular-evm)
A Python smart-contract API with a fast (embedded) Ethereum Virtual Machine (EVM). `Simular` creates a Python wrapper around production grade Rust based Ethereum APIs.
How is it different than Brownie, Ganache, Anvil?
- It's only an EVM, no blocks or mining
- No HTTP/JSON-RPC. You talk directly to the EVM (and it's fast)
- Full functionality: account transfers, contract interaction, etc...
The primary motivation for this work is to be able to model smart-contract interaction in an Agent Based Modeling environment like [Mesa](https://mesa.readthedocs.io/en/main/).
## Features
- `EVM`: run a local version with an in-memory database, or fork db state from a remote node.
- `Snapshot`: dump the current state of the EVM to json for future use in pre-populating EVM storage
- `ABI`: parse compiled Solidity json files or define a specific set of functions using `human-readable` notation
- `Contract`: high-level, user-friendy Python API
## Build from source
- You need `Rust` and `Python`, and optionally `Make`. We use `hatch` for Python project management, but it's not required
- Create a local Python virtual environment. Within that environment install Python dependencies
- Run `make build` or `hatch run maturin develop`
- See `simular/` for the main python api
## Getting Started
See [Simular Documentation](https://simular.readthedocs.io/en/latest/) for examples and API details.
## Standing on the shoulders of giants...
Thanks to the following projects for making this work possible!
- [pyO3](https://github.com/PyO3)
- [revm](https://github.com/bluealloy/revm)
- [alloy-rs](https://github.com/alloy-rs)
- [eth_utils/eth_abi](https://eth-utils.readthedocs.io/en/stable/)
Raw data
{
"_id": null,
"home_page": "https://github.com/simular-fi/simular",
"name": "simular-evm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "agent-based modeling, ethereum, solidity, simulation",
"author": "Dave Bryson",
"author_email": "Dave Bryson <davebryson@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/75/5d/df119f8971d4ec67247aabf6683594568b70541de7b6f76ca8ae87f9899d/simular_evm-0.2.2.tar.gz",
"platform": null,
"description": "\n# Simular\n\n[![pypi](https://img.shields.io/pypi/v/simular-evm.svg)](https://pypi.python.org/pypi/simular-evm)\n\nA Python smart-contract API with a fast (embedded) Ethereum Virtual Machine (EVM). `Simular` creates a Python wrapper around production grade Rust based Ethereum APIs.\n\nHow is it different than Brownie, Ganache, Anvil?\n- It's only an EVM, no blocks or mining\n- No HTTP/JSON-RPC. You talk directly to the EVM (and it's fast)\n- Full functionality: account transfers, contract interaction, etc...\n\nThe primary motivation for this work is to be able to model smart-contract interaction in an Agent Based Modeling environment like [Mesa](https://mesa.readthedocs.io/en/main/).\n\n## Features\n- `EVM`: run a local version with an in-memory database, or fork db state from a remote node.\n- `Snapshot`: dump the current state of the EVM to json for future use in pre-populating EVM storage\n- `ABI`: parse compiled Solidity json files or define a specific set of functions using `human-readable` notation\n- `Contract`: high-level, user-friendy Python API\n\n## Build from source\n- You need `Rust` and `Python`, and optionally `Make`. We use `hatch` for Python project management, but it's not required\n- Create a local Python virtual environment. Within that environment install Python dependencies\n- Run `make build` or `hatch run maturin develop`\n- See `simular/` for the main python api\n\n## Getting Started\nSee [Simular Documentation](https://simular.readthedocs.io/en/latest/) for examples and API details.\n\n## Standing on the shoulders of giants...\nThanks to the following projects for making this work possible!\n- [pyO3](https://github.com/PyO3)\n- [revm](https://github.com/bluealloy/revm)\n- [alloy-rs](https://github.com/alloy-rs)\n- [eth_utils/eth_abi](https://eth-utils.readthedocs.io/en/stable/) \n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "smart-contract api and embedded ethereum virtual machine",
"version": "0.2.2",
"project_urls": {
"Documentation": "https://simular-fi.github.io/simular",
"Homepage": "https://github.com/simular-fi/simular",
"Issues": "https://github.com/simular-fi/simular/issues",
"Source": "https://github.com/simular-fi/simular"
},
"split_keywords": [
"agent-based modeling",
" ethereum",
" solidity",
" simulation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "67e5dfc7f7bbbd7da307c42e71366e6ca227abfa77cadfad012e7feb6342fdf2",
"md5": "01f08f531833539a376a4661b2b9df73",
"sha256": "63918e592dbf16505efb5141fa1b2808ccf1a00778a7d361f53b59034795b4cd"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp311-cp311-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "01f08f531833539a376a4661b2b9df73",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 2969899,
"upload_time": "2024-04-05T13:31:47",
"upload_time_iso_8601": "2024-04-05T13:31:47.643371Z",
"url": "https://files.pythonhosted.org/packages/67/e5/dfc7f7bbbd7da307c42e71366e6ca227abfa77cadfad012e7feb6342fdf2/simular_evm-0.2.2-cp311-cp311-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d038e1ef1dc8b80e18fa19c7df4b45551eeee688564005639a676fedc36fd6f3",
"md5": "3ad8ecc776b2f7e42ec1cb8c21b96924",
"sha256": "527390c6cead24975106c9cf03867b97d250155167234ecbc9e50ea010373069"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp311-cp311-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "3ad8ecc776b2f7e42ec1cb8c21b96924",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 2842314,
"upload_time": "2024-04-05T13:31:50",
"upload_time_iso_8601": "2024-04-05T13:31:50.028751Z",
"url": "https://files.pythonhosted.org/packages/d0/38/e1ef1dc8b80e18fa19c7df4b45551eeee688564005639a676fedc36fd6f3/simular_evm-0.2.2-cp311-cp311-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8b42dee2e888a3fe2072d65e1670b36402278b732fa17eb50030a452c2acd0eb",
"md5": "387295f0a3b57cd39bfd9e6a7936f45b",
"sha256": "91a15852005711f00d20896ca0c7e7ecff907ad0726fc90faebe933b9cd6c8d0"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl",
"has_sig": false,
"md5_digest": "387295f0a3b57cd39bfd9e6a7936f45b",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 6399465,
"upload_time": "2024-04-05T13:31:51",
"upload_time_iso_8601": "2024-04-05T13:31:51.478907Z",
"url": "https://files.pythonhosted.org/packages/8b/42/dee2e888a3fe2072d65e1670b36402278b732fa17eb50030a452c2acd0eb/simular_evm-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0e92f1dc2abf3f3aa8e1a98f86dfaa0117ec8dd81ffcf812705500032faa08f0",
"md5": "5edf6235730b902b6255ccf687877800",
"sha256": "965683e266c543b33599b56887c6baed0bee96254c5f8033222bc4344582d10c"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp311-cp311-manylinux_2_28_armv7l.whl",
"has_sig": false,
"md5_digest": "5edf6235730b902b6255ccf687877800",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 5857778,
"upload_time": "2024-04-05T13:31:52",
"upload_time_iso_8601": "2024-04-05T13:31:52.969002Z",
"url": "https://files.pythonhosted.org/packages/0e/92/f1dc2abf3f3aa8e1a98f86dfaa0117ec8dd81ffcf812705500032faa08f0/simular_evm-0.2.2-cp311-cp311-manylinux_2_28_armv7l.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c97ce19063dc7438a393479339c2c147375e27f19fedec19fa5de47f65a43aa5",
"md5": "a18489d5de2f7d54298944795f6f2fdb",
"sha256": "e66cf24679b9ad0197bef41aab27ab0f43c42446a1fa2718818d6542ce4a10fc"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "a18489d5de2f7d54298944795f6f2fdb",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 6337393,
"upload_time": "2024-04-05T13:31:55",
"upload_time_iso_8601": "2024-04-05T13:31:55.104499Z",
"url": "https://files.pythonhosted.org/packages/c9/7c/e19063dc7438a393479339c2c147375e27f19fedec19fa5de47f65a43aa5/simular_evm-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "73ef651c8d6d504a9a351ea92659c9f9f4e4ea2051d01d2499d1c410bb041bcf",
"md5": "0f8b40979af9f036ecf231233f01ae5a",
"sha256": "555a87c8a964c3abbfe38eaa07196928f0708a1379b96cda93c6831ef1c203ab"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp311-none-win32.whl",
"has_sig": false,
"md5_digest": "0f8b40979af9f036ecf231233f01ae5a",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 2461618,
"upload_time": "2024-04-05T13:31:57",
"upload_time_iso_8601": "2024-04-05T13:31:57.298938Z",
"url": "https://files.pythonhosted.org/packages/73/ef/651c8d6d504a9a351ea92659c9f9f4e4ea2051d01d2499d1c410bb041bcf/simular_evm-0.2.2-cp311-none-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "62a27f4197ecf216dfbfece8aae23777a484da1821d30fdc1b0419c06fb13890",
"md5": "259bd6c520a0f2c72badda0cfea9ca50",
"sha256": "01fd578b0471aef250d9b8190c30b710f6101faa2f9a86dd641b125085b430a6"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp311-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "259bd6c520a0f2c72badda0cfea9ca50",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 2749834,
"upload_time": "2024-04-05T13:31:59",
"upload_time_iso_8601": "2024-04-05T13:31:59.342576Z",
"url": "https://files.pythonhosted.org/packages/62/a2/7f4197ecf216dfbfece8aae23777a484da1821d30fdc1b0419c06fb13890/simular_evm-0.2.2-cp311-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b1c6be048c6958a87636cb30d74986aa4fe1e0e977638d898cb84af139fd0023",
"md5": "65ffb2024e6be9316e4f86e00d20d962",
"sha256": "dcceaf0b4808d32e1bf39865e7b8b1cef5b8b439bb3769d896e8ae893f00d6ba"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp312-cp312-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "65ffb2024e6be9316e4f86e00d20d962",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 2968917,
"upload_time": "2024-04-05T13:32:00",
"upload_time_iso_8601": "2024-04-05T13:32:00.759121Z",
"url": "https://files.pythonhosted.org/packages/b1/c6/be048c6958a87636cb30d74986aa4fe1e0e977638d898cb84af139fd0023/simular_evm-0.2.2-cp312-cp312-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fffd2b63c1f7c9ceb6ea141f1823dbe4f00de657d720d3d3aa1afd8f655b890c",
"md5": "eb243cc3655a3758e63cd8fc63c5a363",
"sha256": "d8a5b3c7cc80b408c3483efd169e96d1908b02fa15856d33490ca59658a36962"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp312-cp312-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "eb243cc3655a3758e63cd8fc63c5a363",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 2842090,
"upload_time": "2024-04-05T13:32:02",
"upload_time_iso_8601": "2024-04-05T13:32:02.459123Z",
"url": "https://files.pythonhosted.org/packages/ff/fd/2b63c1f7c9ceb6ea141f1823dbe4f00de657d720d3d3aa1afd8f655b890c/simular_evm-0.2.2-cp312-cp312-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3791879c2233e98ce162d9e4572c48ce2757f7b99fdf0700b004dd5f66fc9bc6",
"md5": "6b994b3a2ff3bbc29c03a22dc18200fd",
"sha256": "fcd1136fcd18721502ebfe48bd282ba2da9ffc994cf666dcaea5c10b2bf2cbec"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl",
"has_sig": false,
"md5_digest": "6b994b3a2ff3bbc29c03a22dc18200fd",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 6398687,
"upload_time": "2024-04-05T13:32:03",
"upload_time_iso_8601": "2024-04-05T13:32:03.891083Z",
"url": "https://files.pythonhosted.org/packages/37/91/879c2233e98ce162d9e4572c48ce2757f7b99fdf0700b004dd5f66fc9bc6/simular_evm-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b85614e2e512c5c88e5b577464a7ae1b8fc1240b77594d56b3253a413d8d54a8",
"md5": "332ff824483075deacc5be18fc7fc259",
"sha256": "8d85bf8f4aae4d54ecdd80589cadc575eab7e6d32510ba239089d26170ce4e4a"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp312-cp312-manylinux_2_28_armv7l.whl",
"has_sig": false,
"md5_digest": "332ff824483075deacc5be18fc7fc259",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 5856528,
"upload_time": "2024-04-05T13:32:05",
"upload_time_iso_8601": "2024-04-05T13:32:05.378113Z",
"url": "https://files.pythonhosted.org/packages/b8/56/14e2e512c5c88e5b577464a7ae1b8fc1240b77594d56b3253a413d8d54a8/simular_evm-0.2.2-cp312-cp312-manylinux_2_28_armv7l.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3bea3a1df41afb18a74d82799799c51fca73e5e56f241973a0606f9b50cd49d7",
"md5": "6ce92dba6c7696a3755af001ddcc5689",
"sha256": "a46c6ead7dae23ebb8f24e704184029b6cba284c637cd244b096a133c8c51eb3"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "6ce92dba6c7696a3755af001ddcc5689",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 6335547,
"upload_time": "2024-04-05T13:32:07",
"upload_time_iso_8601": "2024-04-05T13:32:07.418821Z",
"url": "https://files.pythonhosted.org/packages/3b/ea/3a1df41afb18a74d82799799c51fca73e5e56f241973a0606f9b50cd49d7/simular_evm-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "916f08ceb0e079f47e25ad8d391cc9072a4853dbe5e981613b91b51e772fb9c0",
"md5": "80eca8212db6553a0d67a6eb32b82109",
"sha256": "2c21e135b72346f62fb4aaf05e41025621f5fa963daa17799720dabb28edf396"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp312-none-win32.whl",
"has_sig": false,
"md5_digest": "80eca8212db6553a0d67a6eb32b82109",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 2462760,
"upload_time": "2024-04-05T13:32:08",
"upload_time_iso_8601": "2024-04-05T13:32:08.880087Z",
"url": "https://files.pythonhosted.org/packages/91/6f/08ceb0e079f47e25ad8d391cc9072a4853dbe5e981613b91b51e772fb9c0/simular_evm-0.2.2-cp312-none-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fda57b277d5712ec4dea505ae7837fafb8e465112d5591ecc6546159874b01d4",
"md5": "47bbcda5594bbff7c1e2600fd0c31968",
"sha256": "df7cad0465526a3ea1dbafa3ed67474f4552589f40f181915a91d74910282bef"
},
"downloads": -1,
"filename": "simular_evm-0.2.2-cp312-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "47bbcda5594bbff7c1e2600fd0c31968",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 2751240,
"upload_time": "2024-04-05T13:32:10",
"upload_time_iso_8601": "2024-04-05T13:32:10.857689Z",
"url": "https://files.pythonhosted.org/packages/fd/a5/7b277d5712ec4dea505ae7837fafb8e465112d5591ecc6546159874b01d4/simular_evm-0.2.2-cp312-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "755ddf119f8971d4ec67247aabf6683594568b70541de7b6f76ca8ae87f9899d",
"md5": "2b1c1aa1de464eb95cbd9dab0ddb4ec5",
"sha256": "a4ec579c3cabd81f0868ab9814ec1a29e446a98cf31e1e579aa5b342e72ec74a"
},
"downloads": -1,
"filename": "simular_evm-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "2b1c1aa1de464eb95cbd9dab0ddb4ec5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 51500,
"upload_time": "2024-04-05T13:32:12",
"upload_time_iso_8601": "2024-04-05T13:32:12.762218Z",
"url": "https://files.pythonhosted.org/packages/75/5d/df119f8971d4ec67247aabf6683594568b70541de7b6f76ca8ae87f9899d/simular_evm-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-05 13:32:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "simular-fi",
"github_project": "simular",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "simular-evm"
}