Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Identity Registration Transaction Script

This Go program reads identity registration records from a JSON file and submits them as transactions to a ShutterRegistry smart contract using batch JSON-RPC calls.

Installation

git clone <this-repo>
cd identity-registration-tx-script
go mod tidy

Usage

Basic run:

go run . \
  -rpc <RPC_URL> \
  -registry <SHUTTER_REGISTRY_ADDRESS> \
  -private-key <HEX_PRIVATE_KEY>

Useful flags:

  • -input (string): Path to JSON file with sorted records (default: data/sorted_id_registered_eon11_1772092868.json)
  • -rpc (string): JSON-RPC URL (required unless you hard-code it in main.go)
  • -registry (string): ShutterRegistry contract address
  • -private-key (string): Sender private key in hex (required unless using -dry-run)
  • -expected-sender (string): Expected sender address; used in dry-run when -private-key is not provided
  • -batch-size (int): Number of transactions per batch RPC call (default: 50)
  • -start-index (int): Index in the records array to start from (for resuming)
  • -limit (int): Maximum number of records to process (0 = all)
  • -dry-run (bool): Print what would be done without sending transactions

Dry-run example

go run . \
  -input data/sorted_id_registered_eon11_1772092868.json \
  -expected-sender 0x... \
  -dry-run

This will log which identities would be registered, without actually sending transactions. The pre-scan verifies that every record's sender matches -private-key (or -expected-sender in dry-run); the run aborts if any do not.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages