From af39b6ad1ad5c8e032b2f7bba78ab3746e8df90e Mon Sep 17 00:00:00 2001 From: Ashok Menon Date: Fri, 11 Oct 2024 23:08:21 +0100 Subject: [PATCH] graphql: Remove TransactionBlockFilter.signAddress and AddressTransactionBlockRelationship.SIGN (#19804) ## Description Formally remove - `TransactionBlockFilter.signAddress` and - `AddressTransactionBlockRelationship.SIGN` which were deprecated two releases ago. They have been replaced by - `TransactionBlockFilter.sentAddress` and - `AddressTransactionBlockRelationship.SENT` which offer the same features under clearer names. ## Test plan ``` sui$ cargo nextest run -p sui-graphql-rpc sui$ cargo nextest run -p sui-graphql-rpc --features staging sui$ cargo nextest run -p sui-graphql-e2e-tests ``` ## Stack - #19708 - #19802 - #19803 --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [x] GraphQL: Formally remove `TransactionBlockFilter.signAddress` and `AddressTransactionBlockRelationship.SIGN` which were deprecated two releases ago. They have been replaced by `TransactionBlockFilter.sentAddress` and `AddressTransactionBlockRelationship.SENT` which offer the same features under clearer names. - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- .changeset/green-spies-clap.md | 6 + .../tests/stable/consistency/balances.move | 24 +- .../checkpoints/transaction_blocks.move | 2 +- .../epochs/transaction_blocks.move | 4 +- .../consistency/tx_address_objects.move | 8 +- .../transaction_block_effects/events.move | 6 +- .../stable/transactions/filters/kind.move | 10 +- .../stable/transactions/filters/sent.exp | 206 +----------------- .../stable/transactions/filters/sent.move | 41 ---- .../transactions/filters/transaction_ids.move | 2 +- .../stable/transactions/programmable.move | 2 +- .../transactions/scan_limit/require.move | 18 +- .../with_tx_sent_addr_filter.graphql | 4 +- ... => input_object_sent_addr_filter.graphql} | 2 +- ...ilter.graphql => sent_addr_filter.graphql} | 2 +- crates/sui-graphql-rpc/schema.graphql | 16 -- crates/sui-graphql-rpc/src/types/address.rs | 8 +- .../src/types/transaction_block/filter.rs | 17 +- .../src/types/transaction_block/tx_lookups.rs | 2 +- crates/sui-graphql-rpc/staging.graphql | 16 -- .../snapshot_tests__schema.graphql.snap | 16 -- .../snapshot_tests__staging.graphql.snap | 16 -- .../developer/getting-started/graphql-rpc.mdx | 6 +- .../src/generated/queries.ts | 18 +- sdk/graphql-transport/src/methods.ts | 2 +- sdk/zksend/src/links/list-created-links.ts | 2 +- 26 files changed, 61 insertions(+), 395 deletions(-) create mode 100644 .changeset/green-spies-clap.md rename crates/sui-graphql-rpc/examples/transaction_block_connection/{input_object_sign_addr_filter.graphql => input_object_sent_addr_filter.graphql} (86%) rename crates/sui-graphql-rpc/examples/transaction_block_connection/{sign_addr_filter.graphql => sent_addr_filter.graphql} (77%) diff --git a/.changeset/green-spies-clap.md b/.changeset/green-spies-clap.md new file mode 100644 index 0000000000000..571c5fc573d5c --- /dev/null +++ b/.changeset/green-spies-clap.md @@ -0,0 +1,6 @@ +--- +'@mysten/graphql-transport': patch +'@mysten/zksend': patch +--- + +Update to reflect GraphQL schema renaming TransactionBlockFilter.signAddress to .sentAddress. diff --git a/crates/sui-graphql-e2e-tests/tests/stable/consistency/balances.move b/crates/sui-graphql-e2e-tests/tests/stable/consistency/balances.move index 2f524ac0e7d3c..d45a225849419 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/consistency/balances.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/consistency/balances.move @@ -78,7 +78,7 @@ module P0::fake { //# run-graphql --cursors {"c":2,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 2. Fake coin balance should be 700. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -101,7 +101,7 @@ module P0::fake { //# run-graphql --cursors {"c":3,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 3. Fake coin balance should be 500. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -124,7 +124,7 @@ module P0::fake { //# run-graphql --cursors {"c":4,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 4. Fake coin balance should be 400. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -151,7 +151,7 @@ module P0::fake { //# run-graphql --cursors {"c":2,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 2. Fake coin balance should be 700. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -174,7 +174,7 @@ module P0::fake { //# run-graphql --cursors {"c":3,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 3. Fake coin balance should be 500. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -197,7 +197,7 @@ module P0::fake { //# run-graphql --cursors {"c":4,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 4. Fake coin balance should be 400. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -236,7 +236,7 @@ module P0::fake { sequenceNumber } } - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -259,7 +259,7 @@ module P0::fake { //# run-graphql --cursors {"c":3,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 3. Fake coin balance should be 500. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -282,7 +282,7 @@ module P0::fake { //# run-graphql --cursors {"c":4,"t":1,"i":false} # Emulating viewing transaction blocks at checkpoint 4. Fake coin balance should be 400. { - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -329,7 +329,7 @@ module P0::fake { sequenceNumber } } - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -360,7 +360,7 @@ module P0::fake { sequenceNumber } } - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { @@ -391,7 +391,7 @@ module P0::fake { sequenceNumber } } - transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { nodes { sender { fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") { diff --git a/crates/sui-graphql-e2e-tests/tests/stable/consistency/checkpoints/transaction_blocks.move b/crates/sui-graphql-e2e-tests/tests/stable/consistency/checkpoints/transaction_blocks.move index c505e86cccd0c..ef8a78bd82599 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/consistency/checkpoints/transaction_blocks.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/consistency/checkpoints/transaction_blocks.move @@ -56,7 +56,7 @@ module Test::M1 { checkpoints { nodes { sequenceNumber - transactionBlocks(filter: { signAddress: "@{A}"}) { + transactionBlocks(filter: { sentAddress: "@{A}"}) { edges { cursor node { diff --git a/crates/sui-graphql-e2e-tests/tests/stable/consistency/epochs/transaction_blocks.move b/crates/sui-graphql-e2e-tests/tests/stable/consistency/epochs/transaction_blocks.move index 425849aef9e16..f6e1f31b4777a 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/consistency/epochs/transaction_blocks.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/consistency/epochs/transaction_blocks.move @@ -249,7 +249,7 @@ module Test::M1 { checkpoint { sequenceNumber } - with_cursor: transactionBlocks(after: "@{cursor_0}", filter: {signAddress: "@{A}"}) { + with_cursor: transactionBlocks(after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) { edges { cursor node { @@ -264,7 +264,7 @@ module Test::M1 { } } } - without_cursor: transactionBlocks(filter: {signAddress: "@{A}"}) { + without_cursor: transactionBlocks(filter: {sentAddress: "@{A}"}) { edges { cursor node { diff --git a/crates/sui-graphql-e2e-tests/tests/stable/consistency/tx_address_objects.move b/crates/sui-graphql-e2e-tests/tests/stable/consistency/tx_address_objects.move index 4f7bf42061ed0..e4dc118588e3b 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/consistency/tx_address_objects.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/consistency/tx_address_objects.move @@ -71,7 +71,7 @@ module Test::M1 { } } } - latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {signAddress: "@{A}"}) { + latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {sentAddress: "@{A}"}) { nodes { sender { objects_consistent_with_address_at_latest_checkpoint_4: objects(filter: {type: "@{Test}"}) { @@ -135,7 +135,7 @@ module Test::M1 { //# run-graphql { - all_transactions: transactionBlocks(first: 4, filter: {signAddress: "@{A}"}) { + all_transactions: transactionBlocks(first: 4, filter: {sentAddress: "@{A}"}) { nodes { sender { objects(filter: {type: "@{Test}"}) { @@ -195,7 +195,7 @@ module Test::M1 { } } } - latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {signAddress: "@{A}"}) { + latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {sentAddress: "@{A}"}) { nodes { sender { objects(filter: {type: "@{Test}"}) { @@ -262,7 +262,7 @@ module Test::M1 { //# run-graphql # Regardless of the transaction block, the nested fields should yield the same data. { - all_transactions: transactionBlocks(first: 4, filter: {signAddress: "@{A}"}) { + all_transactions: transactionBlocks(first: 4, filter: {sentAddress: "@{A}"}) { nodes { sender { objects(filter: {type: "@{Test}"}) { diff --git a/crates/sui-graphql-e2e-tests/tests/stable/transaction_block_effects/events.move b/crates/sui-graphql-e2e-tests/tests/stable/transaction_block_effects/events.move index bf189690fe57a..5eb35f3a6e6b9 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/transaction_block_effects/events.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/transaction_block_effects/events.move @@ -37,7 +37,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(filter: { signAddress: "@{A}" }) { + transactionBlocks(filter: { sentAddress: "@{A}" }) { nodes { effects{ events { @@ -75,7 +75,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(first: 1, filter: { signAddress: "@{A}" }) { + transactionBlocks(first: 1, filter: { sentAddress: "@{A}" }) { nodes { effects { events(last: 1) { @@ -98,7 +98,7 @@ module Test::M1 { //# run-graphql --cursors {"i":0,"c":1} { - transactionBlocks(last: 1, filter: { signAddress: "@{A}" }) { + transactionBlocks(last: 1, filter: { sentAddress: "@{A}" }) { nodes { effects { events(first: 2, after: "@{cursor_0}") { diff --git a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/kind.move b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/kind.move index cc15acea59813..6b17cdd8c5dd9 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/kind.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/kind.move @@ -54,7 +54,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{A}"}) { + transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{A}"}) { pageInfo { hasNextPage hasPreviousPage @@ -74,7 +74,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{B}"}) { + transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{B}"}) { pageInfo { hasNextPage hasPreviousPage @@ -94,7 +94,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{C}"}) { + transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{C}"}) { pageInfo { hasNextPage hasPreviousPage @@ -114,7 +114,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{D}"}) { + transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{D}"}) { pageInfo { hasNextPage hasPreviousPage @@ -134,7 +134,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{E}"}) { + transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{E}"}) { pageInfo { hasNextPage hasPreviousPage diff --git a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.exp b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.exp index 03ca9cd780032..d1bc5b1a5a98d 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.exp +++ b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.exp @@ -3,7 +3,7 @@ processed 5 tasks init: A: object(0,0), B: object(0,1) -task 1, lines 9-11: +task 1, lines 6-8: //# programmable --sender A --inputs 1000000 @B //> SplitCoins(Gas, [Input(0)]); //> TransferObjects([Result(0)], Input(1)) @@ -11,7 +11,7 @@ created: object(1,0) mutated: object(0,0) gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 -task 2, lines 13-15: +task 2, lines 10-12: //# programmable --sender B --inputs 2000000 @A //> SplitCoins(Gas, [Input(0)]); //> TransferObjects([Result(0)], Input(1)) @@ -19,11 +19,11 @@ created: object(2,0) mutated: object(0,1) gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 -task 3, line 17: +task 3, line 14: //# create-checkpoint Checkpoint created: 1 -task 4, lines 19-87: +task 4, lines 16-46: //# run-graphql Response: { "data": { @@ -65,85 +65,6 @@ Response: { } ] }, - "bySignAddress": { - "nodes": [ - { - "effects": { - "objectChanges": { - "nodes": [ - { - "inputState": null, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "1000000" - } - } - } - }, - { - "inputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "300000000000000" - } - } - }, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "299999996024000" - } - } - } - } - ] - } - } - } - ] - }, - "bothAddresses": { - "nodes": [ - { - "effects": { - "objectChanges": { - "nodes": [ - { - "inputState": null, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "1000000" - } - } - } - }, - { - "inputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "300000000000000" - } - } - }, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "299999996024000" - } - } - } - } - ] - } - } - } - ] - }, - "differentAddresses": { - "nodes": [] - }, "compoundBySentAddress": { "nodes": [ { @@ -182,85 +103,6 @@ Response: { } ] }, - "compoundBySignAddress": { - "nodes": [ - { - "effects": { - "objectChanges": { - "nodes": [ - { - "inputState": null, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "1000000" - } - } - } - }, - { - "inputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "300000000000000" - } - } - }, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "299999996024000" - } - } - } - } - ] - } - } - } - ] - }, - "compoundBothAddresses": { - "nodes": [ - { - "effects": { - "objectChanges": { - "nodes": [ - { - "inputState": null, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "1000000" - } - } - } - }, - { - "inputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "300000000000000" - } - } - }, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "299999996024000" - } - } - } - } - ] - } - } - } - ] - }, - "compoundDifferentAddresses": { - "nodes": [] - }, "sentViaAddress": { "transactionBlocks": { "nodes": [ @@ -300,46 +142,6 @@ Response: { } ] } - }, - "signViaAddress": { - "transactionBlocks": { - "nodes": [ - { - "effects": { - "objectChanges": { - "nodes": [ - { - "inputState": null, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "1000000" - } - } - } - }, - { - "inputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "300000000000000" - } - } - }, - "outputState": { - "asMoveObject": { - "asCoin": { - "coinBalance": "299999996024000" - } - } - } - } - ] - } - } - } - ] - } } } } diff --git a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.move b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.move index 0f779510891a0..283d3c3a13cc2 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/sent.move @@ -3,9 +3,6 @@ //# init --protocol-version 51 --addresses Test=0x0 --accounts A B --simulator -// Confirm that the new `sentAddress` behaves like `signAddress`, and how the -// two filters interact with each other. - //# programmable --sender A --inputs 1000000 @B //> SplitCoins(Gas, [Input(0)]); //> TransferObjects([Result(0)], Input(1)) @@ -22,53 +19,15 @@ query { nodes { ...CoinBalances } } - bySignAddress: transactionBlocks(filter: { signAddress: "@{A}" }) { - nodes { ...CoinBalances } - } - - bothAddresses: transactionBlocks(filter: { sentAddress: "@{A}", signAddress: "@{A}" }) { - nodes { ...CoinBalances } - } - - differentAddresses: transactionBlocks(filter: { sentAddress: "@{A}", signAddress: "@{B}" }) { - nodes { ...CoinBalances } - } - compoundBySentAddress: transactionBlocks(filter: { sentAddress: "@{A}", kind: PROGRAMMABLE_TX }) { nodes { ...CoinBalances } } - compoundBySignAddress: transactionBlocks(filter: { signAddress: "@{A}", kind: PROGRAMMABLE_TX }) { - nodes { ...CoinBalances } - } - - compoundBothAddresses: transactionBlocks(filter: { - sentAddress: "@{A}", - signAddress: "@{A}", - kind: PROGRAMMABLE_TX, - }) { - nodes { ...CoinBalances } - } - - compoundDifferentAddresses: transactionBlocks(filter: { - sentAddress: "@{A}", - signAddress: "@{B}", - kind: PROGRAMMABLE_TX, - }) { - nodes { ...CoinBalances } - } - sentViaAddress: address(address: "@{A}") { transactionBlocks(relation: SENT) { nodes { ...CoinBalances } } } - - signViaAddress: address(address: "@{A}") { - transactionBlocks(relation: SIGN) { - nodes { ...CoinBalances } - } - } } fragment CoinBalances on TransactionBlock { diff --git a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/transaction_ids.move b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/transaction_ids.move index a217465798b11..49637fb4cfee3 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/transaction_ids.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/transactions/filters/transaction_ids.move @@ -46,7 +46,7 @@ module Test::M1 { //# run-graphql { - transactionBlocks(filter: {signAddress: "@{A}" transactionIds: []}) { + transactionBlocks(filter: {sentAddress: "@{A}" transactionIds: []}) { pageInfo { hasNextPage hasPreviousPage diff --git a/crates/sui-graphql-e2e-tests/tests/stable/transactions/programmable.move b/crates/sui-graphql-e2e-tests/tests/stable/transactions/programmable.move index 39bba91810a74..af8c48664a9bf 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/transactions/programmable.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/transactions/programmable.move @@ -831,7 +831,7 @@ fragment ComprehensivePTB on ProgrammableTransactionBlock { //# run-graphql { # Conflicting filter and context address(address: "@{A}") { - transactionBlocks(last: 10, filter: { signAddress: "0x0" }) { + transactionBlocks(last: 10, filter: { sentAddress: "0x0" }) { nodes { kind { __typename } } } } diff --git a/crates/sui-graphql-e2e-tests/tests/stable/transactions/scan_limit/require.move b/crates/sui-graphql-e2e-tests/tests/stable/transactions/scan_limit/require.move index a4b3e2249f3d0..25b59d24aaff2 100644 --- a/crates/sui-graphql-e2e-tests/tests/stable/transactions/scan_limit/require.move +++ b/crates/sui-graphql-e2e-tests/tests/stable/transactions/scan_limit/require.move @@ -76,7 +76,7 @@ module Test::M1 { //# run-graphql # Don't need scanLimit with sender { - transactionBlocks(filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4}) { + transactionBlocks(filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4}) { pageInfo { hasNextPage hasPreviousPage @@ -97,7 +97,7 @@ module Test::M1 { //# run-graphql # scanLimit required { - transactionBlocks(filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 function: "@{Test}::M1::create"}) { + transactionBlocks(filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 function: "@{Test}::M1::create"}) { pageInfo { hasNextPage hasPreviousPage @@ -118,7 +118,7 @@ module Test::M1 { //# run-graphql # valid { - transactionBlocks(scanLimit: 50 filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 function: "@{Test}::M1::create"}) { + transactionBlocks(scanLimit: 50 filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 function: "@{Test}::M1::create"}) { pageInfo { hasNextPage hasPreviousPage @@ -139,7 +139,7 @@ module Test::M1 { //# run-graphql # scanLimit required { - transactionBlocks(filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 kind: PROGRAMMABLE_TX}) { + transactionBlocks(filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 kind: PROGRAMMABLE_TX}) { pageInfo { hasNextPage hasPreviousPage @@ -160,7 +160,7 @@ module Test::M1 { //# run-graphql # valid { - transactionBlocks(scanLimit: 50 filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 kind: PROGRAMMABLE_TX}) { + transactionBlocks(scanLimit: 50 filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 kind: PROGRAMMABLE_TX}) { pageInfo { hasNextPage hasPreviousPage @@ -181,7 +181,7 @@ module Test::M1 { //# run-graphql # scanLimit required { - transactionBlocks(filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 inputObject: "@{obj_3_0}"}) { + transactionBlocks(filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 inputObject: "@{obj_3_0}"}) { pageInfo { hasNextPage hasPreviousPage @@ -202,7 +202,7 @@ module Test::M1 { //# run-graphql # valid { - transactionBlocks(scanLimit: 50 filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 inputObject: "@{obj_3_0}"}) { + transactionBlocks(scanLimit: 50 filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 inputObject: "@{obj_3_0}"}) { pageInfo { hasNextPage hasPreviousPage @@ -224,7 +224,7 @@ module Test::M1 { //# run-graphql # scanLimit required { - transactionBlocks(filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 changedObject: "@{obj_3_0}"}) { + transactionBlocks(filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 changedObject: "@{obj_3_0}"}) { pageInfo { hasNextPage hasPreviousPage @@ -247,7 +247,7 @@ module Test::M1 { # Because scanLimit is specified, the boundary cursors should be at 2 and 11, # and both will indicate is_scan_limited { - transactionBlocks(scanLimit: 50 filter: {signAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 changedObject: "@{obj_3_0}"}) { + transactionBlocks(scanLimit: 50 filter: {sentAddress: "@{A}" recvAddress: "@{B}" afterCheckpoint: 1 beforeCheckpoint: 4 changedObject: "@{obj_3_0}"}) { pageInfo { hasPreviousPage hasNextPage diff --git a/crates/sui-graphql-rpc/examples/checkpoint/with_tx_sent_addr_filter.graphql b/crates/sui-graphql-rpc/examples/checkpoint/with_tx_sent_addr_filter.graphql index 8d6ecbb50a000..8862c9d71ffdc 100644 --- a/crates/sui-graphql-rpc/examples/checkpoint/with_tx_sent_addr_filter.graphql +++ b/crates/sui-graphql-rpc/examples/checkpoint/with_tx_sent_addr_filter.graphql @@ -1,4 +1,4 @@ -# Select checkpoint at sequence number 14830285 for transactions from signAddress +# Select checkpoint at sequence number 14830285 for transactions from sentAddress { checkpoint(id: { sequenceNumber: 14830285 }) { digest @@ -6,7 +6,7 @@ timestamp transactionBlocks( filter: { - signAddress: "0x0000000000000000000000000000000000000000000000000000000000000000" + sentAddress: "0x0000000000000000000000000000000000000000000000000000000000000000" } ) { edges { diff --git a/crates/sui-graphql-rpc/examples/transaction_block_connection/input_object_sign_addr_filter.graphql b/crates/sui-graphql-rpc/examples/transaction_block_connection/input_object_sent_addr_filter.graphql similarity index 86% rename from crates/sui-graphql-rpc/examples/transaction_block_connection/input_object_sign_addr_filter.graphql rename to crates/sui-graphql-rpc/examples/transaction_block_connection/input_object_sent_addr_filter.graphql index ca0bb88bea535..5cf8f6675e845 100644 --- a/crates/sui-graphql-rpc/examples/transaction_block_connection/input_object_sign_addr_filter.graphql +++ b/crates/sui-graphql-rpc/examples/transaction_block_connection/input_object_sent_addr_filter.graphql @@ -3,7 +3,7 @@ transactionBlocks( filter: { inputObject: "0x0000000000000000000000000000000000000000000000000000000000000006" - signAddress: "0x0000000000000000000000000000000000000000000000000000000000000000" + sentAddress: "0x0000000000000000000000000000000000000000000000000000000000000000" } ) { nodes { diff --git a/crates/sui-graphql-rpc/examples/transaction_block_connection/sign_addr_filter.graphql b/crates/sui-graphql-rpc/examples/transaction_block_connection/sent_addr_filter.graphql similarity index 77% rename from crates/sui-graphql-rpc/examples/transaction_block_connection/sign_addr_filter.graphql rename to crates/sui-graphql-rpc/examples/transaction_block_connection/sent_addr_filter.graphql index a15a4056e4a8b..e5692d42b351d 100644 --- a/crates/sui-graphql-rpc/examples/transaction_block_connection/sign_addr_filter.graphql +++ b/crates/sui-graphql-rpc/examples/transaction_block_connection/sent_addr_filter.graphql @@ -2,7 +2,7 @@ { transactionBlocks( filter: { - signAddress: "0x0000000000000000000000000000000000000000000000000000000000000000" + sentAddress: "0x0000000000000000000000000000000000000000000000000000000000000000" } ) { nodes { diff --git a/crates/sui-graphql-rpc/schema.graphql b/crates/sui-graphql-rpc/schema.graphql index f8de2edcbdcdd..504e41f9bebd2 100644 --- a/crates/sui-graphql-rpc/schema.graphql +++ b/crates/sui-graphql-rpc/schema.graphql @@ -163,14 +163,6 @@ type AddressOwner { The possible relationship types for a transaction block: sent, or received. """ enum AddressTransactionBlockRelationship { - """ - Transactions this address has sent. NOTE: this input filter has been deprecated in favor of - `SENT` which behaves identically but is named more clearly. Both filters restrict - transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - SIGN """ Transactions this address has sent. """ @@ -4354,14 +4346,6 @@ input TransactionBlockFilter { """ affectedAddress: SuiAddress """ - Limit to transactions that were sent by the given address. NOTE: this input filter has been - deprecated in favor of `sentAddress` which behaves identically but is named more clearly. - Both filters restrict transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - signAddress: SuiAddress - """ Limit to transactions that were sent by the given address. """ sentAddress: SuiAddress diff --git a/crates/sui-graphql-rpc/src/types/address.rs b/crates/sui-graphql-rpc/src/types/address.rs index c1afff65b5ff4..817ad3ae34dcb 100644 --- a/crates/sui-graphql-rpc/src/types/address.rs +++ b/crates/sui-graphql-rpc/src/types/address.rs @@ -28,12 +28,6 @@ pub(crate) struct Address { /// The possible relationship types for a transaction block: sent, or received. #[derive(Enum, Copy, Clone, Eq, PartialEq)] pub(crate) enum AddressTransactionBlockRelationship { - /// Transactions this address has sent. NOTE: this input filter has been deprecated in favor of - /// `SENT` which behaves identically but is named more clearly. Both filters restrict - /// transactions by their sender, only, not signers in general. - /// - /// This filter will be removed with 1.36.0 (2024-10-14). - Sign, /// Transactions this address has sent. Sent, /// Transactions that sent objects to this address. NOTE: this input filter has been deprecated @@ -185,7 +179,7 @@ impl Address { let Some(filter) = filter.unwrap_or_default().intersect(match relation { // Relationship defaults to "sent" if none is supplied. - Some(R::Sign) | Some(R::Sent) | None => TransactionBlockFilter { + Some(R::Sent) | None => TransactionBlockFilter { sent_address: Some(self.address), ..Default::default() }, diff --git a/crates/sui-graphql-rpc/src/types/transaction_block/filter.rs b/crates/sui-graphql-rpc/src/types/transaction_block/filter.rs index 3a4c25c9642f2..c1673b409e9f7 100644 --- a/crates/sui-graphql-rpc/src/types/transaction_block/filter.rs +++ b/crates/sui-graphql-rpc/src/types/transaction_block/filter.rs @@ -37,13 +37,6 @@ pub(crate) struct TransactionBlockFilter { #[cfg(feature = "staging")] pub affected_object: Option, - /// Limit to transactions that were sent by the given address. NOTE: this input filter has been - /// deprecated in favor of `sentAddress` which behaves identically but is named more clearly. - /// Both filters restrict transactions by their sender, only, not signers in general. - /// - /// This filter will be removed with 1.36.0 (2024-10-14). - pub sign_address: Option, - /// Limit to transactions that were sent by the given address. pub sent_address: Option, @@ -96,7 +89,6 @@ impl TransactionBlockFilter { affected_address: intersect!(affected_address, intersect::by_eq)?, #[cfg(feature = "staging")] affected_object: intersect!(affected_object, intersect::by_eq)?, - sign_address: intersect!(sign_address, intersect::by_eq)?, sent_address: intersect!(sent_address, intersect::by_eq)?, recv_address: intersect!(recv_address, intersect::by_eq)?, input_object: intersect!(input_object, intersect::by_eq)?, @@ -146,7 +138,7 @@ impl TransactionBlockFilter { let missing_implicit_sender = missing_implicit_sender && self.affected_object.is_none(); missing_implicit_sender - .then_some(self.sent_address.or(self.sign_address)) + .then_some(self.sent_address) .flatten() } @@ -155,7 +147,6 @@ impl TransactionBlockFilter { pub(crate) fn has_filters(&self) -> bool { let has_filters = self.function.is_some() || self.kind.is_some() - || self.sign_address.is_some() || self.sent_address.is_some() || self.recv_address.is_some() || self.affected_address.is_some() @@ -190,11 +181,5 @@ impl TransactionBlockFilter { if (kind == TransactionBlockKindInput::SystemTx) != (signer == SuiAddress::from(NativeSuiAddress::ZERO)) ) - // Temporary while we deprecate `sign_address` in favor of `sent_address`. - || matches!( - (self.sign_address, self.sent_address), - (Some(signer), Some(sent)) - if signer != sent - ) } } diff --git a/crates/sui-graphql-rpc/src/types/transaction_block/tx_lookups.rs b/crates/sui-graphql-rpc/src/types/transaction_block/tx_lookups.rs index 3cfc9b92b3677..2820dca115ca8 100644 --- a/crates/sui-graphql-rpc/src/types/transaction_block/tx_lookups.rs +++ b/crates/sui-graphql-rpc/src/types/transaction_block/tx_lookups.rs @@ -305,7 +305,7 @@ fn min_option(xs: impl IntoIterator>) -> Option { /// Constructs a `RawQuery` as a join over all relevant side tables, filtered on their own filter /// condition, plus optionally a sender, plus optionally tx/cp bounds. pub(crate) fn subqueries(filter: &TransactionBlockFilter, tx_bounds: TxBounds) -> Option { - let sender = filter.sent_address.or(filter.sign_address); + let sender = filter.sent_address; let mut subqueries = vec![]; diff --git a/crates/sui-graphql-rpc/staging.graphql b/crates/sui-graphql-rpc/staging.graphql index 2022fa807a402..f293d31e3433c 100644 --- a/crates/sui-graphql-rpc/staging.graphql +++ b/crates/sui-graphql-rpc/staging.graphql @@ -163,14 +163,6 @@ type AddressOwner { The possible relationship types for a transaction block: sent, or received. """ enum AddressTransactionBlockRelationship { - """ - Transactions this address has sent. NOTE: this input filter has been deprecated in favor of - `SENT` which behaves identically but is named more clearly. Both filters restrict - transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - SIGN """ Transactions this address has sent. """ @@ -4361,14 +4353,6 @@ input TransactionBlockFilter { """ affectedObject: SuiAddress """ - Limit to transactions that were sent by the given address. NOTE: this input filter has been - deprecated in favor of `sentAddress` which behaves identically but is named more clearly. - Both filters restrict transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - signAddress: SuiAddress - """ Limit to transactions that were sent by the given address. """ sentAddress: SuiAddress diff --git a/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema.graphql.snap b/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema.graphql.snap index ee78a4b2c8cc9..babda5f3d986a 100644 --- a/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema.graphql.snap +++ b/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__schema.graphql.snap @@ -167,14 +167,6 @@ type AddressOwner { The possible relationship types for a transaction block: sent, or received. """ enum AddressTransactionBlockRelationship { - """ - Transactions this address has sent. NOTE: this input filter has been deprecated in favor of - `SENT` which behaves identically but is named more clearly. Both filters restrict - transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - SIGN """ Transactions this address has sent. """ @@ -4358,14 +4350,6 @@ input TransactionBlockFilter { """ affectedAddress: SuiAddress """ - Limit to transactions that were sent by the given address. NOTE: this input filter has been - deprecated in favor of `sentAddress` which behaves identically but is named more clearly. - Both filters restrict transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - signAddress: SuiAddress - """ Limit to transactions that were sent by the given address. """ sentAddress: SuiAddress diff --git a/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__staging.graphql.snap b/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__staging.graphql.snap index 51c37e60423ba..84c7e722592f5 100644 --- a/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__staging.graphql.snap +++ b/crates/sui-graphql-rpc/tests/snapshots/snapshot_tests__staging.graphql.snap @@ -167,14 +167,6 @@ type AddressOwner { The possible relationship types for a transaction block: sent, or received. """ enum AddressTransactionBlockRelationship { - """ - Transactions this address has sent. NOTE: this input filter has been deprecated in favor of - `SENT` which behaves identically but is named more clearly. Both filters restrict - transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - SIGN """ Transactions this address has sent. """ @@ -4365,14 +4357,6 @@ input TransactionBlockFilter { """ affectedObject: SuiAddress """ - Limit to transactions that were sent by the given address. NOTE: this input filter has been - deprecated in favor of `sentAddress` which behaves identically but is named more clearly. - Both filters restrict transactions by their sender, only, not signers in general. - - This filter will be removed with 1.36.0 (2024-10-14). - """ - signAddress: SuiAddress - """ Limit to transactions that were sent by the given address. """ sentAddress: SuiAddress diff --git a/docs/content/guides/developer/getting-started/graphql-rpc.mdx b/docs/content/guides/developer/getting-started/graphql-rpc.mdx index 93f1b805765bd..428d141db5cf8 100644 --- a/docs/content/guides/developer/getting-started/graphql-rpc.mdx +++ b/docs/content/guides/developer/getting-started/graphql-rpc.mdx @@ -161,7 +161,7 @@ This example finds the balance changes of all the transactions where a given add query ($address: SuiAddress!) { transactionBlocks(filter: { function: "0x3::sui_system::request_add_stake" - signAddress: $address + sentAddress: $address }) { nodes { digest @@ -370,7 +370,7 @@ Examples in the repository are designed to work with the version of GraphQL buil ## Related links - [GraphQL migration](../advanced/graphql-migration.mdx): Migrating to GraphQL guides you through migrating Sui RPC projects from JSON-RPC to GraphQL. -- [GraphQL concepts](../../../concepts/graphql-rpc.mdx): GraphQL for Sui RPC examines the elements of GraphQL that you should know to get the most from the service. +- [GraphQL concepts](../../../concepts/graphql-rpc.mdx): GraphQL for Sui RPC examines the elements of GraphQL that you should know to get the most from the service. - [GraphQL reference](../../../references/sui-graphql.mdx): Auto-generated GraphQL reference for Sui RPC. -- [Sui Testnet GraphiQL](https://sui-testnet.mystenlabs.com/graphql): Sui GraphiQL IDE for the Testnet network. +- [Sui Testnet GraphiQL](https://sui-testnet.mystenlabs.com/graphql): Sui GraphiQL IDE for the Testnet network. - [Sui Mainnet GraphiQL](https://sui-mainnet.mystenlabs.com/graphql): Sui GraphiQL IDE for the Mainnet network. diff --git a/sdk/graphql-transport/src/generated/queries.ts b/sdk/graphql-transport/src/generated/queries.ts index c07d39d0e76a5..da8cbc18f890b 100644 --- a/sdk/graphql-transport/src/generated/queries.ts +++ b/sdk/graphql-transport/src/generated/queries.ts @@ -321,15 +321,7 @@ export enum AddressTransactionBlockRelationship { */ Recv = 'RECV', /** Transactions this address has sent. */ - Sent = 'SENT', - /** - * Transactions this address has sent. NOTE: this input filter has been deprecated in favor of - * `SENT` which behaves identically but is named more clearly. Both filters restrict - * transactions by their sender, only, not signers in general. - * - * This filter will be removed with 1.36.0 (2024-10-14). - */ - Sign = 'SIGN' + Sent = 'SENT' } /** System transaction for creating the on-chain state used by zkLogin. */ @@ -4995,14 +4987,6 @@ export type TransactionBlockFilter = { recvAddress?: InputMaybe; /** Limit to transactions that were sent by the given address. */ sentAddress?: InputMaybe; - /** - * Limit to transactions that were sent by the given address. NOTE: this input filter has been - * deprecated in favor of `sentAddress` which behaves identically but is named more clearly. - * Both filters restrict transactions by their sender, only, not signers in general. - * - * This filter will be removed with 1.36.0 (2024-10-14). - */ - signAddress?: InputMaybe; /** Select transactions by their digest. */ transactionIds?: InputMaybe>; }; diff --git a/sdk/graphql-transport/src/methods.ts b/sdk/graphql-transport/src/methods.ts index c11b1aa718e2b..0e74fe968260a 100644 --- a/sdk/graphql-transport/src/methods.ts +++ b/sdk/graphql-transport/src/methods.ts @@ -622,7 +622,7 @@ export const RPC_METHODS: { : undefined, inputObject: 'InputObject' in filter ? filter.InputObject : undefined, changedObject: 'ChangedObject' in filter ? filter.ChangedObject : undefined, - signAddress: 'FromAddress' in filter ? filter.FromAddress : undefined, + sentAddress: 'FromAddress' in filter ? filter.FromAddress : undefined, recvAddress: 'ToAddress' in filter ? filter.ToAddress : undefined, kind: 'TransactionKind' in filter diff --git a/sdk/zksend/src/links/list-created-links.ts b/sdk/zksend/src/links/list-created-links.ts index aa8aa5864ab6f..2e8248f824e7c 100644 --- a/sdk/zksend/src/links/list-created-links.ts +++ b/sdk/zksend/src/links/list-created-links.ts @@ -16,7 +16,7 @@ const ListCreatedLinksQuery = graphql(` transactionBlocks( last: 10 before: $cursor - filter: { signAddress: $address, function: $function, kind: PROGRAMMABLE_TX } + filter: { sentAddress: $address, function: $function, kind: PROGRAMMABLE_TX } ) { pageInfo { startCursor