Skip to content

Instantly share code, notes, and snippets.

@yourbuddyconner
Created February 22, 2021 20:24
Show Gist options
  • Save yourbuddyconner/89837c85b409439bdd07acdd37425e34 to your computer and use it in GitHub Desktop.
Save yourbuddyconner/89837c85b409439bdd07acdd37425e34 to your computer and use it in GitHub Desktop.
Rosetta conf file for mina-rosetta
{
"network": {
"blockchain": "coda",
"network": "testnet"
},
"online_url": "http://localhost:3087",
"data_directory": "",
"http_timeout": 500,
"max_sync_concurrency": 64,
"retry_elapsed_time": 0,
"tip_delay": 300,
"log_configuration": false,
"construction": {
"offline_url": "http://localhost:3087",
"stale_depth": 0,
"broadcast_limit": 0,
"ignore_broadcast_failures": false,
"clear_broadcasts": false,
"broadcast_behind_tip": false,
"block_broadcast_limit": 0,
"rebroadcast_all": false,
"workflows": [
{
"name": "request_funds",
"concurrency": 1,
"scenarios": [
{
"name": "find_address",
"actions": [
{
"input": "{\"symbol\":\"CODA\", \"decimals\":9}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "{\"minimum_balance\":{\"value\": \"0\", \"currency\": {{currency}}}, \"create_limit\":1}",
"type": "find_balance",
"output_path": "random_address"
}
]
},
{
"name": "request",
"actions": [
{
"input": "{\"address\": {{random_address.account.address}}, \"minimum_balance\":{\"value\": \"10000000000000000\", \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "loaded_address"
}
]
}
]
},
{
"name": "create_account",
"concurrency": 1,
"scenarios": [
{
"name": "create_account",
"actions": [
{
"input": "{\"network\":\"testnet\", \"blockchain\":\"coda\"}",
"type": "set_variable",
"output_path": "network"
},
{
"input": "{\"curve_type\": \"secp256k1\"}",
"type": "generate_key",
"output_path": "key"
},
{
"input": "{\"network_identifier\": {{network}}, \"public_key\": {{key.public_key}}}",
"type": "derive",
"output_path": "address"
},
{
"input": "{\"address\": {{address.address}}, \"keypair\": {{key}}}",
"type": "save_address"
}
]
}
]
},
{
"name": "transfer",
"concurrency": 10,
"scenarios": [
{
"name": "transfer",
"actions": [
{
"input": "{\"network\":\"coda\", \"blockchain\":\"testnet\"}",
"type": "set_variable",
"output_path": "transfer.network"
},
{
"input": "{\"symbol\":\"CODA\", \"decimals\":9}",
"type": "set_variable",
"output_path": "currency"
},
{
"input": "{\"minimum_balance\":{\"value\": \"10000000000000000\", \"currency\": {{currency}}}}",
"type": "find_balance",
"output_path": "sender"
},
{
"input": "\"42000000000000\"",
"type": "set_variable",
"output_path": "max_fee"
},
{
"input": "{\"operation\":\"subtraction\", \"left_value\": {{sender.balance.value}}, \"right_value\": {{max_fee}}}",
"type": "math",
"output_path": "available_amount"
},
{
"input": "{\"minimum\": \"1\", \"maximum\": {{available_amount}}}",
"type": "random_number",
"output_path": "recipient_amount"
},
{
"input": "{\"recipient_amount\":{{recipient_amount}}}",
"type": "print_message"
},
{
"input": "{\"operation\":\"subtraction\", \"left_value\": \"0\", \"right_value\":{{recipient_amount}}}",
"type": "math",
"output_path": "sender_amount"
},
{
"input": "{\"not_address\":[{{sender.account.address}}], \"minimum_balance\":{\"value\": \"0\", \"currency\": {{currency}}}, \"create_limit\": 100, \"create_probability\": 50}",
"type": "find_balance",
"output_path": "recipient"
},
{
"input": "\"1\"",
"type": "set_variable",
"output_path": "transfer.confirmation_depth"
},
{
"input": "[{\"operation_identifier\":{\"index\":0},\"type\":\"transfer\",\"account\":{\"address\":{{sender.account.address}}},\"amount\":{\"value\":{{sender_amount}},\"currency\":{{currency}}}},{\"operation_identifier\":{\"index\":1},\"type\":\"transfer\",\"account\":{\"address\":{{recipient.account.address}}},\"amount\":{\"value\":{{recipient_amount}},\"currency\":{{currency}}}}]",
"type": "set_variable",
"output_path": "transfer.operations"
}
]
}
]
}
],
"end_conditions": {
"create_account": 10,
"transfer": 10
}
},
"data": {
"active_reconciliation_concurrency": 16,
"inactive_reconciliation_concurrency": 4,
"inactive_reconciliation_frequency": 250,
"log_blocks": false,
"log_transactions": false,
"log_balance_changes": false,
"log_reconciliations": false,
"ignore_reconciliation_error": false,
"exempt_accounts": "",
"bootstrap_balances": "bootstrap_balances.json",
"interesting_accounts": "",
"reconciliation_disabled": false,
"inactive_discrepency_search_disabled": false,
"balance_tracking_disabled": false,
"coin_tracking_disabled": false,
"results_output_file": ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment