You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is the potential to save up to ~60k gas by doing one fight transaction per 4 characters.
That amounts to about 9 cents saved across the team, or 2 cents per character average. That could be roughly 13% in savings.
Description
The player would select which characters to fight with (4 is not always available and not everyone has 4 characters), and select targets for each character individually before the transaction is initiated.
Technical requirements
Solidity
Create teamFight functions in both tokensManager and cryptoBlades contracts, make it take an array of character IDs for parameters, and an array of targets
Iterate through them and call the fight function for each character etc
Frontend
Create a way to display targets per character, make it known to the user they can queue character/target pairs up
Call getTarget separately per character and display them when choices are being made
Send the collective data into the transaction to the teamFight function in either contract depending on whether the gas tax is enabled or not (tokensmanager = yes tax)
If only one character has actions queued up, call the regular fight function instead, for lower gas overhead.
Anticipate an equivalent number of fight result events as many characters had fought, and display them in the usual fight result modal (this will require expanding it)
This idea should be built on recent changes by Equipment Manager #1763 and the TokensManager gas saving skip #1795
The text was updated successfully, but these errors were encountered:
Goal
There is the potential to save up to ~60k gas by doing one fight transaction per 4 characters.
That amounts to about 9 cents saved across the team, or 2 cents per character average. That could be roughly 13% in savings.
Description
The player would select which characters to fight with (4 is not always available and not everyone has 4 characters), and select targets for each character individually before the transaction is initiated.
Technical requirements
Solidity
Frontend
This idea should be built on recent changes by Equipment Manager #1763 and the TokensManager gas saving skip #1795
The text was updated successfully, but these errors were encountered: