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 @@ -985,6 +985,61 @@ MODULE_zcash-main_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_zcash-main_REQUESTER_TIMEOUT=60
MODULE_zcash-main_REQUESTER_THREADS=12

######################
## Main EVM Sei Module
######################

MODULES[]=sei-evm-main
MODULE_sei-evm-main_CLASS=SeiEVMMainModule
MODULE_sei-evm-main_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-main_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-main_REQUESTER_TIMEOUT=60
MODULE_sei-evm-main_REQUESTER_THREADS=12

#######################
## Trace Sei EVM Module
#######################

MODULES[]=sei-evm-trace
MODULE_sei-evm-trace_CLASS=SeiEVMTraceModule
MODULE_sei-evm-trace_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-trace_NODES[]=http://login:password@127.0.0.2:1234/
MODULE_sei-evm-trace_REQUESTER_TIMEOUT=60
MODULE_sei-evm-trace_REQUESTER_THREADS=12

######################
## EVM ERC20 Sei Module
######################

MODULES[]=sei-evm-erc-20
MODULE_sei-evm-erc-20_CLASS=SeiEVMERC20Module
MODULE_sei-evm-erc-20_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-erc-20_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-erc-20_REQUESTER_TIMEOUT=60
MODULE_sei-evm-erc-20_REQUESTER_THREADS=12

######################
## EVM ERC721 Sei Module
######################

MODULES[]=sei-evm-erc-721
MODULE_sei-evm-erc-721_CLASS=SeiEVMERC721Module
MODULE_sei-evm-erc-721_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-erc-721_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-erc-721_REQUESTER_TIMEOUT=60
MODULE_sei-evm-erc-721_REQUESTER_THREADS=12

######################
## EVM ERC1155 Sei Module
######################

MODULES[]=sei-evm-erc-1155
MODULE_sei-evm-erc-1155_CLASS=SeiEVMERC1155Module
MODULE_sei-evm-erc-1155_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-erc-1155_NODES[]=http://login:password@127.0.0.1:1234/
MODULE_sei-evm-erc-1155_REQUESTER_TIMEOUT=60
MODULE_sei-evm-erc-1155_REQUESTER_THREADS=12

######################
## Main Rootstock Module
######################
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
- Cardano Tokens modules
* [Kirill Kuzminykh](https://github.com/Oskal174)
- Rootstock modules
- Sei modules
3 changes: 3 additions & 0 deletions Modules/Common/EVMMainModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ final public function pre_process_block($block_id)

// Data processing

if (in_array(EVMSpecialFeatures::FeesToTreasury, $this->extra_features))
$miner = 'treasury';

$this->block_time = date('Y-m-d H:i:s', to_int64_from_0xhex($block_time));

if (($ic = count($general_data)) !== count($receipt_data))
Expand Down
1 change: 1 addition & 0 deletions Modules/Common/EVMTraits.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum EVMSpecialFeatures
case rskEVM; // Rootstock has different traces and deferred validators rewards (in N+4000 block).
case TraceBlockSupport; // Support for `trace_block` in RPC API
case EIP4844; // Support of blob transaction
case FeesToTreasury;
}

trait EVMTraits
Expand Down
20 changes: 20 additions & 0 deletions Modules/SeiEVMERC1155Module.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, 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 token transfers in Sei EVM. */

final class SeiEVMERC1155Module extends EVMERC1155Module implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'sei-evm';
$this->module = 'sei-evm-erc-1155';
$this->is_main = false;
$this->first_block_date = '2024-01-25'; // This is for the devnet
$this->first_block_id = 0;
}
}
20 changes: 20 additions & 0 deletions Modules/SeiEVMERC20Module.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, 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 Sei EVM. */

final class SeiEVMERC20Module extends EVMERC20Module implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'sei-evm';
$this->module = 'sei-evm-erc-20';
$this->is_main = false;
$this->first_block_date = '2024-01-25'; // This is for the devnet
$this->first_block_id = 0;
}
}
20 changes: 20 additions & 0 deletions Modules/SeiEVMERC721Module.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, 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 token transfers in Sei EVM. */

final class SeiEVMERC721Module extends EVMERC721Module implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'sei-evm';
$this->module = 'sei-evm-erc-721';
$this->is_main = false;
$this->first_block_date = '2024-01-25'; // This is for the devnet
$this->first_block_id = 0;
}
}
30 changes: 30 additions & 0 deletions Modules/SeiEVMMainModule.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, 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 main Sei EVM module. */

final class SeiEVMMainModule extends EVMMainModule implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'sei-evm';
$this->module = 'sei-evm-main';
$this->is_main = true;
$this->first_block_date = '2024-01-25'; // This is for the devnet
$this->first_block_id = 0;
$this->currency = 'sei-evm';
$this->currency_details = ['name' => 'Sei', 'symbol' => 'SEI', 'decimals' => 18, 'description' => null];

// EVMMainModule
$this->evm_implementation = EVMImplementation::geth;
$this->extra_features = [EVMSpecialFeatures::FeesToTreasury];
$this->reward_function = function($block_id)
{
return '0';
};
}
}
24 changes: 24 additions & 0 deletions Modules/SeiEVMTraceModule.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 internal Sei EVM transactions (using block tracing). */

final class SeiEVMTraceModule extends EVMTraceModule implements Module
{
function initialize()
{
// CoreModule
$this->blockchain = 'sei-evm';
$this->module = 'sei-evm-trace';
$this->complements = 'sei-evm-main';
$this->is_main = false;
$this->first_block_date = '2024-01-25'; // This is for the devnet
$this->first_block_id = 0;

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