-
Notifications
You must be signed in to change notification settings - Fork 26
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
Upgrade to cadence 1.0 #62
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #62 +/- ##
==========================================
- Coverage 84.83% 84.79% -0.05%
==========================================
Files 29 29
Lines 1807 1927 +120
Branches 94 102 +8
==========================================
+ Hits 1533 1634 +101
- Misses 261 277 +16
- Partials 13 16 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Caution Review failedThe pull request is closed. WalkthroughThe recent updates across several Python example files primarily involve modifying access control keywords from Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
@coderabbitai review |
Actions PerformedReview triggered.
|
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.
Actionable comments posted: 0
Out of diff range and nitpick comments (2)
examples/events_examples.py (1)
Line range hint
25-25
: Remove the unused variableevents
to clean up the code.- events = await client.get_events_for_height_range( - type="flow.AccountCreated", - start_height=latest_block.height - 1, - end_height=latest_block.height, - )examples/transactions_examples.py (1)
Line range hint
28-28
: Remove the unused variabletransaction
to clean up the code.- transaction = Tx( - code="""transaction(){prepare(){log("OK")}}""", - reference_block_id=latest_block.id, - payer=account_address, - proposal_key=ProposalKey( - key_address=account_address, - key_id=0, - key_sequence_number=proposer.keys[0].sequence_number, - ), - ).with_envelope_signature( - account_address, - 0, - new_signer, - )
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- examples/account_examples.py (4 hunks)
- examples/events_examples.py (1 hunks)
- examples/scripts_examples.py (4 hunks)
- examples/transactions_examples.py (1 hunks)
- flow_py_sdk/templates.py (4 hunks)
Additional Context Used
Ruff (2)
examples/events_examples.py (1)
25-25: Local variable
events
is assigned to but never usedexamples/transactions_examples.py (1)
28-28: Local variable
transaction
is assigned to but never used
Additional comments not posted (13)
flow_py_sdk/templates.py (5)
38-39
: Updatedprepare
function signature to useauth(BorrowValue) &Account
aligns with Cadence 1.0 access control changes.
68-69
: Updatedprepare
function signature inupdateAccountContractTemplate
to useauth(UpdateContract) &Account
is consistent with Cadence 1.0 access control changes.
76-76
: Updatedprepare
function signature inaddAccountContractTemplate
to useauth(AddContract) &Account
is consistent with Cadence 1.0 access control changes.
84-84
: Updatedprepare
function signature inremoveAccountContractTemplate
to useauth(RemoveContract) &Account
is consistent with Cadence 1.0 access control changes.
Line range hint
92-138
: The addition ofdomainSeparationTag: "FLOW-V0.0-user"
inverifyAccountSignaturesTemplate
enhances security and aligns with Cadence 1.0 features.examples/scripts_examples.py (3)
21-21
: Updated access control toaccess(all)
inExecuteScriptExample
aligns with Cadence 1.0 changes.
57-57
: Updated access control toaccess(all)
inExecuteScriptWithArgumentExample
aligns with Cadence 1.0 changes.
Line range hint
86-98
: Updated access control toaccess(all)
inUser
struct andmain
function inExecuteComplexScriptWithArgumentExample
aligns with Cadence 1.0 changes.examples/events_examples.py (1)
82-85
: Updated access control toaccess(all)
inEventDemo
contract,Add
event, andadd
function inEmitEventFromContractExample
aligns with Cadence 1.0 changes.examples/transactions_examples.py (1)
208-208
: Updatedprepare
function signature to use&Account
inSubmitMultiSignedTransactionExample
aligns with Cadence 1.0 changes.examples/account_examples.py (3)
83-84
: Updated access control toaccess(all)
inDeployContract
aligns with Cadence 1.0 changes.
144-145
: Updated access control toaccess(all)
and changed function logic from addition to multiplication inUpdateContract
aligns with Cadence 1.0 changes.Also applies to: 193-194
244-245
: Updated access control toaccess(all)
inRemoveContract
aligns with Cadence 1.0 changes.
373f92f
to
e73b186
Compare
Summary by CodeRabbit
New Features
access(all)
to ensure broader visibility and access.Account
instead ofAuthAccount
.InclusiveRange
class for enhanced functionality related to ranges.Improvements
create_account_template
and other account-related templates for better account management.verifyAccountSignaturesTemplate
function for improved security and functionality.