Closed metalboyrick closed 2 weeks ago
Can review first, I will leave it as draft for now @jrcarlos2000 @Nadai2010
there's a bug with tuple unsigned integer
ContractAddress is bigint here
Since I've written some changes for the Address
component, this should resolve issue #319 as well
0x0x issue from useScaffoldEventHistory
on felt type
issue happen in nested enum
Sample nested enum cairo code:
#[derive(Drop, Serde)]
enum SampleEnum {
enum1: u256,
enum2: felt252
}
#[derive(Drop, Serde)]
enum SampleNestedEnum {
enum1: SampleEnum,
enum2: felt252
}
#[derive(Drop, starknet::Event)]
pub struct EventWithNestedEnum {
element1: u256,
element2: SampleNestedEnum,
}
fn emit_event_with_nested_enum(
ref self: ContractState, element1: u256, element2: SampleNestedEnum
) {
self.emit(EventWithNestedEnum { element1, element2 });
}
@ngjupeng hi, #339 had fixed the 0x0x
event issue, would you mind to check it ?
we need handle this case?
we need handle this case?
this used to be handled before @metalboyrick iirc
@jrcarlos2000 @ngjupeng used to be, new changes may have override this, will check
0x is valid input (ignore the gia, it only exist on my local for debug purpose)
u256>
integer type is not working
expect to return as contract format
will this be a fix for inputting more than one variant for enum form? @metalboyrick
@iossocket yep, enums are supposed to only have one active variant only
yeah but that somehow doesnt work
does not get this hint?
wait now it works
@iossocket that is the expected one
i tink this breaks down if the enum is nested @iossocket
is it because one form will only have one errorMessage
state, other field item may change it as well?
yep @iossocket fixed this, cc @ngjupeng
expect to return as contract format
@ngjupeng this has been fixed but some output might loook a bit uglier haha
for the signed integer, starknetjs does not support right now. https://github.com/starknet-io/starknet.js/pull/1177
expect to return as contract format
@ngjupeng this has been fixed but some output might loook a bit uglier haha
this issue existed in tuple and struct also, but it was fixed on array
merging and will record outstanding issues to unblock HH usage
Task name here
Fixes #326 Fixes #319
Types of change
Comments (optional)
Have not cleaned up yet, but tested with bulletproof contracts, should work with previous data types
TODO:
useScaffoldReadContract
hookuseScafffoldWriteContract
hookuseScaffoldMultiWriteContract
hookuseScaffoldEventHistory
hook~