Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,61 @@ MODULE_xrp-ledger-nft_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_xrp-ledger-nft_REQUESTER_TIMEOUT=60
MODULE_xrp-ledger-nft_REQUESTER_THREADS=12

#####################
# Scroll Main Module
######################

MODULES[]=scroll-main
MODULE_scroll-main_CLASS=ScrollMainModule
MODULE_scroll-main_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_scroll-main_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_scroll-main_REQUESTER_TIMEOUT=60
MODULE_scroll-main_REQUESTER_THREADS=1

######################
## Trace Scroll Module
######################

MODULES[]=scroll-trace
MODULE_scroll-trace_CLASS=ScrollTraceModule
MODULE_scroll-trace_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_scroll-trace_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_scroll-trace_REQUESTER_TIMEOUT=60
MODULE_scroll-trace_REQUESTER_THREADS=12

######################
## ERC20 Scroll Module
######################

MODULES[]=scroll-erc-20
MODULE_scroll-erc-20_CLASS=ScrollERC20Module
MODULE_scroll-erc-20_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_scroll-erc-20_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_scroll-erc-20_REQUESTER_TIMEOUT=60
MODULE_scroll-erc-20_REQUESTER_THREADS=12

######################
## ERC721 Scroll Module
######################

MODULES[]=scroll-erc-721
MODULE_scroll-erc-721_CLASS=ScrollERC721Module
MODULE_scroll-erc-721_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_scroll-erc-721_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_scroll-erc-721_REQUESTER_TIMEOUT=60
MODULE_scroll-erc-721_REQUESTER_THREADS=12

###########################
## ERC-1155 Scroll Module
###########################

MODULES[]=scroll-erc-1155
MODULE_scroll-erc-1155_CLASS=ScrollERC1155Module
MODULE_scroll-erc-1155_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_scroll-erc-1155_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_scroll-erc-1155_REQUESTER_TIMEOUT=60
MODULE_scroll-erc-1155_REQUESTER_THREADS=12

#####################
## Ton Minimal Module
#####################
Expand Down
24 changes: 24 additions & 0 deletions Modules/ScrollERC1155Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, nikzh@nikzh.com
* Copyright (c) 2023-2024 3xpl developers, 3@3xpl.com, see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

/* This module processes ERC-1155 MT transfers in Scroll. It requires a geth node to run. */

final class ScrollERC1155Module extends EVMERC1155Module implements Module, MultipleBalanceSpecial
{
function initialize()
{
// CoreModule
$this->blockchain = 'scroll';
$this->module = 'scroll-erc-1155';
$this->is_main = false;
$this->first_block_date = '2023-09-10';
$this->first_block_id = 0;

$this->tests = [
['block' => 9781613, 'result' => 'a:2:{s:6:"events";a:2:{i:0;a:8:{s:11:"transaction";s:66:"0x57ff329e870277cc4d96511369c613edba1fbc69244c20d831c1b42970afba75";s:8:"currency";s:42:"0xdc3d8318fbaec2de49281843f5bba22e78338146";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:0;s:6:"effect";s:2:"-1";s:5:"extra";s:1:"3";s:5:"block";i:9781613;s:4:"time";s:19:"2024-10-01 18:06:58";}i:1;a:8:{s:11:"transaction";s:66:"0x57ff329e870277cc4d96511369c613edba1fbc69244c20d831c1b42970afba75";s:8:"currency";s:42:"0xdc3d8318fbaec2de49281843f5bba22e78338146";s:7:"address";s:42:"0xb70aac8d62917b2cffbe7f4059ea9d64fc52f215";s:8:"sort_key";i:1;s:6:"effect";s:1:"1";s:5:"extra";s:1:"3";s:5:"block";i:9781613;s:4:"time";s:19:"2024-10-01 18:06:58";}}s:10:"currencies";a:1:{i:0;a:3:{s:2:"id";s:42:"0xdc3d8318fbaec2de49281843f5bba22e78338146";s:4:"name";s:16:"Rubyscore_Scroll";s:6:"symbol";s:16:"Rubyscore_Scroll";}}}'],
];
}
}
24 changes: 24 additions & 0 deletions Modules/ScrollERC20Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, nikzh@nikzh.com
* Copyright (c) 2023-2024 3xpl developers, 3@3xpl.com, see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

/* This module processes ERC-20 token transfers in Scroll. It requires a geth node to run. */

final class ScrollERC20Module extends EVMERC20Module implements Module, MultipleBalanceSpecial, SupplySpecial
{
function initialize()
{
// CoreModule
$this->blockchain = 'scroll';
$this->module = 'scroll-erc-20';
$this->is_main = false;
$this->first_block_date = '2023-09-10';
$this->first_block_id = 0;

$this->tests = [
['block' => 9781504, 'result' => 'a:2:{s:6:"events";a:8:{i:0;a:7:{s:11:"transaction";s:66:"0x230344f4bad4f6576ebbbe0948e7fb312415b65c3d8079e353289dc2ae90b120";s:8:"currency";s:42:"0x80137510979822322193fc997d400d5a6c747bf7";s:7:"address";s:42:"0x9a412fe6d0a0ff7a0e1b82982d64ede57877f705";s:8:"sort_key";i:0;s:6:"effect";s:17:"-9882841257127068";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:1;a:7:{s:11:"transaction";s:66:"0x230344f4bad4f6576ebbbe0948e7fb312415b65c3d8079e353289dc2ae90b120";s:8:"currency";s:42:"0x80137510979822322193fc997d400d5a6c747bf7";s:7:"address";s:42:"0xaaaaaaaacb71bf2c8cae522ea5fa455571a74106";s:8:"sort_key";i:1;s:6:"effect";s:16:"9882841257127068";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:2;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:8:"currency";s:42:"0x5300000000000000000000000000000000000004";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:2;s:6:"effect";s:16:"-100000000000000";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:3;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:8:"currency";s:42:"0x5300000000000000000000000000000000000004";s:7:"address";s:42:"0x6c403dba21f072e16b7de2b013f8adeae9c2e76e";s:8:"sort_key";i:3;s:6:"effect";s:15:"100000000000000";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:4;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:8:"currency";s:42:"0x06efdbff2a14a7c8e15944d1f4a48f9f95f663a4";s:7:"address";s:42:"0x9e59ecd8d3891afa9d9b9d6562653d5be720cd17";s:8:"sort_key";i:4;s:6:"effect";s:7:"-250716";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:5;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:8:"currency";s:42:"0x06efdbff2a14a7c8e15944d1f4a48f9f95f663a4";s:7:"address";s:42:"0x020f3db4ac970c8199144cda9fe6129439e02650";s:8:"sort_key";i:5;s:6:"effect";s:6:"250716";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:6;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:8:"currency";s:42:"0x5300000000000000000000000000000000000004";s:7:"address";s:42:"0x6c403dba21f072e16b7de2b013f8adeae9c2e76e";s:8:"sort_key";i:6;s:6:"effect";s:16:"-100000000000000";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:7;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:8:"currency";s:42:"0x5300000000000000000000000000000000000004";s:7:"address";s:42:"0x9e59ecd8d3891afa9d9b9d6562653d5be720cd17";s:8:"sort_key";i:7;s:6:"effect";s:15:"100000000000000";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}}s:10:"currencies";a:3:{i:0;a:4:{s:2:"id";s:42:"0x80137510979822322193fc997d400d5a6c747bf7";s:4:"name";s:16:"StakeStone Ether";s:6:"symbol";s:5:"STONE";s:8:"decimals";i:18;}i:1;a:4:{s:2:"id";s:42:"0x5300000000000000000000000000000000000004";s:4:"name";s:13:"Wrapped Ether";s:6:"symbol";s:4:"WETH";s:8:"decimals";i:18;}i:2;a:4:{s:2:"id";s:42:"0x06efdbff2a14a7c8e15944d1f4a48f9f95f663a4";s:4:"name";s:8:"USD Coin";s:6:"symbol";s:4:"USDC";s:8:"decimals";i:6;}}}'],
];
}
}
24 changes: 24 additions & 0 deletions Modules/ScrollERC721Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, nikzh@nikzh.com
* Copyright (c) 2023-2024 3xpl developers, 3@3xpl.com, see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

/* This module processes ERC-721 NFT transfers in Scroll. It requires a geth node to run. */

final class ScrollERC721Module extends EVMERC721Module implements Module, MultipleBalanceSpecial
{
function initialize()
{
// CoreModule
$this->blockchain = 'scroll';
$this->module = 'scroll-erc-721';
$this->is_main = false;
$this->first_block_date = '2023-09-10';
$this->first_block_id = 0;

$this->tests = [
['block' => 9781504, 'result' => 'a:2:{s:6:"events";a:2:{i:0;a:8:{s:11:"transaction";s:66:"0x9f4f1316a31467a657ea9ce6773f3e793a496d125250dba793d56a9ae50ff3cc";s:8:"currency";s:42:"0x5f64a9752228b60bf406c7b2ee77283da4b4c7ed";s:7:"address";s:42:"0x0000000000000000000000000000000000000000";s:8:"sort_key";i:0;s:6:"effect";s:2:"-1";s:5:"extra";s:5:"13605";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:1;a:8:{s:11:"transaction";s:66:"0x9f4f1316a31467a657ea9ce6773f3e793a496d125250dba793d56a9ae50ff3cc";s:8:"currency";s:42:"0x5f64a9752228b60bf406c7b2ee77283da4b4c7ed";s:7:"address";s:42:"0x6fcb4542217424f459f0cbc2120cbb3947cf8e53";s:8:"sort_key";i:1;s:6:"effect";s:1:"1";s:5:"extra";s:5:"13605";s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}}s:10:"currencies";a:1:{i:0;a:3:{s:2:"id";s:42:"0x5f64a9752228b60bf406c7b2ee77283da4b4c7ed";s:4:"name";s:12:"OmniHubNames";s:6:"symbol";s:3:"OHN";}}}'],
];
}
}
39 changes: 39 additions & 0 deletions Modules/ScrollMainModule.php

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions Modules/ScrollTraceModule.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, nikzh@nikzh.com
* Copyright (c) 2023-2024 3xpl developers, 3@3xpl.com, see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

/* This is the Scroll trace module. It requires a geth node to run. */

final class ScrollTraceModule extends EVMTraceModule implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'scroll';
$this->module = 'scroll-trace';
$this->complements = 'scroll-main';
$this->is_main = false;
$this->first_block_date = '2023-09-10';
$this->first_block_id = 0;

// EVMTraceModule
$this->evm_implementation = EVMImplementation::geth;

$this->tests = [
['block' => 9781504, 'result' => 'a:2:{s:6:"events";a:2:{i:0;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:7:"address";s:42:"0x6c403dba21f072e16b7de2b013f8adeae9c2e76e";s:8:"sort_key";i:0;s:6:"effect";s:16:"-100000000000000";s:5:"extra";N;s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}i:1;a:7:{s:11:"transaction";s:66:"0x8185f8a7933e2476765c0cde11fcee641e7a0ec277a1e1074cc8db063c33436a";s:7:"address";s:42:"0x5300000000000000000000000000000000000004";s:8:"sort_key";i:1;s:6:"effect";s:15:"100000000000000";s:5:"extra";N;s:5:"block";i:9781504;s:4:"time";s:19:"2024-10-01 18:01:31";}}s:10:"currencies";N;}'],
];
}
}