-
Notifications
You must be signed in to change notification settings - Fork 12
feat: adding set timestamp method to starknet provider #46
Conversation
failing tests seem unrelated, will try to fix on other branch |
@unparalleled-js I'll need another approval I think, I just set up a pytest.skip for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing crazy here. Just looking through our changes. LGTM
def test_set_timestamp(provider, account, contract): | ||
start_time = provider.get_block("pending").timestamp | ||
provider.set_timestamp(start_time + 8600) | ||
contract.increase_balance(account.address, 123, sender=account) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just stole this from a test above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
update on my side, been stuck all day on this bug causing the failing tests. I have realized that the starknet-devnet process works a lot better when run separately, likely the same issues preventing Foundry from working. (ApeWorX/ape-foundry#5) since it is the same base class. |
What I did
Added
set_timestamp
for the starknet provider. Currently unable to hit the RPC endpoint for setting the timestamp of the blockfixes: #43
How I did it
Took similar methods from
ape-hardhat
and used requests package to hit the localhost endpoint for now. This call is currently failing. Also added a test undertests.function.test_provider
How to verify it
Cannot do this yet
Checklist