Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "code",
"source": [
"w3 = Web3(EthereumTesterProvider())\n",
"w3.eth.default_account = w3.eth.accounts[0]\n",
"\n",
"abi = contract_interface['abi']\n",
"\n",
"bytecode = contract_interface['bin']\n",
"\n",
"HelloWorld = w3.eth.contract(abi = abi, bytecode = bytecode)\n",
"\n",
"print(HelloWorld)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "ZyrYJUPIOQXZ",
"outputId": "0b1960ce-20c5-42dc-ea30-530c8e03a884"
},
"execution_count": 23,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<class 'web3._utils.datatypes.Contract'>\n"
]
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"/usr/local/lib/python3.7/dist-packages/eth_tester/backends/__init__.py:31: UserWarning: Ethereum Tester: No backend was explicitly set, and no *full* backends were available. Falling back to the `MockBackend` which does not support all EVM functionality. Please refer to the `eth-tester` documentation for information on what backends are available and how to set them. Your py-evm package may need to be updated.\n",
" \"Ethereum Tester: No backend was explicitly set, and no *full* \"\n"
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment