Closed aymericdelab closed 2 days ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jun 30, 2024 0:23am |
โฑ๏ธ Estimated effort to review [1-5] | 3 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Possible Bug: The mint_resources_and_claim_quest function in HintBox.tsx uses entityId directly without checking if it's provided or defaulting to BigInt(0) as the previous implementation did. This might lead to issues if entityId is not provided. |
Efficiency Concern: The mint_resources_and_claim_quest function in EternumProvider class constructs a transaction with potentially many calls to mint_starting_resources based on config_ids . This could lead to gas inefficiencies or transaction failures if config_ids array is large. |
Category | Suggestion | Score |
Possible bug |
Ensure correct handling of resource division in the
___
**Modify the | 9 |
Enhancement |
Add error handling to the
___
**Consider adding error handling within the | 8 |
Possible issue |
Handle potential undefined values for
___
**Update the | 7 |
Maintainability |
Refactor the
___
**Refactor the | 6 |
User description
creates multicall to avoid one tx going through but not the other
PR Type
Enhancement
Description
mint_resources_and_claim_quest
function increateSystemCalls
to handle minting resources and claiming quests in a single call.HintBox
component to use the newmint_resources_and_claim_quest
function instead of separate calls.mint_resources_and_claim_quest
method inEternumProvider
class.MintResourcesAndClaimProps
interface for the combined operation properties.Changes walkthrough ๐
createSystemCalls.ts
Add mint_resources_and_claim_quest function for combined operations
client/src/dojo/createSystemCalls.ts
mint_resources_and_claim_quest
function to handle mintingresources and claiming quests in a single call.
mint_resources_and_claim_quest
.HintBox.tsx
Use mint_resources_and_claim_quest in HintBox component
client/src/ui/components/hints/HintBox.tsx
mint_starting_resources
andmint_resources
with a single call to
mint_resources_and_claim_quest
.index.ts
Add mint_resources_and_claim_quest method to EternumProvider
sdk/packages/eternum/src/provider/index.ts
mint_resources_and_claim_quest
method toEternumProvider
class.provider.ts
Add MintResourcesAndClaimProps interface
sdk/packages/eternum/src/types/provider.ts
MintResourcesAndClaimProps
interface to define properties forcombined mint and claim operation.