diff --git a/.env.example b/.env.example index d7379cb..8a40043 100644 --- a/.env.example +++ b/.env.example @@ -666,6 +666,61 @@ MODULE_litecoin-mweb_NODES[]=http://login:password@127.0.0.2:1234/ MODULE_litecoin-mweb_REQUESTER_TIMEOUT=60 MODULE_litecoin-mweb_REQUESTER_THREADS=12 +#################### +# Main Merlin Module +#################### + +MODULES[]=merlin-main +MODULE_merlin-main_CLASS=MerlinMainModule +MODULE_merlin-main_NODES[]=http://login:password@127.0.0.1:1234/ +MODULE_merlin-main_NODES[]=http://login:password@127.0.0.2:1234/ +MODULE_merlin-main_REQUESTER_TIMEOUT=60 +MODULE_merlin-main_REQUESTER_THREADS=12 + +###################### +## Trace Merlin Module +###################### + +MODULES[]=merlin-trace +MODULE_merlin-trace_CLASS=MerlinTraceModule +MODULE_merlin-trace_NODES[]=http://login:password@127.0.0.1:1234/ +MODULE_merlin-trace_NODES[]=http://login:password@127.0.0.2:1234/ +MODULE_merlin-trace_REQUESTER_TIMEOUT=60 +MODULE_merlin-trace_REQUESTER_THREADS=12 + +###################### +## ERC20 Merlin Module +###################### + +MODULES[]=merlin-erc-20 +MODULE_merlin-erc-20_CLASS=MerlinERC20Module +MODULE_merlin-erc-20_NODES[]=http://login:password@127.0.0.1:1234/ +MODULE_merlin-erc-20_NODES[]=http://login:password@127.0.0.2:1234/ +MODULE_merlin-erc-20_REQUESTER_TIMEOUT=60 +MODULE_merlin-erc-20_REQUESTER_THREADS=12 + +####################### +## ERC721 Merlin Module +####################### + +MODULES[]=merlin-erc-721 +MODULE_merlin-erc-721_CLASS=MerlinERC721Module +MODULE_merlin-erc-721_NODES[]=http://login:password@127.0.0.1:1234/ +MODULE_merlin-erc-721_NODES[]=http://login:password@127.0.0.2:1234/ +MODULE_merlin-erc-721_REQUESTER_TIMEOUT=60 +MODULE_merlin-erc-721_REQUESTER_THREADS=12 + +######################### +## ERC-1155 Merlin Module +######################### + +MODULES[]=merlin-erc-1155 +MODULE_merlin-erc-1155_CLASS=MerlinERC1155Module +MODULE_merlin-erc-1155_NODES[]=http://login:password@127.0.0.1:1234/ +MODULE_merlin-erc-1155_NODES[]=http://login:password@127.0.0.2:1234/ +MODULE_merlin-erc-1155_REQUESTER_TIMEOUT=60 +MODULE_merlin-erc-1155_REQUESTER_THREADS=12 + ####################### ## Main Optimism Module ####################### diff --git a/Modules/MerlinERC1155Module.php b/Modules/MerlinERC1155Module.php new file mode 100644 index 0000000..95e2f2d --- /dev/null +++ b/Modules/MerlinERC1155Module.php @@ -0,0 +1,26 @@ +blockchain = 'merlin'; + $this->module = 'merlin-erc-1155'; + $this->is_main = false; + $this->first_block_date = '2024-02-02'; + $this->first_block_id = 0; + + $this->extra_features = [EVMSpecialFeatures::zkEVM]; + + $this->tests = [ + ['block' => 1546384, 'result' => 'a:2:{s:6:"events";a:2:{i:0;a:8:{s:11:"transaction";s:66:"0x891e356287d20f100f61e02d9862cd6ee1e4b29f234ab4fa1972ca160e80f3ae";s:8:"currency";s:42:"0x5e68be9a532eadf5edcbc2bec857d3d4b2e3aec5";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:0;s:6:"effect";s:2:"-1";s:5:"extra";s:1:"2";s:5:"block";i:1546384;s:4:"time";s:19:"2024-05-15 08:10:21";}i:1;a:8:{s:11:"transaction";s:66:"0x891e356287d20f100f61e02d9862cd6ee1e4b29f234ab4fa1972ca160e80f3ae";s:8:"currency";s:42:"0x5e68be9a532eadf5edcbc2bec857d3d4b2e3aec5";s:7:"address";s:42:"0xe0a5996cebbc85d5188d8f1e85ccff8c64f2dba3";s:8:"sort_key";i:1;s:6:"effect";s:1:"1";s:5:"extra";s:1:"2";s:5:"block";i:1546384;s:4:"time";s:19:"2024-05-15 08:10:21";}}s:10:"currencies";a:1:{i:0;a:3:{s:2:"id";s:42:"0x5e68be9a532eadf5edcbc2bec857d3d4b2e3aec5";s:4:"name";s:0:"";s:6:"symbol";s:0:"";}}}'], + ]; + } +} diff --git a/Modules/MerlinERC20Module.php b/Modules/MerlinERC20Module.php new file mode 100644 index 0000000..a7b38c5 --- /dev/null +++ b/Modules/MerlinERC20Module.php @@ -0,0 +1,26 @@ +blockchain = 'merlin'; + $this->module = 'merlin-erc-20'; + $this->is_main = false; + $this->first_block_date = '2024-02-02'; + $this->first_block_id = 0; + + $this->extra_features = [EVMSpecialFeatures::zkEVM]; + + $this->tests = [ + ['block' => 1546383, 'result' => 'a:2:{s:6:"events";a:2:{i:0;a:7:{s:11:"transaction";s:66:"0x6615d37b5f1905b14bf581998e8f0d3dbb553c7de3c1f3a5b4ed5cc0d83eaeb5";s:8:"currency";s:42:"0x32a4b8b10222f85301874837f27f4c416117b811";s:7:"address";s:42:"0x3b248606bc8d7f7101c5a84c2e7b68628dc18aa2";s:8:"sort_key";i:0;s:6:"effect";s:12:"-88980600000";s:5:"block";i:1546383;s:4:"time";s:19:"2024-05-15 08:10:15";}i:1;a:7:{s:11:"transaction";s:66:"0x6615d37b5f1905b14bf581998e8f0d3dbb553c7de3c1f3a5b4ed5cc0d83eaeb5";s:8:"currency";s:42:"0x32a4b8b10222f85301874837f27f4c416117b811";s:7:"address";s:42:"0x778ff94195adde29a05a92b0e9031e44e2efdb8e";s:8:"sort_key";i:1;s:6:"effect";s:11:"88980600000";s:5:"block";i:1546383;s:4:"time";s:19:"2024-05-15 08:10:15";}}s:10:"currencies";a:1:{i:0;a:4:{s:2:"id";s:42:"0x32a4b8b10222f85301874837f27f4c416117b811";s:4:"name";s:8:"E•MOON";s:6:"symbol";s:26:"DOG•GO•TO•THE•MOON";s:8:"decimals";i:5;}}}'], + ]; + } +} diff --git a/Modules/MerlinERC721Module.php b/Modules/MerlinERC721Module.php new file mode 100644 index 0000000..5ed58d3 --- /dev/null +++ b/Modules/MerlinERC721Module.php @@ -0,0 +1,26 @@ +blockchain = 'merlin'; + $this->module = 'merlin-erc-721'; + $this->is_main = false; + $this->first_block_date = '2024-02-02'; + $this->first_block_id = 0; + + $this->extra_features = [EVMSpecialFeatures::zkEVM]; + + $this->tests = [ + ['block' => 1546385, 'result' => 'a:2:{s:6:"events";a:14:{i:0;a:8:{s:11:"transaction";s:66:"0x63ff2d02067f6fb8adad2411d18196c4ae140d765dc5f1a36a99ce4ccb8b9ea9";s:8:"currency";s:42:"0xd32e14cc9aa5413622fd00b28e50adfbf25c7ef8";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:0;s:6:"effect";s:2:"-1";s:5:"extra";s:4:"8259";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:1;a:8:{s:11:"transaction";s:66:"0x63ff2d02067f6fb8adad2411d18196c4ae140d765dc5f1a36a99ce4ccb8b9ea9";s:8:"currency";s:42:"0xd32e14cc9aa5413622fd00b28e50adfbf25c7ef8";s:7:"address";s:42:"0xc72ad28e8fdeaa23e05da938b3309d85e3121745";s:8:"sort_key";i:1;s:6:"effect";s:1:"1";s:5:"extra";s:4:"8259";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:2;a:8:{s:11:"transaction";s:66:"0x63ff2d02067f6fb8adad2411d18196c4ae140d765dc5f1a36a99ce4ccb8b9ea9";s:8:"currency";s:42:"0xd32e14cc9aa5413622fd00b28e50adfbf25c7ef8";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:2;s:6:"effect";s:2:"-1";s:5:"extra";s:4:"9892";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:3;a:8:{s:11:"transaction";s:66:"0x63ff2d02067f6fb8adad2411d18196c4ae140d765dc5f1a36a99ce4ccb8b9ea9";s:8:"currency";s:42:"0xd32e14cc9aa5413622fd00b28e50adfbf25c7ef8";s:7:"address";s:42:"0xc72ad28e8fdeaa23e05da938b3309d85e3121745";s:8:"sort_key";i:3;s:6:"effect";s:1:"1";s:5:"extra";s:4:"9892";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:4;a:8:{s:11:"transaction";s:66:"0x63ff2d02067f6fb8adad2411d18196c4ae140d765dc5f1a36a99ce4ccb8b9ea9";s:8:"currency";s:42:"0xd32e14cc9aa5413622fd00b28e50adfbf25c7ef8";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:4;s:6:"effect";s:2:"-1";s:5:"extra";s:4:"9917";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:5;a:8:{s:11:"transaction";s:66:"0x63ff2d02067f6fb8adad2411d18196c4ae140d765dc5f1a36a99ce4ccb8b9ea9";s:8:"currency";s:42:"0xd32e14cc9aa5413622fd00b28e50adfbf25c7ef8";s:7:"address";s:42:"0xc72ad28e8fdeaa23e05da938b3309d85e3121745";s:8:"sort_key";i:5;s:6:"effect";s:1:"1";s:5:"extra";s:4:"9917";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:6;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:6;s:6:"effect";s:2:"-1";s:5:"extra";s:5:"13565";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:7;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0xc72ad28e8fdeaa23e05da938b3309d85e3121745";s:8:"sort_key";i:7;s:6:"effect";s:1:"1";s:5:"extra";s:5:"13565";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:8;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:8;s:6:"effect";s:2:"-1";s:5:"extra";s:4:"4009";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:9;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0xc72ad28e8fdeaa23e05da938b3309d85e3121745";s:8:"sort_key";i:9;s:6:"effect";s:1:"1";s:5:"extra";s:4:"4009";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:10;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:10;s:6:"effect";s:2:"-1";s:5:"extra";s:5:"32069";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:11;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0xc72ad28e8fdeaa23e05da938b3309d85e3121745";s:8:"sort_key";i:11;s:6:"effect";s:1:"1";s:5:"extra";s:5:"32069";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:12;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:12;s:6:"effect";s:2:"-1";s:5:"extra";s:5:"32070";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}i:13;a:8:{s:11:"transaction";s:66:"0x42e1c312f6369805c47b48309fa4447a0844ca4322373f1ea6946a4573fd8564";s:8:"currency";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:7:"address";s:42:"0xc72ad28e8fdeaa23e05da938b3309d85e3121745";s:8:"sort_key";i:13;s:6:"effect";s:1:"1";s:5:"extra";s:5:"32070";s:5:"block";i:1546385;s:4:"time";s:19:"2024-05-15 08:10:28";}}s:10:"currencies";a:2:{i:0;a:3:{s:2:"id";s:42:"0xd32e14cc9aa5413622fd00b28e50adfbf25c7ef8";s:4:"name";s:21:"Merlin\'s Seal BRC-420";s:6:"symbol";s:9:"M-BRC-420";}i:1;a:3:{s:2:"id";s:42:"0x1eb48c61402502c655e6a59b30e9f1c93121f701";s:4:"name";s:2:"Ts";s:6:"symbol";s:22:"M-This song about NFTs";}}}'], + ]; + } +} diff --git a/Modules/MerlinMainModule.php b/Modules/MerlinMainModule.php new file mode 100644 index 0000000..0677c4f --- /dev/null +++ b/Modules/MerlinMainModule.php @@ -0,0 +1,30 @@ +blockchain = 'merlin'; + $this->module = 'merlin-main'; + $this->is_main = true; + $this->first_block_date = '2024-02-02'; + $this->first_block_id = 0; + $this->currency = 'merlin-bitcoin'; + $this->currency_details = ['name' => 'Bitcoin', 'symbol' => 'BTC', 'decimals' => 18, 'description' => null]; // https://docs.merlinchain.io/merlin-docs/developers/builder-guides/fees/gas#gas-token + + // EVMMainModule + $this->evm_implementation = EVMImplementation::geth; + $this->extra_features = []; // https://docs.merlinchain.io/merlin-docs/developers/builder-guides/fees + $this->reward_function = function($block_id) + { + return '0'; + }; + } +} diff --git a/Modules/MerlinTraceModule.php b/Modules/MerlinTraceModule.php new file mode 100644 index 0000000..415f374 --- /dev/null +++ b/Modules/MerlinTraceModule.php @@ -0,0 +1,26 @@ +blockchain = 'merlin'; + $this->module = 'merlin-trace'; + $this->complements = 'merlin-main'; + $this->is_main = false; + $this->first_block_date = '2024-02-02'; + $this->first_block_id = 0; + + // EVMTraceModule + $this->evm_implementation = EVMImplementation::geth; + $this->extra_features = [EVMSpecialFeatures::zkEVM]; + } +}