Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.
This repository was archived by the owner on May 19, 2022. It is now read-only.

Deploying a contract #21

@BoboTiG

Description

@BoboTiG

Hello,

I am trying to deploy a contract, here a is sample code:

from web3 import Web3

web3 = Web3(Web3.HTTPProvider("http://127.0.0.1:9650/ext/bc/C/rpc"))
contract = web3.eth.contract(abi=abi, bytecode=bytecode)
hash = contract.constructor().transact({"from": "0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC"})

It fails on:

ValueError: {'code': -32000, 'message': 'unknown account'}

In fact, the eth_accounts RPC endpoint returns an empty list.

I tried to import the private key, but : 'the method personal_importRawKey does not exist/is not available.
I also succeeded to use keystore.createUser followed by avax.importKey, but no more success to fill eth_accounts.

I think I am not doing the right things.

Do you have any clue 🙏 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions