Coder Social home page Coder Social logo

Comments (10)

fracek avatar fracek commented on June 15, 2024 1

I like invokeMany but we would be diverging from the standard name for the function which (I believe) is confusing.

from starknet-react.

tarrencev avatar tarrencev commented on June 15, 2024 1

I like the proposed interface for execute. I'm wondering if we should deprecate invoke api in favor of a single execute api. It seems that is the direction the AccountInterface has taken:

public abstract execute(
    transactions: Call | Call[],
    abis?: Abi[],
    transactionsDetail?: InvocationsDetails
  ): Promise<AddTransactionResponse>;

from starknet-react.

ponderingdemocritus avatar ponderingdemocritus commented on June 15, 2024 1

Screenshot from 2022-06-01 16-45-43

Pulled from StarkNet fees - This is a huge potential saving if we batch transactions.

from starknet-react.

fracek avatar fracek commented on June 15, 2024

Since execute does not require changing any existing interface it can be added after v1.0.

What's your opininion on this interface @tarrencev @Pet3ris?

from starknet-react.

Pet3ris avatar Pet3ris commented on June 15, 2024

Would be great to have this function, I'm already using multicall right now for Yagi.

Regarding naming, I wonder if having more aligned naming between the invoke and this would make sense, e.g., execute1 and execute or invoke1 and invoke or invoke and invokeMany.

from starknet-react.

fracek avatar fracek commented on June 15, 2024

Looks like the execute method only accepts RawCalldata, I wonder if there's a reason for that? If it's possible I would update that method to accept normal call data. We also need to figure out how to add typesafety to the hook, my impression is that it's enough to add a unknown[] type parameter, where each unknown is the type of the input of each call.

/cc @janek26

from starknet-react.

janek26 avatar janek26 commented on June 15, 2024

no particular reason, feel free to change that

would be nice to use RawCalldata as little as possible - it will always be needed for API responses

from starknet-react.

ponderingdemocritus avatar ponderingdemocritus commented on June 15, 2024

It would be a nice feature if the calls were view exposed so within a UI you could easily show a 'tx cart' style element. Think like a ecomm cart.

For games specifically, it might make sense to seriously batch transactions together, as if they are updating similar state values (erc20 transfer eg) in 10 transactions, then it is effectively 1 storage update. Extend this to an 1155 style and the savings stack up massively for the player.

from starknet-react.

fracek avatar fracek commented on June 15, 2024

It would be a nice feature if the calls were view exposed so within a UI you could easily show a 'tx cart' style element. Think like a ecomm cart.

For games specifically, it might make sense to seriously batch transactions together, as if they are updating similar state values (erc20 transfer eg) in 10 transactions, then it is effectively 1 storage update. Extend this to an 1155 style and the savings stack up massively for the player.

I agree this looks cool. To make it happen we need to figure out a good API for execute, then we can think about that type of component built on top.

from starknet-react.

fracek avatar fracek commented on June 15, 2024

Fixed in 9fb19b2

from starknet-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.