Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Make block/timestamp offset utilities work in contracts & deprecate builtInMethods transformer #165

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

jribbink
Copy link
Contributor

@jribbink jribbink commented Aug 9, 2022

Closes #161

Description

  • Applies builtInMethods transformer to deployed contracts so that block height/timestamp values can be intercepted within contract code as well
  • Applies builtInMethods code transformer to all TX/scripts by default instead of requiring it to be manually passed when trying to use block/timestamp utilities
  • Refactors FlowManager to deploy contract raw through flow-cadut (this way no code transformers are applied)

For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@jribbink jribbink requested a review from a team as a code owner August 9, 2022 00:42
@changeset-bot
Copy link

changeset-bot bot commented Aug 9, 2022

🦋 Changeset detected

Latest commit: c2f3116

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@onflow/flow-js-testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jribbink jribbink marked this pull request as draft August 10, 2022 06:47
@jribbink
Copy link
Contributor Author

Converted to draft. Deploying FlowManager from flow-cadut may have unintended consequences if this contract is attempted to be imported. Should rethink some sort of transformer bypass

@jribbink jribbink force-pushed the jribbink/apply-builtinmethods-transformer branch 2 times, most recently from 400ee1e to 39622e3 Compare August 12, 2022 21:04
@jribbink jribbink marked this pull request as ready for review August 12, 2022 21:09
@jribbink jribbink requested a review from chasefleming August 12, 2022 21:10
@jribbink jribbink added enhancement New feature or request bug Something isn't working labels Aug 12, 2022
@jribbink jribbink force-pushed the jribbink/apply-builtinmethods-transformer branch 2 times, most recently from 985df9f to 7b7e747 Compare August 15, 2022 22:17
Copy link
Contributor

@justinbarry justinbarry left a comment

Choose a reason for hiding this comment

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

LGTM

@jribbink jribbink force-pushed the jribbink/apply-builtinmethods-transformer branch from 701a501 to ff05d4e Compare August 26, 2022 07:08
@jribbink jribbink force-pushed the jribbink/apply-builtinmethods-transformer branch from a3cda6d to c2f3116 Compare August 26, 2022 07:53
@jribbink jribbink merged commit 4ac3741 into master Aug 26, 2022
@jribbink jribbink deleted the jribbink/apply-builtinmethods-transformer branch August 26, 2022 15:44
This was referenced Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setTimestampOffset not work for timestamp in contracts
2 participants