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
{{ message }}
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
This is related to the chequebook payment module implementation:
After we connect and decide to use the chequebook as a payment module implementation, we should verify whether the bytecode at the counterparty's cheqeubook address matches with the expected bytecode of the chequebook implementation.
Checking only the bytecode is not enough: we should verify the content of relevant state variables, as these can be set during deployment to a value which prevents us from cashing out our cheques.
Example: if cheque.paidOut is set to MAX_UINT, no cheque can ever be cashed out.
Possible solutions are:
Reading the value of relevant state variables at handshake and make sure they are as expected.
Making an on-chain factory which deploys smart-contracts and keeps track of deployed smart-contracts. Hard-code the address of the factory in the code and at handShake verify whether the chequebook contract is deployed by the factory.
The text was updated successfully, but these errors were encountered:
I don't really object, but if you remove a TODO it must be clear that it will be done later and not be forgot. So if for you it is clear that this is part of #1641, I am fine removing it. Otherwise make an additional note in the issue.
BTW. It's not necessarily a bad practice to leave a couple of TODOs in the code.
This one should actually be changed: it is already a package level function, it's the SimpleSwapBin argument which is missing.
Related to the TODO which was deleted: // TODO: have this as a package level function and pass the SimpleSwapBin as argument
Dependent on: ethersphere/swap-swear-and-swindle#71
This is related to the chequebook payment module implementation:
After we connect and decide to use the chequebook as a payment module implementation, we should verify whether the bytecode at the counterparty's cheqeubook address matches with the expected bytecode of the chequebook implementation.
Checking only the bytecode is not enough: we should verify the content of relevant state variables, as these can be set during deployment to a value which prevents us from cashing out our cheques.
Example: if cheque.paidOut is set to MAX_UINT, no cheque can ever be cashed out.
Possible solutions are:
The text was updated successfully, but these errors were encountered: