Skip to main content

Questions tagged [accountid]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
31 views

How to Convert String Address to Substrate AccountId in Runtime for Storage Map?

I am working on a Substrate runtime and would like to convert a string representation of an address, such as "5HYKElof8yaKoyCX9L...GHii4BkrgvKymz34W", into a Substrate AccountId so that I ...
sntrk's user avatar
  • 11
1 vote
1 answer
43 views

Set Off-chain worker with AccountId20

The examples in substrate use the sr25519 AccountId and Multisignature for creating offchain workers with signed transactions. Is there a way to use AccountId20 and EthereumSignature for a node using ...
Discardo's user avatar
  • 436
2 votes
0 answers
31 views

How to convert AccountId from [hexadecimal, SS58Check]?[Updated]

I have two 2 storage in the pallet : #[pallet::storage] #[pallet::getter(fn subscriber)] pub type Subscriber<T:Config> = StorageValue<_, BoundedVec<T::AccountId, T::...
Deepak Chaudhary's user avatar
0 votes
0 answers
58 views

How to convert `AccountId` to `AuthorityId`

699 | acc_vec.push((account_id, userInfo.weight.saturated_into::<u64>())); | ^^^^^^^^^^ expected `Public`, found associated type | ...
MinhK's user avatar
  • 125
1 vote
1 answer
49 views

AssetHub interaction with AccountId20

Say I want to send and receive tokens from AssetHub in my chain that is using AccountId20 format to interact with internal pallets. I understand that Rococo uses AccountId32 so how would I go about ...
Valentin Fernandez's user avatar
0 votes
1 answer
82 views

How to fund AccountId32?

I want to deliver some test where in part of the task is to create accounts and deposit them. I do it in the code below: let account_id_bytes: [u8; 32] = [0u8; 32]; let account_id_1: AccountId32 = ...
Tomasz Waszczyk's user avatar
1 vote
1 answer
123 views

Customizing AccountId

In my runtime I'm using pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;. Within my pallet I also need this type to implement From<SomeType>. I ...
magecnion's user avatar
  • 244
3 votes
1 answer
109 views

Will we be able to use the BLS signature scheme to control funds?

After reading through the BLS related issues in the substrate repo, it isn't quite clear to me what type of support is planned for the BLS signature scheme. It seems like the primary goal is to ...
user2959071's user avatar
1 vote
2 answers
15 views

What is the purpose of the `contracts_runtime.scale` file in the `cargo-contracts` repository?

Cargo Contract is a popular tool for developing ink! contracts. This tool is known to work well with the substrate contracts node, and I thought it should work with other chains that support pallet ...
JoshOrndorff's user avatar
  • 1,201
4 votes
1 answer
51 views

Custom session keys in Chainspec for Mainnet config

I've seen some Substrate repo's where the SessionKeys (Aura, Babe, Grandpa, etc) are used with unchecked_into() .While the stash/controller keys are only used with into(). These are some examples: ...
Discardo's user avatar
  • 436
2 votes
1 answer
77 views

How can I convert an account of type sp_runtime::traits::IdentifyAccount::AccountId to sp_runtime::AccountId32?

I get the following error when trying to convert my frame_system::Config::AccountId to a MultiAddress. expected enum `MultiAddress<sp_runtime::AccountId32, ()>` found enum `MultiAddress<&...
Snowmead's user avatar
  • 625
2 votes
1 answer
92 views

AccountId in offchain worker

I'm working on Substrate based project. In the project, each blockchain validator has an offchain worker. author_insertKey() is used to set up a key so the offchain worker can sign transactions. Each ...
Maksim Ramanenkau's user avatar
3 votes
0 answers
82 views

Difference between "ink_primitives::AccountId" and just default "AccountId" type

I try to solve Rust's error that I included below: = note: expected struct `Mapping<ink::ink_primitives::AccountId, u128>` found reference `&Mapping<ink::ink_primitives::...
Tomasz Waszczyk's user avatar
1 vote
3 answers
359 views

How to convert AccountId to String

I'm building a dApp and would like to treat the contract address as a String. I was able to find a way to convert a String to an AccountId, but no example exists for the reverse case. I also tried ...
s.Takahashi's user avatar
5 votes
1 answer
166 views

PolkadotJS Apps shows wrong AccountId20 on Frontier Template Node

Frontier recently received support for Moonbeam's AccountId20: https://github.com/paritytech/frontier/pull/1019 So now I'm trying to use this new feature on PolkadotJS Apps. I'm running a Frontier ...
Bernardo Rodrigues's user avatar
1 vote
1 answer
98 views

How to properly use AccountId for ECDSA keypairs

I'm working on the Swift library for Substrate networks and can't understand how AccountId should work for ECDSA. In Polkadot/Kusama, metadata returns AccountId as AccountId32 - 32-byte array. This 32-...
Yehor Popovych's user avatar
2 votes
1 answer
38 views

Why not implement the sp_std::fmt::Debug for AccountId32 in non-std

https://github.com/paritytech/substrate/blob/d443f148ce0aa6a51798b86c6b3ae54113786f94/primitives/core/src/crypto.rs#L584-L595 Why not implement the sp_std::fmt::Debug for AccountId32 in non-std like ...
zjb0807's user avatar
  • 21
4 votes
1 answer
145 views

Using `app_crypto!` `Public` type as `AccountId` in the runtime

In our project, we have on-chain storage items equivalent to the type AuthorityId which is the Public type coming out of the app_crypto! macro in sp-authority-discovery. We would like to configure the ...
Mathis Wellmann's user avatar
1 vote
1 answer
102 views

How does `derivative_account_id` create an `AccountId`?

In the Utility pallet there is a function: /// Derive a derivative account ID from the owner account and the sub-account index. pub fn derivative_account_id(who: T::AccountId, index: u16) -> T::...
Bruno's user avatar
  • 8,315
1 vote
1 answer
54 views

Where does AccountId get instantiated with its concrete form?

In the substrate node runtime, I can see this : pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId; where Signature is just this: pub enum MultiSignature { ...
RoboT's user avatar
  • 377
2 votes
1 answer
140 views

Transfer from asset pallets with generated pallet account

I want to create a pallet account and then store assets using pallet assets in it, but I have a problem withdrawing assets from the pallet account because you can't transfer from pallet assets unless ...
Mohamad Al Zohbie's user avatar
2 votes
1 answer
181 views

Query AccountID of a pallet

The AccountID of a pallet is generated using the PalletID. (See the example from Treasury pallet) I know is possible to query this pallet ID because is a constant, but my question is: Is there a way ...
Alex Bean's user avatar
  • 5,747