Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 275

eDSL to write smart contracts in Rust for blockchains built on the Substrate framework

1 vote
1 answer
153 views

How to recover AccountId from ECDSA signature in ink!

In ink! 4.0 ink::env crate, it provides ecdsa_recover function. It returns compressed public key &[u8, 33] as is explained here. Assumed that blake2 is used for hashing. … #[ink(message)] pub fn verify(&self, req: ForwardRequest, signature: [u8; 65]) -> bool { let mut message_hash = <ink::env::hash::Blake2x256 as ink::env::hash::HashOutput>::Type::default(); ink: …
Shunsuke's user avatar
  • 432
1 vote
Accepted

Using Permill in the ink! contract

In above example, royalty: Option<u32>, on ink! smart contract side. …
Shunsuke's user avatar
  • 432
2 votes
1 answer
100 views

pallet-contracts and ink! version (v3.x.x & v4.0.0) compatibility

ink! v4.0.0 release is incoming. … Are there any backward incompatibility issues with ink! v3.4.0 or lower? which contracts developers need to be aware of. If yes, what exactly are they? …
Shunsuke's user avatar
  • 432
3 votes

How to deploy smart contract in ink which constructor takes value in params

Constructor takes Balance instead of boolean. So, you need to pass some Balance value via swanky command. E.g. swanky contract deploy erc20 --account alice -g 10000000000 -a 10000000
Shunsuke's user avatar
  • 432
1 vote
1 answer
148 views

How ink! handles DispatchError from ChainExtension

(As you can see in the bottom pircutre) When ChainExtension implementation returns Ok(RetVal::Converging(1)) and handle that status code 1 on ink! … The question is What is the appropriate way for ink! smart contract messages to handle DispatchError (from ChainExtension) and return it as its returned value? …
Shunsuke's user avatar
  • 432
3 votes
Accepted

cargo contract throws error about supplied arguments in ` #[ink(constructor)]` for version 3...

I had the same situation above. After specify indirect dependencies' version declaratively, I succeded to compile and deploy contracts to the local node with pallet-contracts polkadot-v0.9.19 support. …
Shunsuke's user avatar
  • 432