Skip to content

Better handling of gas and depo on export tab #184

Description

@mohamedalichelbi

Is your feature request related to a problem? Please describe.
On the export tab users can set the gas & attached deposit assigned globally to the proposal. However, we lack some validation and convenience features. For instance, better global gas validation, and default values for attached NEAR deposit.

Describe the solution you'd like

  • For gas: we should calculate the sum of gas used by all cards, and also factor in the amount of gas needed to create cross-contract calls on the multicall contract. Make sure the total isn't more than the attached gas.
  • For attached deposit: There are 2 cases here, attached NEAR and attached FT. In case of attached FT then attached NEAR deposit should be 1 yocto, as this is enforced by the FT standard (nep-141). However, in case of attached NEAR deposit, we currently hard-code the default to 1 yocto as well. It is apparent that users don't keep funds on multicall, and only transfer amounts necessary to their proposals, so we should do the following: In case of attached NEAR deposit, the default value should be the sum of all attached deposits from cards, plus 1 yocto

Describe alternatives you've considered

Additional context

Metadata

Metadata

Labels

enhancementNew feature or requestmediumThis has medium priority

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions