0

when deploying the contract

it gives me

<function deploy_simple_storage at 0x0000021D6E255670>

What does that mean?

Deploy.py

from brownie import accounts,config,SimpleStorage


def deploy_simple_storage():
 ##local ganache -cli
 account=accounts[0]

 simple_storage=SimpleStorage.deploy({"from":account})
 stored_value=simple_storage.retrieve()
 print(stored_value)




def main():
 print(deploy_simple_storage)

Terminal after using brownie run scripts/deploy.py

INFO: Could not find files for the given pattern(s).
Brownie v1.19.3 - Python development framework for Ethereum

BrownieWeb3Project is the active project.

Launching 'ganache-cli.cmd --chain.vmErrorsOnRPCResponse true --server.port 8545 --miner.blockGasLimit 12000000 --wallet.totalAccounts 10 --hardfork istanbul --wallet.mnemonic brownie'...

Running 'scripts\deploy.py::main'...
<function deploy_simple_storage at 0x0000021D6E255670>
Terminating local RPC client...

1 Answer 1

0

You are not actually calling the python function. Instead, you are printing out the function signature.

Simply change to

def main():
 deploy_simple_storage()

There is no reason to put a print around the function since it does not return anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.