blockchain-carbon-accounting
blockchain-carbon-accounting copied to clipboard
Move requires/modifiers of net-emissions-token-network transfer() to safeTransferFrom
https://github.com/hyperledger-labs/blockchain-carbon-accounting/blob/1c5bc0aced65f24fd1befd133700c0c82a85d8d4/net-emissions-token-network/contracts/NetEmissionsTokenNetwork.sol#L593
We should move the require statements/modifiers in the transfer() function to the _beforeTokenTransfer() hook. This will ensure they are not skipped by users directly calling safeTransferFrom() or safeBatchTransferFrom().
Note: I have prepared a fix for this that will be implemented in a PR that introduces a new carbon token for Issue 372
Sure that sounds good.
Si Chen Open Source Strategies, Inc.
Please give me your feedback on my e-book Open Climate Investing https://climate-investing-book.opensourcestrategies.com/v/main/book
On Wed, Dec 29, 2021 at 7:45 AM Bertrand Rioux @.***> wrote:
https://github.com/hyperledger-labs/blockchain-carbon-accounting/blob/1c5bc0aced65f24fd1befd133700c0c82a85d8d4/net-emissions-token-network/contracts/NetEmissionsTokenNetwork.sol#L593
We should move the require statements/modifiers in the transfer() function to the _beforeTokenTransfer() hook. This will ensure they are not skipped by users directly calling safeTransferFrom() or safeBatchTransferFrom().
Note I have prepared a fix for this that will be implemented in a PR that introduces a new carbon token in response to Issue 372 https://github.com/hyperledger-labs/blockchain-carbon-accounting/issues/372
— Reply to this email directly, view it on GitHub https://github.com/hyperledger-labs/blockchain-carbon-accounting/issues/378, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANAS4NMNBP7AEMKTFK7LQ3UTMUIBANCNFSM5K6FM5BA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>