Comments (10)
I like invokeMany
but we would be diverging from the standard name for the function which (I believe) is confusing.
from starknet-react.
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.
Pulled from StarkNet fees - This is a huge potential saving if we batch transactions.
from starknet-react.
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.
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.
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.
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.
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.
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.
Fixed in 9fb19b2
from starknet-react.
Related Issues (20)
- `autoconnect` reconnects to the wrong wallet after refresh when connecting to multiple wallets HOT 3
- Hooks to fetch a transaction receipt HOT 2
- Create ABI Type library HOT 1
- Create type-safe ABI encoder/decoder HOT 7
- Update account with the `connector.connect()` method HOT 3
- useConnector should return isLoading HOT 3
- Create a hook to get starknet id stark domain or address HOT 14
- Support newer `starknet.js` versions
- Create useContractEvents hook HOT 4
- Use `get-starknet` for connectors HOT 1
- Add hook to change network HOT 6
- :bug: ensureWallet is now async but InjectedConnector don't use await HOT 1
- Make `starknet-react` hooks work with server side components HOT 2
- Add useBalance hook HOT 2
- Update website to Next.js 13 `app/` directory HOT 3
- Add `use client` to `StarknetConfig` HOT 1
- Rename `StarkNet` to `Starknet` in docs HOT 2
- `get_starknet_core_1.getStarknet` is not a function HOT 7
- useTransactionManager not updating HOT 2
- update starknet dependency version to 5.9.1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starknet-react.