Closed ashutoshvarma closed 1 year ago
Any update on it ? @statictype
can you please provide a contract to test against?
@statictype
Any contract with array as input will reproduce. Below is the modified flipper where flip()
take an EVM address ([u8;20]
) who
#![cfg_attr(not(feature = "std"), no_std)]
#[ink::contract]
mod flipper {
#[ink(storage)]
pub struct Flipper {
value: bool,
}
impl Flipper {
#[ink(constructor)]
pub fn new(init_value: bool) -> Self {
Self { value: init_value }
}
#[ink(message)]
pub fn flip(&mut self, who: [u8; 20]) {
if who != [0; 20] {}
self.value = !self.value;
}
#[ink(message)]
pub fn get(&self) -> bool {
self.value
}
}
}
Link to ink playground - https://ink-playground.substrate.io/?id=9e28483fb567b26972b7ce624c349cf9
@peetzweg maybe you can take care of this next week? i have no bandwidth until May
For sure this is nice ux improvement. IMHO not too sure to completely drop the the current ux to enter array elements.
I'm not available this week but could try to fit it in next weeks. However, how do you @ashutoshvarma or @PierreOssun work on a PR for this? Shouldn't be too complex for what I know.
Hi there, any update on this? This makes it almost impossible to use eth_addresses
as input.
We use ethereum addresses on Astar's cross VM feature.
Hi there, any update on this? This makes it almost impossible to use
eth_addresses
as input. We use ethereum addresses on Astar's cross VM feature.
@Maar-io Isn't this just a user experience issue? Because it's cumbersome to click the +
button for new array elements? Or can you describe in other words what your issue is?
@Maar-io Isn't this just a user experience issue? Because it's cumbersome to click the
+
button for new array elements? Or can you describe in other words what your issue is?
You can call it bad UX but it is really not usable. Instead of copy and paste EVM user/contract address, you need to manually enter 20 bytes, one by one. This is how it looks on Polkadot.js
I can pick this up next week
Hello friends, any update on this? I see you implemented hash input (64 chars) The H160 should be similar as feature
Is your feature request related to a problem? Please describe. When inputting a fixed length array like a
[u8;20]
(an EVM Address), it is frustrating and not practical enough to input eachu8
separately.Describe the solution you'd like For fixed length bytes array, input should also provide option to input hex-encoded strings, like polkadot-js provides.
Additional context![image](https://user-images.githubusercontent.com/17181457/221480147-07e93ba8-0184-4e76-9e39-1f859a666d11.png)