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
When a transaction is targeting a smart contract through the recipients field in the transaction data, we should provide a way to check if the transaction would be valid before to send.
Hence, clients can call this endpoint to be sure the transaction will pass.
Why not doing it during transaction validation ?
Because if the transaction calls are invalid, we don't want a user to spam the network making DDOS attack for nothing and do not pay the fee as the transaction would be not valid.
So by letting the transaction be validated and refused on the smart contract side, we are using the fee as a security mechanism for malicious attacks towards smart contracts.
How to do it
We should provide an API to check the validity of the smart contract call.
This API should:
Download transaction's code of the smart contract targeted
Interpret the transaction conditions with the pending transaction as input
Return errors or success
The text was updated successfully, but these errors were encountered:
Rationale
When a transaction is targeting a smart contract through the
recipients
field in the transaction data, we should provide a way to check if the transaction would be valid before to send.Hence, clients can call this endpoint to be sure the transaction will pass.
Why not doing it during transaction validation ?
Because if the transaction calls are invalid, we don't want a user to spam the network making DDOS attack for nothing and do not pay the fee as the transaction would be not valid.
So by letting the transaction be validated and refused on the smart contract side, we are using the fee as a security mechanism for malicious attacks towards smart contracts.
How to do it
We should provide an API to check the validity of the smart contract call.
This API should:
The text was updated successfully, but these errors were encountered: