Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andrew Redden
    @androolloyd
    @mortimr is there a clean way to .encodeABI() function signatures
    with the underlying _contract, in web3js 1.0 > you can do .methods.functionName.encodeABI() and return the bytes string
    oh i see now web3_instance()
    Andrew Redden
    @androolloyd
    just to get access, i updated my version and the call worked
    Iulian Rotaru
    @mortimr
    we can add a getter to recover it
    Andrew Redden
    @androolloyd
    that would be great
    saves having to pull up the contract and then do the encodeABI each time
    Iulian Rotaru
    @mortimr
    I’ll rewrite all the issues and descriptions tomorrow morning, can you add this feature with a small desc on the repo ?
    Andrew Redden
    @androolloyd
    sure
    Iulian Rotaru
    @mortimr
    👍
    Iulian Rotaru
    @mortimr
    Updated horyus/ethvtx#61 and horyus/ethvtx#60. I'll start working on them soon as I will need them for my Dapp. In the meantime if you have any other idea to improve these two features feel free to comment on the issues :+1:
    Andrew Redden
    @androolloyd
    are the reducer states for the diff vtx sections exposed as types?
    would be great to update the state so that it can properly be typed to vtx
    Iulian Rotaru
    @mortimr
    You want ethvtx to export the reducer types ?
    Andrew Redden
    @androolloyd
    yeah so i can build a properly typescripted state
    Iulian Rotaru
    @mortimr
    I'm not sure I'm following you. You need the reducers to create your state type ?
    Andrew Redden
    @androolloyd
    Maybe im using the wrong terminology, but i get these errors from using asyncReducers
    Unexpected key "asyncReducers" found in previous state received by the reducer. Expected to find one of the known reducer keys instead: "txs", "contracts", "blocks", "accounts", "events", "vtxconfig", "vtxevents", "vtxpoll", "vtxcache", "auth", "fuse", "localSettings", "app", "walletApp". Unexpected keys will be ignored.
    the ones i use are easy enough to define
    async reducers explodes down into the different known state definitions
    Iulian Rotaru
    @mortimr
    Oh, it looks like when you build your store and it goes into the initialization proecess, it finds a key asyncReducers in your state but no reducer for this same key
    Andrew Redden
    @androolloyd
    exactly
    ah oops sorry mis read
    ah sorry maybe i have my wires crossed here
    Iulian Rotaru
    @mortimr
    From what I understand, the store is only aware of "txs", "contracts", "blocks", "accounts", "events", "vtxconfig", "vtxevents", "vtxpoll", "vtxcache", "auth", "fuse", "localSettings", "app", "walletApp" but not of "asyncReducers" in your reducers
    Try adding a random key yo your state and see if it gives you the same error for this new key
    Andrew Redden
    @androolloyd
    you were right, thanks for the random support
    only noticed it when i tried to type safe my state
    Iulian Rotaru
    @mortimr
    :+1:
    One nice tool for this is the & operator on types in Typescript
    type AppState = State & CustomState
    Andrew Redden
    @androolloyd
    oh shit
    for real?
    Iulian Rotaru
    @mortimr
    That's what I do, I define my custom state and reducers in my app, then "merge" the types before giving it to the store creation, and I export this in all my app
    Andrew Redden
    @androolloyd
    ah shit that is nice
    i like that rather than the mono state im using
    Iulian Rotaru
    @mortimr
    It's a very powerful operator, you can do very cool stuff in React with it
    Andrew Redden
    @androolloyd
    Yeah funny enough Ive been doing it with Props
    just didnt mentally connect it for state
    but it makes total sense
    not sure why that association never hit
    use it when combining in Stylesheets + theme through material ui
    Andrew Redden
    @androolloyd
    How can I force reset the cache if I have set permenant:true on my contracts
    all the listeners and stuff too
    if a user were to log out of hte app
    but then login with a new user
    Iulian Rotaru
    @mortimr

    This is how I use it:

    • I set permanent to true for contracts that should be loaded for all users
    • I load contracts in components that require them, and remove them when the component gets unmounted. So if you have user specific contracts, it’s better if you load/unload them dynamically

    (also I’ll investigate the listener issues as I saw that a lot of them are getting created.)

    Andrew Redden
    @androolloyd
    @mortimr good to know thx