1

I want to use an account to make some transactions at the same time. So I need to unlock this account each time when I send transaction. But because it sends at the same time, it may happens that only some transactions are unlocked, the others are not...

So I think I need to unlock all accounts. Or unlock an account forever. Is there any way that I can do it?

I find that there is a config --unlock can unlock some accounts when Parity start. But my accounts are increasing. So it's not useful for me...

Can you give me some advice about it? Thanks a lot~

2

Just create a config file with:

[account]
unlock = ["0x000000000000000000000000000000000000dead","0x0000000000000000000000000000000000000000beef","0x0000000000000000000000000000000000000000cafe"]
password = ["path/to/password.file"]

This will keep all listed accounts unlocked with the password specified in the password.file.

0

Account can be unlocked by using personal_unlockAccount module of JSON_RPC. It unlocks specified account for use.

personal_unlockAccount

Unlocks specified account for use.

If permanent unlocking is disabled (the default) then the duration argument will be ignored, and the account will be unlocked for a single signing. With permanent locking enabled, the duration sets the number of seconds to hold the account open for. It will default to 300 seconds. Passing 0 unlocks the account indefinitely.

There can only be one unlocked account at a time.

Parameters

  1. Address - 20 Bytes - The address of the account to unlock.
  2. String - Passphrase to unlock the account.
  3. Quantity - (default: 300) Integer or null - Duration in seconds how long the account should remain unlocked for.

params: [ "0x8f0227d45853a50eefd48dd4fec25d5b3fd2295e", "hunter2", null ]

Returns

  • Boolean - whether the call was successful

Example:

Request

curl --data '{"method":"personal_unlockAccount","params":["0x8f0227d45853a50eefd48dd4fec25d5b3fd2295e","hunter2",null],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

Response

{ "id": 1, "jsonrpc": "2.0", "result": true }

Source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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