The Sui blockchain is optimized for performance and parallel execution, attracting developers who need scalable data access. But to unlock its full potential, you need efficient ways to extract meaningful data from its on-chain activity.
That’s where Chainbase comes in — offering powerful infrastructure for querying and processing blockchain data.
In this series, we’re covering three ways to access Sui’s MoveCall
transactions:
With Manuscript-GUI
With Manuscript-CLI
With Chainbase DataCloud
In this article, we’ll explore the second method: using the Manuscript-CLI. This approach is ideal for developers who prefer terminal-based workflows, want scriptable automation, and value full control over their data pipeline.
Prefer command-line tools? You can run everything from your terminal with manuscript-cli.
Install Manuscript-CLI
Prepare manuscript.yaml
Use the same structure as in GUI method
Edit manuscript.yaml
vim manuscript.yaml
name: sui_move_call
specVersion: v0.1.0
parallelism: 1
sources:
- name: sui_transactions
type: dataset
dataset: sui.sui_transactions
parallelism: 10
transforms:
- name: sui_move_call_transform
sql: >
select
checkpoint_timestamp,
checkpoint,
transaction_digest,
transaction,
CAST(
JSON_VALUE(
transaction, '$.MoveCall.function'
) AS STRING
) as `function`,
CAST(
JSON_VALUE(
transaction, '$.MoveCall.module'
) AS STRING
) as `module`,
CAST(
JSON_VALUE(
transaction, '$.MoveCall.package'
) AS STRING
) as `package`,
transactions
from
(
select
transaction_digest,
checkpoint_timestamp,
checkpoint,
transaction,
transactions
from
(
select
transaction_digest,
TO_TIMESTAMP(
FROM_UNIXTIME(
CAST(
JSON_VALUE(raw_data, '$.timestampMs') as BIGINT
) / 1000
)
) as checkpoint_timestamp,
CAST(
JSON_VALUE(raw_data, '$.checkpoint') AS BIGINT
) as checkpoint,
FROM_JSON (
JSON_QUERY(
raw_data, '$.transaction.data.transaction.transactions'
),
'Array<String>'
) as transactions_arr,
raw_data AS transactions
from
sui_transactions
where
raw_data like '%MoveCall%'
) as tt CROSS
JOIN UNNEST (transactions_arr) as t (transaction)
) as ttt
sinks:
- name: sui_move_call_sink
type: postgres
from: sui_move_call_transform
database: sui
schema: public
table: move_calls
primary_key: checkpoint_timestamp,checkpoint,transaction_digest,module,package,function
config:
host: postgres
port: 5432
username: postgres
password: postgres
Deploy manuscript locally
a. Check job status using use manuscript-cli list
manuscript-cli list
b. Check job status using docker
cd ~/manuscripts/sui_move_call/
docker compose ps -a
Query datasets
Check Flink job status and logs
Stop job
manuscript-cli stop sui_move_call
If you're comfortable in the terminal, Manuscript-CLI gives you power and precision. You can define your transformation logic, manage jobs, and monitor performance all via command line. It’s a great option for integrating Sui data workflows into automated systems or development pipelines — making it a favorite among engineers and data devs.
Over 5k subscribers