Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Galactica EVM support (testnet) #88

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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 @@ -523,6 +523,61 @@ MODULE_fantom-erc-1155_NODES[]=http://login:[email protected]:1234/
MODULE_fantom-erc-1155_REQUESTER_TIMEOUT=60
MODULE_fantom-erc-1155_REQUESTER_THREADS=12

########################
## Main Galactica EVM Module
########################

MODULES[]=galactica-evm-main
MODULE_galactica-evm-main_CLASS=GalacticaEVMMainModule
MODULE_galactica-evm-main_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-main_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-main_REQUESTER_TIMEOUT=60
MODULE_galactica-evm-main_REQUESTER_THREADS=12

#########################
## ERC-20 Galactica EVM Module
#########################

MODULES[]=galactica-evm-erc-20
MODULE_galactica-evm-erc-20_CLASS=GalacticaEVMERC20Module
MODULE_galactica-evm-erc-20_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-erc-20_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-erc-20_REQUESTER_TIMEOUT=60
MODULE_galactica-evm-erc-20_REQUESTER_THREADS=12

##########################
## ERC-721 Galactica EVM Module
##########################

MODULES[]=galactica-evm-erc-721
MODULE_galactica-evm-erc-721_CLASS=GalacticaEVMERC721Module
MODULE_galactica-evm-erc-721_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-erc-721_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-erc-721_REQUESTER_TIMEOUT=60
MODULE_galactica-evm-erc-721_REQUESTER_THREADS=12

###########################
## ERC-1155 Galactica EVM Module
###########################

MODULES[]=galactica-evm-erc-1155
MODULE_galactica-evm-erc-1155_CLASS=GalacticaEVMERC1155Module
MODULE_galactica-evm-erc-1155_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-erc-1155_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-erc-1155_REQUESTER_TIMEOUT=60
MODULE_galactica-evm-erc-1155_REQUESTER_THREADS=12

#########################
## Trace Galactica EVM Module
#########################

MODULES[]=galactica-evm-trace
MODULE_galactica-evm-trace_CLASS=GalacticaEVMTraceModule
MODULE_galactica-evm-trace_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-trace_NODES[]=http://login:[email protected]:1234/
MODULE_galactica-evm-trace_REQUESTER_TIMEOUT=60
MODULE_galactica-evm-trace_REQUESTER_THREADS=12

###########################
## Main Gnosis Chain Module
###########################
Expand Down
20 changes: 20 additions & 0 deletions Modules/GalacticaEVMERC1155Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, [email protected]
* Copyright (c) 2023-2024 3xpl developers, [email protected], see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

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

final class GalacticaEVMERC1155Module extends EVMERC1155Module implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'galactica-evm';
$this->module = 'galactica-evm-erc-1155';
$this->is_main = false;
$this->first_block_date = '2024-04-08';
$this->first_block_id = 0;
}
}
20 changes: 20 additions & 0 deletions Modules/GalacticaEVMERC20Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, [email protected]
* Copyright (c) 2023-2024 3xpl developers, [email protected], see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

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

final class GalacticaEVMERC20Module extends EVMERC20Module implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'galactica-evm';
$this->module = 'galactica-evm-erc-20';
$this->is_main = false;
$this->first_block_date = '2024-04-08';
$this->first_block_id = 0;
}
}
20 changes: 20 additions & 0 deletions Modules/GalacticaEVMERC721Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, [email protected]
* Copyright (c) 2023-2024 3xpl developers, [email protected], see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

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

final class GalacticaEVMERC721Module extends EVMERC721Module implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'galactica-evm';
$this->module = 'galactica-evm-erc-721';
$this->is_main = false;
$this->first_block_date = '2024-04-08';
$this->first_block_id = 0;
}
}
30 changes: 30 additions & 0 deletions Modules/GalacticaEVMMainModule.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, [email protected]
* Copyright (c) 2023-2024 3xpl developers, [email protected], see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

/* This is the main Galactica module. It requires a geth node to run. */

final class GalacticaEVMMainModule extends EVMMainModule implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'galactica-evm';
$this->module = 'galactica-evm-main';
$this->is_main = true;
$this->first_block_date = '2024-04-08';
$this->first_block_id = 0;
$this->currency = 'gnet';
$this->currency_details = ['name' => 'GNET', 'symbol' => 'GNET', 'decimals' => 18, 'description' => null];

// EVMMainModule
$this->evm_implementation = EVMImplementation::geth;
$this->extra_features = [];
$this->reward_function = function($block_id)
{
return '0';
};
}
}
23 changes: 23 additions & 0 deletions Modules/GalacticaEVMTraceModule.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php declare(strict_types = 1);

/* Idea (c) 2023 Nikita Zhavoronkov, [email protected]
* Copyright (c) 2023-2024 3xpl developers, [email protected], see CONTRIBUTORS.md
* Distributed under the MIT software license, see LICENSE.md */

/* This module processes internal Galactica transactions (using block tracing). It requires an archival geth node to run. */

final class GalacticaEVMTraceModule extends EVMTraceModule implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'galactica-evm';
$this->module = 'galactica-evm-trace';
$this->complements = 'galactica-evm-main';
$this->is_main = false;
$this->first_block_date = '2024-04-08';

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