tangle-network / tangle

Modular restaking infrastructure for developers, restakers, and operators.
https://www.tangle.tools/
GNU General Public License v3.0
51 stars 24 forks source link

[TASK] Pass balance value from caller to the `msg.value` in EVM Hooks. #818

Open shekohex opened 2 days ago

shekohex commented 2 days ago

Currently, we hard-coded Zero value to the EVM call in hooks everywhere here: https://github.com/tangle-network/tangle/blob/768987dd745e7155a84b7eaec93c55c00273ad1a/pallets/services/src/functions.rs#L92-L94 and other places. We should allow the caller to specify how much TNT or any other asset, by assetId, and amount to be passed to the Blueprint manager, which would be translated to an ERC20 Token address and amount. This value is automatically deduced from the caller account and got transferred to the BlueprintManager smart contract balance.

shekohex commented 2 days ago

Also this, do not forget to update and create a PR to tnt-core with these changes.

shekohex commented 2 days ago

Could be combined with #817