diff --git a/devnet/README.md b/devnet/README.md index 3d03945..b09c43b 100644 --- a/devnet/README.md +++ b/devnet/README.md @@ -10,6 +10,9 @@ export ROSETTA_OFFLINE=http://localhost:7092 Check the construction API: ``` +rosetta-cli check:construction --configuration-file devnet-construction-with-metadata.json \ +--online-url=${ROSETTA_ONLINE} --offline-url=${ROSETTA_OFFLINE} + rosetta-cli check:construction --configuration-file devnet-construction.json \ --online-url=${ROSETTA_ONLINE} --offline-url=${ROSETTA_OFFLINE} ``` diff --git a/devnet/devnet-construction-with-metadata.json b/devnet/devnet-construction-with-metadata.json new file mode 100644 index 0000000..c9e6bca --- /dev/null +++ b/devnet/devnet-construction-with-metadata.json @@ -0,0 +1,35 @@ +{ + "network": { + "blockchain": "Elrond", + "network": "devnet" + }, + "data_directory": "", + "http_timeout": 200, + "max_retries": 3, + "max_online_connections": 120, + "max_sync_concurrency": 1, + "construction": { + "end_conditions": { + "transfer": 2 + }, + "stale_depth": 10, + "broadcast_limit": 5, + "constructor_dsl_file": "devnet-construction-with-metadata.ros", + "prefunded_accounts": [ + { + "account_identifier": { + "address": "erd1ldjsdetjvegjdnda0qw2h62kq6rpvrklkc5pw9zxm0nwulfhtyqqtyc4vq" + }, + "privkey": "3e4e89e501eb542c12403fb15c52479e8721f2f4dedc3b3ef0f3b47b37de006c", + "curve_type": "edwards25519", + "currency": { + "symbol": "XeGLD", + "decimals": 18 + } + } + ] + }, + "data": { + "inactive_discrepancy_search_disabled": true + } +} diff --git a/devnet/devnet-construction-with-metadata.ros b/devnet/devnet-construction-with-metadata.ros new file mode 100644 index 0000000..6515d12 --- /dev/null +++ b/devnet/devnet-construction-with-metadata.ros @@ -0,0 +1,37 @@ +transfer(1){ + transfer{ + transfer.network = {"network":"devnet", "blockchain":"Elrond"}; + elrond_currency = {"symbol":"XeGLD", "decimals":18}; + sender = { + "account_identifier": { + "address": "erd1ldjsdetjvegjdnda0qw2h62kq6rpvrklkc5pw9zxm0nwulfhtyqqtyc4vq" + }, + "currency": { + "symbol": "XeGLD", + "decimals": 18 + } + }; + + max_transfer_amount = "10000000000000000"; + recipient_amount = random_number({"minimum": "1", "maximum": {{max_transfer_amount}}}); + + print_message({"recipient_amount":{{recipient_amount}}}); + + sender_amount = 0-{{recipient_amount}}; + transfer.confirmation_depth = "10"; + transfer.operations = [ + { + "operation_identifier":{"index":0}, + "type":"Transfer", + "account":{{sender.account_identifier}}, + "amount":{ + "value":{{sender_amount}}, + "currency":{{elrond_currency}} + } + } + ]; + transfer.preprocess_metadata = { + "receiver": "erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th" + }; + } +} diff --git a/devnet/devnet-construction.json b/devnet/devnet-construction.json index e9e0742..c4e656f 100644 --- a/devnet/devnet-construction.json +++ b/devnet/devnet-construction.json @@ -30,9 +30,6 @@ ] }, "data": { - "historical_balance_disabled": true, - "reconciliation_disabled": true, - "inactive_discrepancy_search_disabled": true, - "balance_tracking_disabled": true + "inactive_discrepancy_search_disabled": true } } diff --git a/devnet/devnet-construction.ros b/devnet/devnet-construction.ros index f3f37bc..338c64d 100644 --- a/devnet/devnet-construction.ros +++ b/devnet/devnet-construction.ros @@ -6,8 +6,6 @@ transfer(1){ "account_identifier": { "address": "erd1ldjsdetjvegjdnda0qw2h62kq6rpvrklkc5pw9zxm0nwulfhtyqqtyc4vq" }, - "privkey": "3e4e89e501eb542c12403fb15c52479e8721f2f4dedc3b3ef0f3b47b37de006c", - "curve_type": "edwards25519", "currency": { "symbol": "XeGLD", "decimals": 18 @@ -25,8 +23,6 @@ transfer(1){ "account_identifier": { "address": "erd1xtslmt67utuewwv8jsx729mxjxaa8dvyyzp7492hy99dl7hvcuqq30l98v" }, - "privkey": "e2cfd1bf75bd3d2f7a5cdc35f0d9d0ed395185e3beab941e0d03f5f8f9da4dec", - "curve_type": "edwards25519", "currency": { "symbol": "XeGLD", "decimals": 18