<?php declare(strict_types = 1);

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

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

final class BlastTraceModule extends EVMTraceModule implements Module
{
    function initialize()
    {
        // CoreModule
        $this->blockchain = 'blast';
        $this->module = 'blast-trace';
        $this->complements = 'blast-main';
        $this->is_main = false;
        $this->first_block_date = '2024-02-24';
        $this->first_block_id = 0;

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

        $this->tests = [
            ['block' => 6127913, 'result' => 'a:2:{s:6:"events";a:28:{i:0;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x4300000000000000000000000000000000000001";s:8:"sort_key";i:0;s:6:"effect";s:13:"-339080559036";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:1;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x01fe11e1ded640961f3133f5db99f134950154d8";s:8:"sort_key";i:1;s:6:"effect";s:12:"339080559036";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:2;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x4300000000000000000000000000000000000001";s:8:"sort_key";i:2;s:6:"effect";s:12:"-92009830849";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:3;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x01fe11e1ded640961f3133f5db99f134950154d8";s:8:"sort_key";i:3;s:6:"effect";s:11:"92009830849";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:4;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x4300000000000000000000000000000000000001";s:8:"sort_key";i:4;s:6:"effect";s:11:"-1753431713";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:5;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x01fe11e1ded640961f3133f5db99f134950154d8";s:8:"sort_key";i:5;s:6:"effect";s:10:"1753431713";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:6;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x4300000000000000000000000000000000000001";s:8:"sort_key";i:6;s:6:"effect";s:11:"-1235200805";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:7;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x01fe11e1ded640961f3133f5db99f134950154d8";s:8:"sort_key";i:7;s:6:"effect";s:10:"1235200805";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:8;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x4300000000000000000000000000000000000001";s:8:"sort_key";i:8;s:6:"effect";s:10:"-890545925";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:9;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x01fe11e1ded640961f3133f5db99f134950154d8";s:8:"sort_key";i:9;s:6:"effect";s:9:"890545925";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:10;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x01fe11e1ded640961f3133f5db99f134950154d8";s:8:"sort_key";i:10;s:6:"effect";s:13:"-434969568328";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:11;a:7:{s:11:"transaction";s:66:"0x19a9fd9dfaf60472b802e0cf237e561bc14fd851361d5216dc5a23f45e977b0a";s:7:"address";s:42:"0x6a4f8d68836bef30f47438454266811f2bd6b5d3";s:8:"sort_key";i:11;s:6:"effect";s:12:"434969568328";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:12;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xa596f7d6587de656d0ef099d2f28fe699060bf97";s:8:"sort_key";i:12;s:6:"effect";s:17:"-1500000000000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:13;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xcf09205d04647b0dbf99fe702113358df764ced3";s:8:"sort_key";i:13;s:6:"effect";s:16:"1500000000000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:14;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xcf09205d04647b0dbf99fe702113358df764ced3";s:8:"sort_key";i:14;s:6:"effect";s:17:"-1500000000000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:15;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0x4300000000000000000000000000000000000004";s:8:"sort_key";i:15;s:6:"effect";s:16:"1500000000000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:16;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0x4300000000000000000000000000000000000004";s:8:"sort_key";i:16;s:6:"effect";s:17:"-1960009800000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:17;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xcf09205d04647b0dbf99fe702113358df764ced3";s:8:"sort_key";i:17;s:6:"effect";s:16:"1960009800000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:18;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xcf09205d04647b0dbf99fe702113358df764ced3";s:8:"sort_key";i:18;s:6:"effect";s:17:"-1960009800000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:19;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0x3774b4b81d50bc44b1e0b2b6cece663b929992ff";s:8:"sort_key";i:19;s:6:"effect";s:16:"1960009800000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:20;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0x4300000000000000000000000000000000000004";s:8:"sort_key";i:20;s:6:"effect";s:15:"-20000100000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:21;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xcf09205d04647b0dbf99fe702113358df764ced3";s:8:"sort_key";i:21;s:6:"effect";s:14:"20000100000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:22;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xcf09205d04647b0dbf99fe702113358df764ced3";s:8:"sort_key";i:22;s:6:"effect";s:15:"-20000100000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:23;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xf193c7be595df64de3a4c85063ced1a45b7da59b";s:8:"sort_key";i:23;s:6:"effect";s:14:"20000100000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:24;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0xa596f7d6587de656d0ef099d2f28fe699060bf97";s:8:"sort_key";i:24;s:6:"effect";s:15:"-10000000000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:25;a:7:{s:11:"transaction";s:66:"0x01862e341e4f72b22b1cd29be4451f73c3fe2241a963de0a9bb0fd66071d1023";s:7:"address";s:42:"0x68247170e48c4026fc9ea922e8d9c8ce10df6b5b";s:8:"sort_key";i:25;s:6:"effect";s:14:"10000000000000";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:26;a:7:{s:11:"transaction";s:66:"0x794ffc895f9c05d2b76a9123dec668455f3e32f84756f54bd13a58d5842a8eb0";s:7:"address";s:42:"0x693b37a9859ce9465fb2aadeb03811a26a0c37c0";s:8:"sort_key";i:26;s:6:"effect";s:18:"-95986956521739130";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}i:27;a:7:{s:11:"transaction";s:66:"0x794ffc895f9c05d2b76a9123dec668455f3e32f84756f54bd13a58d5842a8eb0";s:7:"address";s:42:"0xdf2d728abdd2284dfbc1e1cf883444e8afb277e7";s:8:"sort_key";i:27;s:6:"effect";s:17:"95986956521739130";s:5:"extra";N;s:5:"block";i:6127913;s:4:"time";s:19:"2024-07-15 17:47:21";}}s:10:"currencies";N;}'],
        ];
    }
}
