Saravanan666/pypi-org huggingface dataset:
Package: ethsential
EthSential - Security analysis for Ethereum smart contractsEthSential is a security analysis framework for Ethereum smart contracts. It bundles security analysis tools to find vulnerabilities in smart contracts code.FeaturesA system that uses analysis tools based on Docker images.Provides two types of interfaces for the command-line interface and language server protocol (lsp).Normalize the output of the tools in a single file or lsp response.Supported ToolsMythrilSecurifySlitherPrerequisitesEthSential requiresDockerandPython3to be installed in the system.InstallInstall from Pypi:$pipinstallethsentialUsageRunethsent -hto get more information:Usage: solhint [actions] [options] <file>

Actions:

  tcp                                                Use TCP server
  cli                                                Use command line interface
  install, i, isntall, add                           Install tools

tcp optional arguments:
  -h, --help                                         show this help message and exit
  --host HOST                                        Bind to address (default=127.0.0.1)
  -p, --port PORT                                    Bind to port (default=2087)

cli arguments:
  -h, --help                                         show this help message and exit
  -f, --file FILE [FILE ...]                         select file(s) or directories to be analysed
  -t, --tools [{all,mythril,securify,slither} ...]   select tool(s)
  -op, --outputPath                                  The full path for the new output directory, relative to the current workspace. (default=result/).IDE IntegrationsVS CodeHow to contributePlease readCONTRIBUTING.mdfor details about how to proceed.Everyone interacting in Ethsential and its sub-projects' codebases and issue trackers, is expected to follow the Contributor Covenantcode of conduct.LicenseThis project is licensed under the Apache-2.0 license - see theLICENSE.mdfile for details.
Package: eth-stdlib
The Ethereum Standard LibraryThe Ethereum Standard Library is a collection of libraries for developers building on the EVM.InstallationUsing pip$pipinstalleth-stdlibUsing poetry$poetryaddeth-stdlibDevelopmentInitializing an EnvironmentTo start developing/contributing to the eth-stdlib code base follow these steps:Installpoetry$pipxinstallpoetryClone the eth-stdlib repository$gitclonehttps://github.com/skellet0r/eth-stdlib.gitInitialize virtual environment$poetryinstall--syncAfterwards the development environment will be complete.TestingTo run the test suite, execute the following command:$poetryrunpytestAfter running the test suite, code coverage results will be displayed in the terminal, as well as exported in html format (in thehtmlcovdirectory).
Package: eth-tester-rpc
A rewrite ofPiper Merriam’s
eth-testrpcusingeth-testerTheeth-teste-rpcis a tool for testing any code that needs to make
calls to ethereums RPC API. It starts a server to which you can connect
your application and run tests accordingly.It is built on top ofpy-evm.Quickstartpipinstalleth-tester-rpcTo check usage of the command:$py-testrpc--helpOptions:-h,--hostTEXT-p,--portINTEGER--helpShowthismessageandexit.To start the server:py-testrpc-p8888The above command will start a server at port 8888. The default port is
8545.To make a connection using web3.pyfromweb3importWeb3w3=Web3(Web3.HTTPProvider("http://localhost:8888"))print(w3.eth.blockNumber)Developer SetupIf you would like to hack on eth-tester-rpc, please check out theEthereum Development Tactical
Manualfor information on how we do:TestingPull RequestsCode StyleDocumentationDevelopment Environment SetupYou can set up your dev environment with:gitclonegit@github.com:voith/eth-tester-rpc.gitcdeth-tester-rpcvirtualenv-ppython3venv.venv/bin/activatepipinstall-e.[dev]Testing SetupDuring development, you might like to have tests run on every file save.Show flake8 errors on file change:# Test flake8when-changed-v-s-r-1eth_tester_rpc/tests/-c"clear; flake8 eth_tester_rpc tests && echo 'flake8 success' || echo 'error'"Run multi-process tests in one command, but without color:# in the project root:pytest--numprocesses=4--looponfail--maxfail=1# the same thing, succinctly:pytest-n4-f--maxfail=1Run in one thread, with color and desktop notifications:cdvenvptw--onfail"notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on eth_tester_rpc failed'"../tests../eth_tester_rpcRelease setupFor Debian-like systems:apt install pandocTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for
stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable
(stagecan be alpha or beta).To issue the next version in line, specify which part to bump, likemake release bump=minorormake release bump=devnum.If you are in a beta version,make release bump=stagewill switch to
a stable.To issue an unstable version when the current version is stable, specify
the new version explicitly, likemake releasebump="--new-version4.0.0-alpha.1devnum"
Package: ethtoken
This is a tiny library leveraging web3.py to make an interface for
working withEIP20tokens on Ethereum. (formerly ERC20)It is currently in Alpha, with 0 automated testsUsageInstallvirtualenv-ppython3venv.venv/bin/activatepipinstall--preethtokenInitializefromethtokenimporttoken# Use the ENS name that points to your token contract here:omg=token("omg.thetoken.eth")Use standard EIP20 methodsMost EIP20 methods are optional.ethtokenmakes no attempt to verify
which methods are implemented by a token contract.Here’s an example with all the read functions working:>>>omg.name()'OMGToken'>>>omg.symbol()'OMG'>>>omg.decimals()18>>>omg.totalSupply()140245398245132780789239631# Use the ENS name of the owner address here:>>>omg.balanceOf('ethereumfoundation.eth')308744633639977714804Custom methodsethtokenhas a single custom method not in the EIP20 spec:token_balance.>>>omg.token_balance("ethereumfoundation.eth")Decimal('308.744633639977714804')It returns the balance of an address, with the decimal point shifted
according to thedecimals()value on the contract. In other words,
it is the human-readable number of tokens that the given address owns.Completely Untested: TransfersIn theory, you could use this to send a token. I haven’t even tried it
once yet. Just don’t use it. If you’re going to ignore me, don’t blame
me if you lose tokens or ether.This should theoretically transfer 1 giga units from 0x0 to 0xdead.
(That’s 1 nanotoken, at 18 decimals). Of course, this won’t work if you
don’t control the 0x0 address. (hint: you don’t)fromweb3importWeb3>>>omg.transfer('0x000000000000000000000000000000000000dEaD',10**9,transact={'from':'0x0000000000000000000000000000000000000000','gasPrice':Web3.toWei('0.1','gwei'),},)Ownership DisclosureI own some OmiseGo tokens, because anyone who had some ether during
their airdrop got some. I don’t have any opinions on the company or
token.
Package: ethtools-py-evm
Python Implementation of the Ethereum protocolPy-EVMPy-EVM is an implementation of the Ethereum protocol in Python. It contains the low level
primitives for the existing Ethereum 1.0 chain as well as emerging support for the upcoming
Ethereum 2.0 / Serenity spec.GoalsPy-EVM aims to eventually become the defacto Python implementation of the Ethereum protocol,
enabling a wide array of use cases for both public and private chains.In particular Py-EVM aims to:be a reference implementation of the Ethereum 1.0 and 2.0 implementation in one of the most widely used and understood languages, Python.be easy to understand and modifiablehave clear and simple APIscome with solid, friendly documentationdeliver the low level primitives to build various clients on top (includingfullandlightclients)be highly flexible to support both research as well as alternate use cases like private chains.QuickstartGet started in 5 minutesDocumentationCheck out thedocumentation on our official websiteWant to help?Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
guidelines forcontributingand then check out one of our issues that are labeledGood First Issue.
Package: eth-transfer
eth_transferEasily send transactions on the Ethereum blockchain and fine tune gas parameters.MotivationTheWeb3.pypython library, Alchemy API, and a slew of other projects provide easy ways to send transactions (exchange of value between addresses). However, there is often a lot of guess work that goes into selecting the values affecting the total gas fee, such as the max priority fee per gas, the max fee per gas, and the maximum amount of gas the user is willing to be consumed for the transaction to succeed. The Etherum network can become very busy at certain times (i.e. days following the FTX bankruptcy) and thus gas fees become very large. User controls on gas on applications such as MetaMask are basic, and give vaugue time estimates when trying to save on gas fees.This package intends to provide an easy to use and customizable object oriented way to send transactions that minimize gas fees according to your needs.How to useThe use of this package requires you are able to connect to the Etherum blockchain using web3.py and also have an Etherscan account from which you can create an API key. Access to PRO Etherscan endpoints isnotneeeded.Installing web3If you do not have the web3 package installed in your environment or virtual environment, follow the quickstarthere.If you do not have an Etherscan account, create one as well as an API key by following the Getting Started stepshere.QuickstartYou can install theeth_transferpackage via pippip3 install eth_transferSending a TransactionAfter you have installed the package, create aWeb3instance using either a local or remote provider. Below, we use the Remote provider Infura.io as an example.w3=Web3(Web3.HTTPProvider("https://mainnet.infura.io/v3/YOUR_PROJECT_ID"))Instantiate an instance of theTxclassaddress_1=SENDING_ADDRESSaddress_2=RECEIVING_ADDRESStransaction=Tx(w3,address_1,address_2,'0.100 ether','55 gwei','1 gwei')Now, send the transactiontransaction.send_transaction()Tracking Gas PricesInstantiate an instance of theGasTrackerclass. This can be done
one of two ways. Both ways are shown belowFrom variable with string of your API keyetherscan_key=YOUR_ETHERSCAN_KEYgastracker=GasTracker.from_key(etherscan_key)From env with your API Keyfpath=FILEPATH_TO_ENV_WITH_API_KEY# e.g. '/Users/DeadBeef/Desktop/etherscan.env'key_name=ENV_API_KEY_NAME# e.g. 'API_KEY'gastracker=GasTracker.from_env(fpath,key_name)Confirmation Times vs. Fee Per Gasgas_limit=50000# Note: minimum is 21,000gastracker.plot_gas_price_confirmation_time(gas_limit)Sending a slow transactionSometimes, you can wait for a transaction to be confirmed! If so, you might as well save ETH on it being confirmed. Note, the maximum fee per gas you are willing to pay must exceed the current base fee. This is taken care of for you.gastracker.get_safe_gas_price()
Package: eth-typing
eth-typingCommon type annotations for ethereum python packages.Read more in thedocumentation on ReadTheDocs.View the change log.Quickstartpython-mpipinstalleth-typingDeveloper SetupIf you would like to hack on eth-typing, please check out theSnake Charmers
Tactical Manualfor information on how we do:TestingPull RequestsDocumentationWe usepre-committo maintain consistent code style. Once
installed, it will run automatically with every commit. You can also run it manually
withmake lint. If you need to make a commit that skips thepre-commitchecks, you
can do so withgit commit --no-verify.Development Environment SetupYou can set up your dev environment with:gitclonegit@github.com:ethereum/eth-typing.gitcdeth-typing
virtualenv-ppython3venv
.venv/bin/activate
python-mpipinstall-e".[dev]"pre-commitinstallNetwork ChainIdsA list ofChainIdconstants reside in the eth-typing/networks.py file. This list should be kept
in sync with the network list available onchainid.network.To keep the list up to date, run the following command:pythonupdate_network_chain_ids.pyThis will remove the original networks file and output a new file with the new networks added.Check that the output file is correct and that constants are defined as expected. If
the shortName contains special characters it may not work as a constant variable name.
The script should be updated to transform names into valid constants as new cases occur.Release setupTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable (stagecan be alpha or beta).To issue the next version in line, specify which part to bump,
likemake release bump=minorormake release bump=devnum. This is typically done from the
main branch, except when releasing a beta (in which case the beta is released from main,
and the previous stable branch is released from said branch).If you are in a beta version,make release bump=stagewill switch to a stable.To issue an unstable version when the current version is stable, specify the
new version explicitly, likemake release bump="--new-version 4.0.0-alpha.1 devnum"
Package: eth-uniswap
eth-uniswapeth-uniswap is a python wrapper built ontop theweb3pylibrary to interact withUniswapsolidity contracts on a public or private ethereum blockchain.The library defines a python function for each function defined by the solidity contracts in python, adding type hints for the arguments and return values. This makes it easier to call the contracts' function by enabling IDE features such as auto-completion.InstallationYou can install theeth-uniswappackage using pip:python -m pip install eth-uniswapGetting startedHere is how to deploy and use theUniswap-V2 Factory solidity contractusing this library:# First, you need a connection to an ethereum node.# Here, we are using a local node created with ganache-cli for instance.fromweb3importWeb3,HTTPProviderurl="http://127.0.0.1:8545"w3=Web3(HTTPProvider(url))# We can deploy the factory as follows:frometh_uniswap.v2.coreimportUniswapV2Factoryreceipt=UniswapV2Factory.deploy(w3,my_address).waitForReceipt()factory=receipt.contract# Alternatively, we can connect to a deployed instance:factory_address='0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f'factory=UniswapV2Factory(w3,address=factory_address)# All the functions defined by the solidity contract are available.# For instance, here is how to make an eth-call on the allPairsLength function:nb_pairs=factory.functions.allPairsLength().call()print("This many pairs have been deployed', nb_pairs)# Here is how to send a transaction to the createPair functiontoken1='0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'token2='0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'receipt=factory.functions.createPair(token1,token2).waitForReceipt()DocumentationFor each solidity contract defined by Uniswap, this package contains a python class with the same name and its methods also have the same name as the solidity one. This makes it easy to find the class and method you are looking for. Refer to Uniswap documentation to learn how to interact with the contracts.Uniswap documentationSolidity contracts for Uniswap v2 coreSolidity contracts for Uniswap v2 periphery
Package: eth-utils
Ethereum UtilitiesCommon utility functions for python code that interacts with EthereumRead more in thedocumentation on ReadTheDocs.View the change log.Quickstartpython-mpipinstalleth-utilsDeveloper SetupIf you would like to hack on eth-utils, please check out theSnake Charmers
Tactical Manualfor information on how we do:TestingPull RequestsDocumentationWe usepre-committo maintain consistent code style. Once
installed, it will run automatically with every commit. You can also run it manually
withmake lint. If you need to make a commit that skips thepre-commitchecks, you
can do so withgit commit --no-verify.Development Environment SetupYou can set up your dev environment with:gitclonegit@github.com:ethereum/eth-utils.gitcdeth-utils
virtualenv-ppython3venv
.venv/bin/activate
python-mpipinstall-e".[dev]"pre-commitinstallUpdate NetworksThe list of networks resides in the JSON file under eth_utils/__json/eth_networks.json.
This file is used to initialize Networks, which can be used to obtain network
information with a chain ID.Run the script to update the JSON file with the response from the remote list.pythonupdate_networks.pyIf there are new networks they will appear in the JSON file. After checking the updates,
open a PR to make them available in a new release.Release setupTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable (stagecan be alpha or beta).To issue the next version in line, specify which part to bump,
likemake release bump=minorormake release bump=devnum. This is typically done from the
main branch, except when releasing a beta (in which case the beta is released from main,
and the previous stable branch is released from said branch).If you are in a beta version,make release bump=stagewill switch to a stable.To issue an unstable version when the current version is stable, specify the
new version explicitly, likemake release bump="--new-version 4.0.0-alpha.1 devnum"
Package: eth-utils-qtum
Ethereum UtilsDocumentation hosted by ReadTheDocsCommon utility functions for codebases which interact with ethereum.This library and repository was previously located athttps://github.com/pipermerriam/ethereum-utils.  It was transferred to the Ethereum foundation github in November 2017 and renamed toeth-utils.  The PyPi package was also renamed fromethereum-utilstoeth-utils.Installationpipinstalleth-utils-qtumDevelopmentClone the repository and then run:pipinstall-e.[dev]eth-hash-qtum[pycryptodomex]DocumentationBuilding Sphinx docs locally:pipinstall-e.[doc]cddocs
makehtmlDocs are written inreStructuredTextand built using theSphinxdocumentation generator.Running the testsYou can run the tests with:py.testtestsOr you can installtoxto run the full test suite.ReleasingPandoc is required for transforming the markdown README to the proper format to
render correctly on pypi.For Debian-like systems:apt install pandocOr on OSX:brewinstallpandocTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$To preview the upcoming release notes:towncrier--draftHow to bumpversionThe version format for this repo is{major}.{minor}.{patch}for stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable (stagecan be alpha or beta).To issue the next version in line, specify which part to bump,
likemake release bump=minorormake release bump=devnum.If you are in a beta version,make release bump=stagewill switch to a stable.To issue an unstable version when the current version is stable, specify the
new version explicitly, likemake release bump="--new-version 4.0.0-alpha.1 devnum"
Package: eth-validation
Python tools for validating Ethereum-related objectsPython 3.5+ supportRead more in thedocumentation on
ReadTheDocs.View the change
log on Github.Quickstartpipinstalleth-validationDeveloper setupIf you would like to hack on eth-validation, set up your dev environment
with:gitclonegit@github.com:ethereum/eth-validation.gitcdeth-validationvirtualenv-ppython3venv.venv/bin/activatepipinstall-e.[dev]Testing SetupDuring development, you might like to have tests run on every file save.Show flake8 errors on file change:# Test flake8when-changed-v-s-r-1eth_validation/tests/-c"clear; flake8 eth_validation tests && echo 'flake8 success' || echo 'error'"Run multi-process tests in one command, but without color:# in the project root:pytest--numprocesses=4--looponfail--maxfail=1# the same thing, succinctly:pytest-n4-f--maxfail=1Run in one thread, with color and desktop notifications:cdvenvptw--onfail"notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on eth-validation failed'"../tests../eth_validationRelease setupFor Debian-like systems:apt install pandocTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for
stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable
(stagecan be alpha or beta).To issue the next version in line, specify which part to bump, likemake release bump=minorormake release bump=devnum.If you are in a beta version,make release bump=stagewill switch to
a stable.To issue an unstable version when the current version is stable, specify
the new version explicitly, likemake releasebump="--new-version4.0.0-alpha.1devnum"
Package: eth-vertigo
vertigoVertigo is a mutation testing framework designed to work specifically for smart contracts.
This mutation testing framework implements a range of mutation operators that are either selected from previous works or tailored to solidity.Quick Start GuideTo install vertigo, execute the following command:pip3install--usereth-vertigoYou can now run vertigo on a truffle project with the following command (assuming you have adevelopmentnetwork configured in yourtruffle-config.js):vertigorun--networkdevelopmentDepending on your environment it might be required to specify the location of the truffle executable:vertigorun--networkdevelopment--truffle-location<node_dir>/bin/truffleThere are a few additional parameters available that allow you to tweak the execution of vertigo:$pythonvertigo.pyrun--help
Usage:vertigo.pyrun[OPTIONS]Performsacoretestcampaign

Options:--outputTEXTOutputcoretestresultstofile--networkTEXTNetworknamesthatvertigocanuse--rulesTEXTUniversalMutatorstylerulestouseinmutationtesting--truffle-locationTEXTLocationoftrufflecli--sample-ratioFLOATIfthisoptionisset.Vertigowillapplythesamplefilterwiththegivenratio--excludeTEXTVertigowon'tmutatefilesinthesedirectories--helpShowthismessageandexit.Known IssuesGanacheis generally used only for a single run of the entire test suite.
For the general use case, it does not matter if Ganache creates a few thousand files.
Unfortunately, once you start executing the entire test suite hundreds of times, you can end up with millions of files, and your machine could run out of free inode's.
You can check whether this happens to you by running:df -iThis issue (#1) is known, and we're working on a fix.In the meanwhile. If your test suite is large enough to munch all your inodes, then there are two options:You can use the command line option--sample-ratioto select a random subsample of the mutations (reducing the number of times that the test suite is run)You can create a partition that has a sufficient amount of inodes availablePublications and ArticlesPractical Mutation Testing for Smart Contracts- Joran J. Honig, Maarten H. Everts, Marieke HuismanIntroduction into Mutation Testing- Joran HonigMutation Testing for Smart Contracts - A step by step guide- Joran HonigIf you want to cite vertigo, please use the following:@InProceedings{10.1007/978-3-030-31500-9_19,
author="Honig, Joran J.
and Everts, Maarten H.
and Huisman, Marieke",
title="Practical Mutation Testing for Smart Contracts",
booktitle="Data Privacy Management, Cryptocurrencies and Blockchain Technology",
year="2019",
publisher="Springer International Publishing",
pages="289--303"
}
Package: eth-wake-tests
Tests for WakeThis Python package implements ready-to-use Python tests for the most common ERC standards. See the list of implemented tests below.DependenciesPython (version 3.8 or higher)Wake (version 4.3.2 or higher)InstallationThe installation is simple. Just run the following command:pip3installeth-wake-testsThis will also installeth-wakein case you don't have it installed already.Test SuitesTest suites implement two types of tests:unit testsandfuzz tests. Unit tests are used to test individual functions and methods. Fuzz tests are used to test functions with random inputs. Fuzz tests are useful for finding bugs in functions that are not covered by unit tests.ERC-20ERC-20 tests are fully implemented. Test suites are inspired byRuntime Verification's ERC-20 tests. A comprehensive example of how to use the test suite as well as the comprehensive documentation can be found inexamples/erc20.Other StandardsMore standards (ERC-721, ERC-1155, etc.) are coming soon.