Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Debug contract #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add Debug contract #9

wants to merge 2 commits into from

Conversation

kongzii
Copy link
Collaborator

@kongzii kongzii commented Sep 26, 2024

No description provided.

@@ -0,0 +1,19 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.4.25;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use something newer >8

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the version used in Reality; newer ones don't have now.

The idea of this contract was that if you need to debug something like this, go here, edit it, and deploy by free will.

Comment on lines 8 to 10
function getNow() public view returns (uint32) {
return uint32(now);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a proxy for block.timestamp (now is deprecated)

Copy link
Collaborator Author

@kongzii kongzii Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still all related to Reality's contract, this is exactly what they are using.

@gabrielfior
Copy link
Contributor

Everything that is achieved calling the getNow function can be achieved calling web3.eth.get_block('latest').timestamp, hence I'm confused as to why we need a new contract to perform actions available on an existing package. Furthermore, debugging can also be accomplished using the web3 method, so I'm not sure this is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants