<?php declare(strict_types = 1);

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

final class RippleFTModule extends RippleLikeFTModule implements Module, MultipleBalanceSpecial
{
    function initialize()
    {
        // CoreModule
        $this->blockchain = 'xrp-ledger';
        $this->module = 'xrp-ledger-ft';
        $this->is_main = false;
        $this->first_block_date = '2013-01-01';
        $this->first_block_id = 32570;

        $this->tests = [
            ['block' => 86029048, 'result' => 'a:2:{s:6:"events";a:2:{i:0;a:9:{s:8:"currency";s:67:"594F494E4B000000000000000000000000000000.rrrrrrrrrrrrrrrrrrrrBZbvji";s:11:"transaction";s:64:"abe84848188b1a9ed69018a0edf08c8ded9e50d209efe029829a2513a656b4c7";s:7:"address";s:34:"rMo7g7CJLYbERMvf1taHSEkNuyL4BqecD8";s:8:"sort_key";i:0;s:6:"effect";s:97:"-956620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"f";s:5:"extra";s:2:"cb";s:5:"block";i:86029048;s:4:"time";s:19:"2024-02-17 13:26:31";}i:1;a:9:{s:8:"currency";s:67:"594F494E4B000000000000000000000000000000.rrrrrrrrrrrrrrrrrrrrBZbvji";s:11:"transaction";s:64:"abe84848188b1a9ed69018a0edf08c8ded9e50d209efe029829a2513a656b4c7";s:7:"address";s:8:"the-void";s:8:"sort_key";i:1;s:6:"effect";s:96:"956620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"f";s:5:"extra";s:2:"cb";s:5:"block";i:86029048;s:4:"time";s:19:"2024-02-17 13:26:31";}}s:10:"currencies";a:1:{i:0;a:4:{s:2:"id";s:67:"594F494E4B000000000000000000000000000000.rrrrrrrrrrrrrrrrrrrrBZbvji";s:4:"name";s:5:"YOINK";s:6:"symbol";s:5:"YOINK";s:8:"decimals";i:96;}}}'],
            ['block' => 86028986, 'result' => 'a:2:{s:6:"events";a:2:{i:0;a:9:{s:8:"currency";s:67:"594F494E4B000000000000000000000000000000.rrrrrrrrrrrrrrrrrrrrBZbvji";s:11:"transaction";s:64:"712246cf95073c254d12cddf7f8d93887562a5eb5a2f7b97dd2af1f3eb81af76";s:7:"address";s:34:"rHZCZ9M3LdDhk85Ax7DsAYywheqh83YQyC";s:8:"sort_key";i:0;s:6:"effect";s:97:"-956670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"f";s:5:"extra";s:2:"cb";s:5:"block";i:86028986;s:4:"time";s:19:"2024-02-17 13:22:31";}i:1;a:9:{s:8:"currency";s:67:"594F494E4B000000000000000000000000000000.rrrrrrrrrrrrrrrrrrrrBZbvji";s:11:"transaction";s:64:"712246cf95073c254d12cddf7f8d93887562a5eb5a2f7b97dd2af1f3eb81af76";s:7:"address";s:8:"the-void";s:8:"sort_key";i:1;s:6:"effect";s:96:"956670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"f";s:5:"extra";s:2:"cb";s:5:"block";i:86028986;s:4:"time";s:19:"2024-02-17 13:22:31";}}s:10:"currencies";a:1:{i:0;a:4:{s:2:"id";s:67:"594F494E4B000000000000000000000000000000.rrrrrrrrrrrrrrrrrrrrBZbvji";s:4:"name";s:5:"YOINK";s:6:"symbol";s:5:"YOINK";s:8:"decimals";i:96;}}}'],
            ['block' => 9060986,  'result' => 'a:2:{s:6:"events";a:4:{i:0;a:9:{s:8:"currency";s:38:"CNY.rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK";s:11:"transaction";s:64:"370121a3af5ee118b04965579f690de6eceba744f6223253f2fccc46c18742f2";s:7:"address";s:34:"rshTJgRVZDo2EXfPVeBxFWEAMTFBJDWzo6";s:8:"sort_key";i:0;s:6:"effect";s:99:"-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"t";s:5:"extra";s:1:"p";s:5:"block";i:9060986;s:4:"time";s:19:"2014-09-26 04:42:40";}i:1;a:9:{s:8:"currency";s:38:"CNY.rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK";s:11:"transaction";s:64:"370121a3af5ee118b04965579f690de6eceba744f6223253f2fccc46c18742f2";s:7:"address";s:34:"r4BV3UiUNa2WjRk6xC5QVSfGbMKwZhZfVA";s:8:"sort_key";i:1;s:6:"effect";s:98:"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"t";s:5:"extra";s:1:"p";s:5:"block";i:9060986;s:4:"time";s:19:"2014-09-26 04:42:40";}i:2;a:9:{s:8:"currency";s:38:"CNY.rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK";s:11:"transaction";s:64:"67d2263c7264021b01ae9e8c9f78f14e4805aa4e08cc3a4d01710c94c46b114b";s:7:"address";s:34:"rshTJgRVZDo2EXfPVeBxFWEAMTFBJDWzo6";s:8:"sort_key";i:2;s:6:"effect";s:99:"-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"t";s:5:"extra";s:1:"p";s:5:"block";i:9060986;s:4:"time";s:19:"2014-09-26 04:42:40";}i:3;a:9:{s:8:"currency";s:38:"CNY.rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK";s:11:"transaction";s:64:"67d2263c7264021b01ae9e8c9f78f14e4805aa4e08cc3a4d01710c94c46b114b";s:7:"address";s:34:"r4BV3UiUNa2WjRk6xC5QVSfGbMKwZhZfVA";s:8:"sort_key";i:3;s:6:"effect";s:98:"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";s:6:"failed";s:1:"t";s:5:"extra";s:1:"p";s:5:"block";i:9060986;s:4:"time";s:19:"2014-09-26 04:42:40";}}s:10:"currencies";a:1:{i:0;a:4:{s:2:"id";s:38:"CNY.rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK";s:4:"name";s:3:"CNY";s:6:"symbol";s:3:"CNY";s:8:"decimals";i:96;}}}'],
        ];
    }
}
