0

PS E:\ERC20-BROWNIE> brownie run scripts/1_deploy_token.py --network rinkeby INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum

Erc20BrownieProject is the active project.

File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie_cli\run.py", line 49, in main return_value, frame = run( File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\project\scripts.py", line 103, in run return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\1_deploy_token.py", line 12, in main my_token = MyToken.deploy(initial_supply, {"from": account}) File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\network\contract.py", line 595, in call raise AttributeError( AttributeError: Final argument must be a dict of transaction parameters that includes a from field specifying the address to deploy from
PS E:\ERC20-BROWNIE> brownie run scripts/1_deploy_token.py --network rinkeby INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum

Erc20BrownieProject is the active project.

File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie_cli\run.py", line 49, in main return_value, frame = run( File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\project\scripts.py", line 103, in run return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\1_deploy_token.py", line 12, in main my_token = MyToken.deploy(initial_supply, {"from": account}) File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\network\contract.py", line 595, in call raise AttributeError( AttributeError: Final argument must be a dict of transaction parameters that includes a from field specifying the address to deploy from
PS E:\ERC20-BROWNIE> brownie run scripts/1_deploy_token.py --network rinkeby INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum

Erc20BrownieProject is the active project.

Running 'scripts\1_deploy_token.py::main'... File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie_cli\run.py", line 49, in main return_value, frame = run( File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\project\scripts.py", line 103, in run return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\1_deploy_token.py", line 12, in main my_token = MyToken.deploy(initial_supply, {"from": account}) File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\network\contract.py", line 595, in call raise AttributeError( AttributeError: Final argument must be a dict of transaction parameters that includes a from field specifying the address to deploy from
PS E:\ERC20-BROWNIE>

3 Answers 3

1

If you modify get_account() function like this, then it works.

enter image description here

3

here is another solution: you can leave your get_account() as is. instead of commenting out the two lines like Ganesh's solution, you can add the rinkeby network in your yaml file.

This is because if network.show_active() in config["networks"]: is looking for "networks" in your brownie-config.yaml file.

if you add the rinkeby network there with some property, it will work.

for example,

networks:
  rinkeby:
    verify: True

my brownie-config.yaml:

dependencies:
  - OpenZeppelin/[email protected]
compiler:
  solc:
    remappings:
      - "@openzeppelin=OpenZeppelin/[email protected]"
dotenv: .env
networks:
  rinkeby:
    verify: True
wallets:
  from_key: ${PRIVATE_KEY}
0

You should post your source code and the main error, not the whole console output without source code. That being said, the error:

AttributeError: Final argument must be a dict of transaction parameters that includes a from field specifying the sender of the transaction

is received when you are making a transaction without specifying the last dictionary argument which must contain the "from" field. Every transaction must have it.

SimpleStorage.deploy({"from": account}) # it's ok
SimpleStorage.deploy() # will fail with above error

Your Answer

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

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