Skip to content

Write a smart contract using a private key in [u8; 32] format #682

@dnnagy

Description

@dnnagy

Suppose I have a private key [u8; 32], what is the correct way to call a contract function and sign the transaction with the private key using http transport?

I tried to use Personal but keep running in the following error:

error[E0599]: no function or associated item named `new` found for struct `Personal` in the current scope
   --> src/main.rs:129:37
    |
129 |     let account = Personal::<Http>::new();
    |                                     ^^^ function or associated item not found in `Personal<Http>`
    |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions