diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 3348e3337..3ea8d1311 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -141,7 +141,7 @@ checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "aptos-indexer-processor-sdk" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=95d76e07dd66a20a0e50a9e6c559885bff7ab52b#95d76e07dd66a20a0e50a9e6c559885bff7ab52b" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "ahash", "anyhow", @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "aptos-indexer-processor-sdk-server-framework" version = "1.0.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=95d76e07dd66a20a0e50a9e6c559885bff7ab52b#95d76e07dd66a20a0e50a9e6c559885bff7ab52b" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "anyhow", "aptos-indexer-processor-sdk", @@ -198,19 +198,46 @@ dependencies = [ [[package]] name = "aptos-indexer-test-transactions" version = "1.0.0" -source = "git+https://github.com/aptos-labs/aptos-core.git?rev=7246f0536d599789d7dd5e9fb776554abbe11eac#7246f0536d599789d7dd5e9fb776554abbe11eac" +source = "git+https://github.com/aptos-labs/aptos-core.git?rev=c583502c69529fddbbf7e47bf920f1dc60e71b72#c583502c69529fddbbf7e47bf920f1dc60e71b72" +dependencies = [ + "aptos-protos 1.3.1 (git+https://github.com/aptos-labs/aptos-core.git?rev=c583502c69529fddbbf7e47bf920f1dc60e71b72)", + "serde_json", +] + +[[package]] +name = "aptos-indexer-testing-framework" +version = "0.1.0" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ - "aptos-protos 1.3.1 (git+https://github.com/aptos-labs/aptos-core.git?rev=7246f0536d599789d7dd5e9fb776554abbe11eac)", + "anyhow", + "aptos-indexer-processor-sdk", + "aptos-protos 1.3.1 (git+https://github.com/aptos-labs/aptos-core.git?rev=5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb)", + "async-trait", + "diesel", + "diesel-async", + "diesel_migrations", + "futures", + "futures-util", + "native-tls", + "once_cell", + "postgres-native-tls", "serde_json", + "testcontainers", + "tokio", + "tokio-postgres", + "tokio-retry", + "tokio-stream", + "tonic 0.11.0", + "url", ] [[package]] name = "aptos-indexer-transaction-stream" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=95d76e07dd66a20a0e50a9e6c559885bff7ab52b#95d76e07dd66a20a0e50a9e6c559885bff7ab52b" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "anyhow", - "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=95d76e07dd66a20a0e50a9e6c559885bff7ab52b)", + "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1)", "aptos-protos 1.3.1 (git+https://github.com/aptos-labs/aptos-core.git?rev=5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb)", "chrono", "futures-util", @@ -235,7 +262,7 @@ dependencies = [ [[package]] name = "aptos-moving-average" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=95d76e07dd66a20a0e50a9e6c559885bff7ab52b#95d76e07dd66a20a0e50a9e6c559885bff7ab52b" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "chrono", ] @@ -281,7 +308,7 @@ dependencies = [ [[package]] name = "aptos-protos" version = "1.3.1" -source = "git+https://github.com/aptos-labs/aptos-core.git?rev=7246f0536d599789d7dd5e9fb776554abbe11eac#7246f0536d599789d7dd5e9fb776554abbe11eac" +source = "git+https://github.com/aptos-labs/aptos-core.git?rev=c583502c69529fddbbf7e47bf920f1dc60e71b72#c583502c69529fddbbf7e47bf920f1dc60e71b72" dependencies = [ "futures-core", "pbjson", @@ -737,9 +764,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.24" +version = "1.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +checksum = "58e804ac3194a48bb129643eb1d62fcc20d18c6b8c181704489353d13120bcd1" dependencies = [ "jobserver", "libc", @@ -775,9 +802,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.19" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -785,9 +812,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.19" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -1070,18 +1097,18 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ "darling", "proc-macro2", @@ -1091,9 +1118,9 @@ dependencies = [ [[package]] name = "derive_builder_macro" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", "syn 2.0.79", @@ -1431,9 +1458,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1446,9 +1473,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1456,15 +1483,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1473,15 +1500,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -1490,21 +1517,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1541,9 +1568,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -2030,7 +2057,7 @@ dependencies = [ "http 1.1.0", "hyper 1.4.1", "hyper-util", - "rustls 0.23.13", + "rustls 0.23.14", "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", @@ -2219,7 +2246,7 @@ dependencies = [ [[package]] name = "instrumented-channel" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=95d76e07dd66a20a0e50a9e6c559885bff7ab52b#95d76e07dd66a20a0e50a9e6c559885bff7ab52b" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "delegate", "derive_builder", @@ -2239,26 +2266,36 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" name = "integration-tests" version = "1.0.0" dependencies = [ + "ahash", "anyhow", + "aptos-indexer-processor-sdk", "aptos-indexer-test-transactions", + "aptos-indexer-testing-framework", "aptos-protos 1.3.1 (git+https://github.com/aptos-labs/aptos-core.git?rev=5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb)", "assert-json-diff", "bigdecimal", "chrono", + "clap", "diesel", "dirs", "field_count", + "futures", "itertools 0.12.1", "json-structural-diff", + "once_cell", "processor", "prost 0.12.6", "regex", + "sdk-processor", "serde", "serde_canonical_json", "serde_json", + "tempfile", "testcontainers", "testing-transactions", "tokio", + "tonic 0.11.0", + "url", ] [[package]] @@ -2275,9 +2312,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -2351,9 +2388,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2865,21 +2902,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" @@ -3153,18 +3187,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", @@ -3334,9 +3368,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -3577,7 +3611,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.13", + "rustls 0.23.14", "socket2", "thiserror", "tokio", @@ -3594,7 +3628,7 @@ dependencies = [ "rand", "ring 0.17.8", "rustc-hash", - "rustls 0.23.13", + "rustls 0.23.14", "slab", "thiserror", "tinyvec", @@ -3818,7 +3852,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.13", + "rustls 0.23.14", "rustls-native-certs 0.8.0", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -3987,9 +4021,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" dependencies = [ "once_cell", "ring 0.17.8", @@ -4095,16 +4129,16 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "sample" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=95d76e07dd66a20a0e50a9e6c559885bff7ab52b#95d76e07dd66a20a0e50a9e6c559885bff7ab52b" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "tracing", ] [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -4298,9 +4332,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9720086b3357bcb44fce40117d769a4d068c70ecfa190850a980a71755f66fcc" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", @@ -4316,9 +4350,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f1abbfe725f27678f4663bcacb75a83e829fd464c25d78dd038a3a29e307cec" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", @@ -4928,7 +4962,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.13", + "rustls 0.23.14", "rustls-pki-types", "tokio", ] @@ -5395,9 +5429,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -5406,9 +5440,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -5421,9 +5455,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -5433,9 +5467,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5443,9 +5477,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -5456,9 +5490,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" @@ -5475,9 +5509,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index be3a3c3e5..7d1137756 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -30,11 +30,13 @@ testing-transactions = { path = "testing-transactions" } ahash = { version = "0.8.7", features = ["serde"] } anyhow = "1.0.86" -aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "95d76e07dd66a20a0e50a9e6c559885bff7ab52b" } -aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "95d76e07dd66a20a0e50a9e6c559885bff7ab52b" } +aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "a12b31492285c70d5afbdd42aa10fe76e1fb79e1" } +aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "a12b31492285c70d5afbdd42aa10fe76e1fb79e1" } aptos-protos = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb" } aptos-system-utils = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "202bdccff2b2d333a385ae86a4fcf23e89da9f62" } -aptos-indexer-test-transactions = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "7246f0536d599789d7dd5e9fb776554abbe11eac" } +aptos-indexer-test-transactions = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "c583502c69529fddbbf7e47bf920f1dc60e71b72" } +aptos-indexer-testing-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "a12b31492285c70d5afbdd42aa10fe76e1fb79e1" } + async-trait = "0.1.53" backtrace = "0.3.58" base64 = "0.13.0" diff --git a/rust/integration-tests/Cargo.toml b/rust/integration-tests/Cargo.toml index fb6e1cf55..bd60c5c9a 100644 --- a/rust/integration-tests/Cargo.toml +++ b/rust/integration-tests/Cargo.toml @@ -13,24 +13,42 @@ repository = "https://github.com/aptos-labs/aptos-core" rust-version = { workspace = true } [dependencies] +ahash = { workspace = true } anyhow = { workspace = true } +aptos-indexer-processor-sdk = { workspace = true } aptos-indexer-test-transactions = { workspace = true } +aptos-indexer-testing-framework = { workspace = true } aptos-protos = { workspace = true } assert-json-diff = { workspace = true } bigdecimal = { workspace = true } chrono = { workspace = true } +clap = { workspace = true } diesel = { workspace = true } dirs = { workspace = true } field_count = { workspace = true } +futures = { workspace = true } itertools = { workspace = true } json-structural-diff = { workspace = true } +once_cell = { workspace = true } processor = { workspace = true } prost = { workspace = true } regex = { workspace = true } +sdk-processor = { workspace = true } serde = { workspace = true } serde_canonical_json = { workspace = true } serde_json = { workspace = true } +tempfile = { workspace = true } testcontainers = { workspace = true } testing-transactions = { workspace = true } tokio = { workspace = true } +tonic = { workspace = true } +url = { workspace = true } + [dev-dependencies] +ahash = { workspace = true } +aptos-indexer-processor-sdk = { workspace = true } +futures = { workspace = true } +sdk-processor = { workspace = true } +tempfile = { workspace = true } +tonic = { workspace = true } +url = { workspace = true } diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/events_processor_308783012.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/308783012/events.json similarity index 80% rename from rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/events_processor_308783012.json rename to rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/308783012/events.json index 0d0606808..92b3e7efa 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/events_processor_308783012.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/308783012/events.json @@ -10,8 +10,9 @@ "index": "3723914", "token": "0x6fd8ee875fb55e03b1f9643d3f229f0b077a71cfe7ffc8ba7e09ff4392950e5c" }, - "indexed_type": "0x4::collection::MintEvent", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.404918", + "event_index": 0, + "indexed_type": "0x4::collection::MintEvent" }, { "sequence_number": 0, @@ -25,8 +26,9 @@ "from": "0x7efbc33cf69ad534412eab0ccd0f5fbec7793bdebf08a3620afe8e5f89ef13a0", "object": "0x6fd8ee875fb55e03b1f9643d3f229f0b077a71cfe7ffc8ba7e09ff4392950e5c" }, - "indexed_type": "0x1::object::TransferEvent", - "event_index": 1 + "inserted_at": "2024-10-15T04:55:32.404918", + "event_index": 1, + "indexed_type": "0x1::object::TransferEvent" }, { "sequence_number": 0, @@ -42,7 +44,8 @@ "total_charge_gas_units": "520", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 2 + "inserted_at": "2024-10-15T04:55:32.404918", + "event_index": 2, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/coin_supply.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/coin_supply.json new file mode 100644 index 000000000..c656edb6a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 308783012, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "106177548228160480", + "transaction_timestamp": "2023-10-24T09:08:03", + "transaction_epoch": 4534 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/current_fungible_asset_balances.json new file mode 100644 index 000000000..2e9144987 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/current_fungible_asset_balances.json @@ -0,0 +1,13 @@ +[ + { + "storage_id": "0xc617f51a505e596fb85ca0c323c884cbe718782a9606c8023b8910f7fa16fe87", + "owner_address": "0x28f87126ce5c2ead81ec4fef494c73d545757a9a634eb54d36ae5a9737f4f287", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "464000", + "last_transaction_timestamp": "2023-10-24T09:08:03", + "last_transaction_version": 308783012, + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/fungible_asset_processor_308783012.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_activities.json similarity index 93% rename from rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/fungible_asset_processor_308783012.json rename to rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_activities.json index db2769f93..909daae70 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/fungible_asset_processor_308783012.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 106350614, "token_standard": "v1", "transaction_timestamp": "2023-10-24T09:08:03", + "inserted_at": "2024-10-15T04:55:33.359030", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_balances.json new file mode 100644 index 000000000..00d4eedf7 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_balances.json @@ -0,0 +1,14 @@ +[ + { + "transaction_version": 308783012, + "write_set_change_index": 0, + "storage_id": "0xc617f51a505e596fb85ca0c323c884cbe718782a9606c8023b8910f7fa16fe87", + "owner_address": "0x28f87126ce5c2ead81ec4fef494c73d545757a9a634eb54d36ae5a9737f4f287", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "464000", + "transaction_timestamp": "2023-10-24T09:08:03", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_1.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_metadata.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_1.json rename to rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_metadata.json diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/token_v2_processor_308783012.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/308783012/token_activities_v2.json similarity index 87% rename from rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/token_v2_processor_308783012.json rename to rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/308783012/token_activities_v2.json index 0fdaa5eeb..503c6d4ed 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/token_v2_processor_308783012.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/308783012/token_activities_v2.json @@ -14,7 +14,8 @@ "entry_function_id_str": "0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::mint::resource_mint_token_memo", "token_standard": "v2", "is_fungible_v2": null, - "transaction_timestamp": "2023-10-24T09:08:03.606880" + "transaction_timestamp": "2023-10-24T09:08:03.606880", + "inserted_at": "2024-10-15T04:55:34.472476" }, { "transaction_version": 308783012, @@ -31,6 +32,7 @@ "entry_function_id_str": "0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::mint::resource_mint_token_memo", "token_standard": "v2", "is_fungible_v2": null, - "transaction_timestamp": "2023-10-24T09:08:03.606880" + "transaction_timestamp": "2023-10-24T09:08:03.606880", + "inserted_at": "2024-10-15T04:55:34.472476" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_1.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1/events.json similarity index 77% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_1.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1/events.json index 338e7e633..c05d5d4d7 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_1.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1/events.json @@ -19,8 +19,9 @@ ], "previous_block_votes_bitvec": "0x00" }, - "indexed_type": "0x1::block::NewBlockEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 0, + "indexed_type": "0x1::block::NewBlockEvent" }, { "sequence_number": 0, @@ -33,8 +34,9 @@ "pool_address": "0xb7c7d12080209e9dc14498c80200706e760363fb31782247e82cf57d1d6e5d6c", "rewards_amount": "0" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 0, @@ -47,8 +49,9 @@ "pool_address": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", "rewards_amount": "4566200000" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 0, @@ -61,8 +64,9 @@ "pool_address": "0x828ca971e35c8b9a807439e5a328fdc9a5ed0efbfb12f40bc451d17f6998be3f", "rewards_amount": "0" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 0, @@ -75,8 +79,9 @@ "pool_address": "0xacb107b98cd634ca32d39d38ab13df8cbcd5fe7856ce2a3c3d123e53f95d0b6f", "rewards_amount": "0" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 4 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 1, @@ -88,7 +93,8 @@ "data": { "epoch": "2" }, - "indexed_type": "0x1::reconfiguration::NewEpochEvent", - "event_index": 5 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 5, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_1255836496.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json similarity index 78% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_1255836496.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json index a10bb69f9..c4ec7b54a 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_1255836496.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json @@ -9,8 +9,9 @@ "data": { "amount": "300000" }, - "indexed_type": "0x1::coin::WithdrawEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 0, + "indexed_type": "0x1::coin::WithdrawEvent" }, { "sequence_number": 707, @@ -22,8 +23,9 @@ "data": { "amount": "300000" }, - "indexed_type": "0x1::coin::DepositEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" }, { "sequence_number": 0, @@ -36,8 +38,9 @@ "store": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", "amount": "300000" }, - "indexed_type": "0x1::fungible_asset::Deposit", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 2, + "indexed_type": "0x1::fungible_asset::Deposit" }, { "sequence_number": 0, @@ -54,8 +57,9 @@ "token": "0x1::aptos_coin::AptosCoin", "amount": "300000" }, - "indexed_type": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 3, + "indexed_type": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit" }, { "sequence_number": 0, @@ -71,7 +75,8 @@ "total_charge_gas_units": "505", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 4 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 4, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_278556781.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json similarity index 78% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_278556781.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json index b3c4de024..8da11495c 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_278556781.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json @@ -13,8 +13,9 @@ "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862" } }, - "indexed_type": "0x1::account::CoinRegisterEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:49.422609", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" }, { "sequence_number": 0, @@ -26,7 +27,8 @@ "data": { "amount": "1000000000000000000" }, - "indexed_type": "0x1::coin::DepositEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:49.422609", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5523474016.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json similarity index 77% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5523474016.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json index d1a0d7d76..078706570 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5523474016.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json @@ -10,8 +10,9 @@ "pool_address": "0xa4113560d0b18ba38797f2a899c4b27e0c5b0476be5d8f6be68fba8b1861ed0", "rewards_amount": "789371656" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 0, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 4252, @@ -24,8 +25,9 @@ "pool_address": "0x286e8af6717ef6b1e361aae8ab28dd6664bf562c2805dd9a53432246ec66566e", "rewards_amount": "19174256316" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9823, @@ -38,8 +40,9 @@ "pool_address": "0x116176e2af223a8b7f8db80dc52f7a423b4d7f8c0553a1747e92ef58849aff4f", "rewards_amount": "19178730843" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 3697, @@ -52,8 +55,9 @@ "pool_address": "0xba08cec00a8cfa1deff6c9212dda8d198c8fa6ee1992f3ada76d645f99e3402b", "rewards_amount": "818123890" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9813, @@ -66,8 +70,9 @@ "pool_address": "0x12000330d7cd8a748f46c25e6ce5d236a27e13d0b510d4516ac84ecc5fddd002", "rewards_amount": "19178287161" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 4 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 14143, @@ -80,8 +85,9 @@ "pool_address": "0x5176f2252762e527e3598c22f1bdb3a1ac0ff0db2d7518cabbc99305330a864a", "rewards_amount": "963055869" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 5 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 5, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9812, @@ -94,8 +100,9 @@ "pool_address": "0xf0a156ed79ab6ccb5a643af48716263b565fd985ba36560966b4a91bdc8521f4", "rewards_amount": "19177688699" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 6 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 6, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 7807, @@ -108,8 +115,9 @@ "pool_address": "0xa562415be88d9f08ba98fa3f6af9be0e36580c0f8fff5100a50b519e8f4a15c9", "rewards_amount": "841058926" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 7 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 7, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9823, @@ -122,8 +130,9 @@ "pool_address": "0x676f640c90cb6c45f21be50974531d440309aa4ddad919ae0429039789a3d8a9", "rewards_amount": "19178518163" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 8 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 8, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9829, @@ -136,8 +145,9 @@ "pool_address": "0x3c04549114877c55f45649aba48ac0a4ff086ab7bdce3b8cc8d3d9947bc0d99", "rewards_amount": "19185171265" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 9 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 9, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 4252, @@ -150,8 +160,9 @@ "pool_address": "0x6d00a8a82bd0b6d187f9a328118ad61b5c80237362e8f5dd2454f2d3a1b03890", "rewards_amount": "19174925092" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 10 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 10, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 8256, @@ -164,8 +175,9 @@ "pool_address": "0x7a2ddb6af66beb0d9987c6c9010cb9053454f067e16775a8ecf19961195c3d28", "rewards_amount": "18813123628" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 11 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 11, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 8641, @@ -178,8 +190,9 @@ "pool_address": "0xeecd6e9fb71f3a67db6321e93deecf7a9d7c3f4fac6cd170deb3e8b183281943", "rewards_amount": "828031401" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 12 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 12, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 1882, @@ -192,8 +205,9 @@ "pool_address": "0xfd47a2fb988c959839ea2fe4d7169b48536a42bf5e4933790701a08252ba2039", "rewards_amount": "798768182" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 13 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 13, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 2197, @@ -206,8 +220,9 @@ "pool_address": "0x479ca442491cfd636f84fa8e56fa420c8038587e459e886d16a0b9d3993b16ba", "rewards_amount": "18896078163" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 14 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 14, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 2199, @@ -220,8 +235,9 @@ "pool_address": "0x95a0e6b1105ba7ef9382e585d32e9dbf1a73833975af77d9b6924aa33468df07", "rewards_amount": "18894077814" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 15 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 15, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 225, @@ -234,8 +250,9 @@ "pool_address": "0xb59c2db675c086d0c07b0f5d5ebd95ea9ead4429d836284fc4a576c4eed5799c", "rewards_amount": "787639333" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 16 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 16, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 405, @@ -248,8 +265,9 @@ "pool_address": "0x50e52098d22c91f4c6a0065d03b2602cc2643089b218096e3cfe5f1bd98d80e6", "rewards_amount": "789473752" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 17 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 17, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 330, @@ -262,8 +280,9 @@ "pool_address": "0xa5ed5d5e8c892165b18c2062596e8d1139fbb2cc451d430f787cd707122ce023", "rewards_amount": "787913628" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 18 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 18, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 16643, @@ -275,7 +294,8 @@ "data": { "epoch": "16644" }, - "indexed_type": "0x1::reconfiguration::NewEpochEvent", - "event_index": 19 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 19, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5979639459.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json similarity index 76% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5979639459.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json index ed5feab5f..a06eeb473 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5979639459.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json @@ -13,8 +13,9 @@ "account_address": "0x1" } }, - "indexed_type": "0x1::account::CoinRegisterEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" }, { "sequence_number": 21684, @@ -26,8 +27,9 @@ "data": { "amount": "10" }, - "indexed_type": "0x1::coin::WithdrawEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 1, + "indexed_type": "0x1::coin::WithdrawEvent" }, { "sequence_number": 0, @@ -39,8 +41,9 @@ "data": { "amount": "10" }, - "indexed_type": "0x1::coin::DepositEvent", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 2, + "indexed_type": "0x1::coin::DepositEvent" }, { "sequence_number": 0, @@ -56,7 +59,8 @@ "total_charge_gas_units": "999", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 3, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5992795934.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json similarity index 77% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5992795934.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json index dd105cc73..69192b908 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/events_processor_5992795934.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json @@ -10,8 +10,9 @@ "store": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", "amount": "100000000" }, - "indexed_type": "0x1::fungible_asset::Withdraw", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:49.043035", + "event_index": 0, + "indexed_type": "0x1::fungible_asset::Withdraw" }, { "sequence_number": 0, @@ -24,8 +25,9 @@ "store": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", "amount": "100000000" }, - "indexed_type": "0x1::fungible_asset::Deposit", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:49.043035", + "event_index": 1, + "indexed_type": "0x1::fungible_asset::Deposit" }, { "sequence_number": 0, @@ -41,7 +43,8 @@ "total_charge_gas_units": "12", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:49.043035", + "event_index": 2, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json new file mode 100644 index 000000000..05dd7f35b --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 1, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18448344078275751615", + "transaction_timestamp": "2022-09-09T01:24:17", + "transaction_epoch": 1 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5523474016.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5523474016.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_23.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_23.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_43.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_43.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_65.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_65.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json new file mode 100644 index 000000000..937a86719 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 1255836496, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29152644549222814344", + "transaction_timestamp": "2024-06-18T05:07:55", + "transaction_epoch": 15650 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json new file mode 100644 index 000000000..e5c643eb6 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json @@ -0,0 +1,46 @@ +[ + { + "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", + "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "29450400", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v1" + }, + { + "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", + "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "17374075418", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v1" + }, + { + "storage_id": "0x7ea259eaaacce518a7479baca008e17fab2d0267a16e11979d52eb6c5433aad6", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "93054699", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v2" + }, + { + "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "17272186129", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v2" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_1255836496.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json similarity index 93% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_1255836496.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json index deda77d29..7eb6cd8ca 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_1255836496.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 295534162, "token_standard": "v1", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 295534162, "token_standard": "v1", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" }, { @@ -51,6 +53,7 @@ "block_height": 295534162, "token_standard": "v1", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" }, { @@ -69,6 +72,7 @@ "block_height": 295534162, "token_standard": "v2", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json new file mode 100644 index 000000000..2dd21aa02 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json @@ -0,0 +1,50 @@ +[ + { + "transaction_version": 1255836496, + "write_set_change_index": 4, + "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", + "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "17374075418", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v1" + }, + { + "transaction_version": 1255836496, + "write_set_change_index": 5, + "storage_id": "0x7ea259eaaacce518a7479baca008e17fab2d0267a16e11979d52eb6c5433aad6", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "93054699", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v2" + }, + { + "transaction_version": 1255836496, + "write_set_change_index": 8, + "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "17272186129", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v2" + }, + { + "transaction_version": 1255836496, + "write_set_change_index": 16, + "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", + "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "29450400", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json new file mode 100644 index 000000000..3bbb1d851 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json @@ -0,0 +1,19 @@ +[ + { + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "creator_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "name": "Aptos Coin", + "symbol": "APT", + "decimals": 8, + "icon_uri": "", + "project_uri": "", + "last_transaction_version": 1255836496, + "last_transaction_timestamp": "2024-06-18T05:07:55", + "supply_aggregator_table_handle_v1": null, + "supply_aggregator_table_key_v1": null, + "token_standard": "v2", + "is_token_v2": null, + "maximum_v2": "340282366920938463463374607431768211455", + "supply_v2": "17374075418" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json new file mode 100644 index 000000000..c7455ae56 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 278556781, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18544645433533405815", + "transaction_timestamp": "2022-10-13T01:46:57", + "transaction_epoch": 746 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json new file mode 100644 index 000000000..f45ae6826 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json @@ -0,0 +1,24 @@ +[ + { + "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10041540182", + "last_transaction_timestamp": "2022-10-13T01:46:57", + "last_transaction_version": 278556781, + "token_standard": "v1" + }, + { + "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", + "is_primary": true, + "is_frozen": false, + "amount": "1000000000000000000", + "last_transaction_timestamp": "2022-10-13T01:46:57", + "last_transaction_version": 278556781, + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_278556781.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json similarity index 93% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_278556781.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json index 436b43072..da4019a2d 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_278556781.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 20040326, "token_standard": "v1", "transaction_timestamp": "2022-10-13T01:46:57", + "inserted_at": "2024-10-15T04:55:33.625216", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 20040326, "token_standard": "v1", "transaction_timestamp": "2022-10-13T01:46:57", + "inserted_at": "2024-10-15T04:55:33.625216", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json new file mode 100644 index 000000000..779d4957c --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json @@ -0,0 +1,26 @@ +[ + { + "transaction_version": 278556781, + "write_set_change_index": 3, + "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10041540182", + "transaction_timestamp": "2022-10-13T01:46:57", + "token_standard": "v1" + }, + { + "transaction_version": 278556781, + "write_set_change_index": 4, + "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", + "is_primary": true, + "is_frozen": false, + "amount": "1000000000000000000", + "transaction_timestamp": "2022-10-13T01:46:57", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json new file mode 100644 index 000000000..9733b88cd --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json @@ -0,0 +1,19 @@ +[ + { + "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", + "creator_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "name": "Aptos", + "symbol": "APT", + "decimals": 10, + "icon_uri": null, + "project_uri": null, + "last_transaction_version": 278556781, + "last_transaction_timestamp": "2022-10-13T01:46:57", + "supply_aggregator_table_handle_v1": null, + "supply_aggregator_table_key_v1": null, + "token_standard": "v1", + "is_token_v2": null, + "maximum_v2": null, + "supply_v2": null + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json new file mode 100644 index 000000000..3d51eb2f6 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 5523474016, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29159026553346716168", + "transaction_timestamp": "2024-07-29T00:02:18", + "transaction_epoch": 16643 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_85.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/token_v2_processor_85.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json new file mode 100644 index 000000000..04bab61ee --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 5979639459, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29164832318786122251", + "transaction_timestamp": "2024-09-13T16:48:29", + "transaction_epoch": 17778 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json new file mode 100644 index 000000000..9727ea023 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json @@ -0,0 +1,24 @@ +[ + { + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10", + "last_transaction_timestamp": "2024-09-13T16:48:29", + "last_transaction_version": 5979639459, + "token_standard": "v1" + }, + { + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "16673484350", + "last_transaction_timestamp": "2024-09-13T16:48:29", + "last_transaction_version": 5979639459, + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5979639459.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json similarity index 93% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5979639459.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json index 5e99ebdf9..69a01ac2c 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5979639459.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 354619634, "token_standard": "v1", "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:15:48.265877", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 354619634, "token_standard": "v1", "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:15:48.265877", "storage_refund_amount": "0" }, { @@ -51,6 +53,7 @@ "block_height": 354619634, "token_standard": "v1", "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:15:48.265877", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json new file mode 100644 index 000000000..9305714f7 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json @@ -0,0 +1,26 @@ +[ + { + "transaction_version": 5979639459, + "write_set_change_index": 0, + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "16673484350", + "transaction_timestamp": "2024-09-13T16:48:29", + "token_standard": "v1" + }, + { + "transaction_version": 5979639459, + "write_set_change_index": 2, + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10", + "transaction_timestamp": "2024-09-13T16:48:29", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json new file mode 100644 index 000000000..78207671f --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 5992795934, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29165678689185321503", + "transaction_timestamp": "2024-09-16T06:58:10", + "transaction_epoch": 17841 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json new file mode 100644 index 000000000..fdb2aaccb --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json @@ -0,0 +1,35 @@ +[ + { + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "18901942640", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v1" + }, + { + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "0", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v2" + }, + { + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "9996985969300000000", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v2" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5992795934.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json similarity index 94% rename from rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5992795934.json rename to rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json index bc3197a95..519c0f453 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fungible_asset_processor_5992795934.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 356437526, "token_standard": "v1", "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:15:49.908952", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 356437526, "token_standard": "v2", "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:15:49.908952", "storage_refund_amount": "0" }, { @@ -51,6 +53,7 @@ "block_height": 356437526, "token_standard": "v2", "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:15:49.908952", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json new file mode 100644 index 000000000..750b30768 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json @@ -0,0 +1,38 @@ +[ + { + "transaction_version": 5992795934, + "write_set_change_index": 0, + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "0", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v2" + }, + { + "transaction_version": 5992795934, + "write_set_change_index": 2, + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "18901942640", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v1" + }, + { + "transaction_version": 5992795934, + "write_set_change_index": 4, + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "9996985969300000000", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v2" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/1/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/1/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/1/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/1255836496/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/1255836496/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/1255836496/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/278556781/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/278556781/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/278556781/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5523474016/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5523474016/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5523474016/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5979639459/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5979639459/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5979639459/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5992795934/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5992795934/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/token_v2_processor/5992795934/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_23.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/23/events.json similarity index 78% rename from rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_23.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/23/events.json index 6ff94bb16..e4474af36 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_23.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/23/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.412203", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_43.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/43/events.json similarity index 78% rename from rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_43.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/43/events.json index 5f5f8ee20..78fcf79a8 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_43.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/43/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.404901", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_65.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/65/events.json similarity index 78% rename from rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_65.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/65/events.json index dde6479b4..0a8a207d6 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_65.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/65/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.413924", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_85.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/85/events.json similarity index 78% rename from rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_85.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/85/events.json index ed9d921df..cd2cd722e 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/events_processor_85.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/85/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.409748", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/coin_supply.json new file mode 100644 index 000000000..9b4e4e500 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 23, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18446744073709451425", + "transaction_timestamp": "2024-10-01T22:06:51", + "transaction_epoch": 2 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/current_fungible_asset_balances.json new file mode 100644 index 000000000..fe915e35c --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/current_fungible_asset_balances.json @@ -0,0 +1,13 @@ +[ + { + "storage_id": "0x9cfa839238cb942fbc487ff341fcdccabacd01e29864f594587900aa3a9d88b2", + "owner_address": "0x765d8c8d4d5859f43a56e2756fbf5f3d2483dbaa14f3fb62872df820d6e64eff", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "99999700", + "last_transaction_timestamp": "2024-10-01T22:06:51", + "last_transaction_version": 23, + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_23.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_activities.json similarity index 91% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_23.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_activities.json index ce747c0d5..2bfb044d3 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_23.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_activities.json @@ -14,7 +14,7 @@ "entry_function_id_str": null, "block_height": 11, "token_standard": "v1", - "transaction_timestamp": "2024-09-27T07:15:12", + "transaction_timestamp": "2024-10-01T22:06:51", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_balances.json new file mode 100644 index 000000000..608809af1 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_balances.json @@ -0,0 +1,14 @@ +[ + { + "transaction_version": 23, + "write_set_change_index": 0, + "storage_id": "0x9cfa839238cb942fbc487ff341fcdccabacd01e29864f594587900aa3a9d88b2", + "owner_address": "0x765d8c8d4d5859f43a56e2756fbf5f3d2483dbaa14f3fb62872df820d6e64eff", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "99999700", + "transaction_timestamp": "2024-10-01T22:06:51", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/23/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/coin_supply.json new file mode 100644 index 000000000..d0ab00ec2 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 43, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18446744073709351225", + "transaction_timestamp": "2024-10-01T22:06:56", + "transaction_epoch": 2 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/current_fungible_asset_balances.json new file mode 100644 index 000000000..9dd98afb9 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/current_fungible_asset_balances.json @@ -0,0 +1,13 @@ +[ + { + "storage_id": "0xee7ccdc3a833754267c71df9534640b532352f734e07509cbe48561d23d05831", + "owner_address": "0x8f0de18409d6fca18c72fac4062fc0f9baa6404296fed93a3ad0250fb671f8b3", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "99999700", + "last_transaction_timestamp": "2024-10-01T22:06:56", + "last_transaction_version": 43, + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_43.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_activities.json similarity index 91% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_43.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_activities.json index 1c5aaf797..09f4f5c43 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_43.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_activities.json @@ -14,7 +14,7 @@ "entry_function_id_str": null, "block_height": 20, "token_standard": "v1", - "transaction_timestamp": "2024-09-27T07:15:18", + "transaction_timestamp": "2024-10-01T22:06:56", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_balances.json new file mode 100644 index 000000000..b825d94b9 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_balances.json @@ -0,0 +1,14 @@ +[ + { + "transaction_version": 43, + "write_set_change_index": 0, + "storage_id": "0xee7ccdc3a833754267c71df9534640b532352f734e07509cbe48561d23d05831", + "owner_address": "0x8f0de18409d6fca18c72fac4062fc0f9baa6404296fed93a3ad0250fb671f8b3", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "99999700", + "transaction_timestamp": "2024-10-01T22:06:56", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/43/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/coin_supply.json new file mode 100644 index 000000000..3bc7c8265 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 65, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18446744073809350825", + "transaction_timestamp": "2024-10-01T22:07:03", + "transaction_epoch": 2 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/current_fungible_asset_balances.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/current_fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_65.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_activities.json similarity index 91% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_65.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_activities.json index 35d37b7c1..ece462aa5 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_65.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_activities.json @@ -14,7 +14,7 @@ "entry_function_id_str": null, "block_height": 30, "token_standard": "v1", - "transaction_timestamp": "2024-09-27T07:15:25", + "transaction_timestamp": "2024-10-01T22:07:03", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_balances.json new file mode 100644 index 000000000..cf9283b5e --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_balances.json @@ -0,0 +1,14 @@ +[ + { + "transaction_version": 65, + "write_set_change_index": 0, + "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", + "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "99999700", + "transaction_timestamp": "2024-10-01T22:07:03", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/65/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/coin_supply.json new file mode 100644 index 000000000..74249401b --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/coin_supply.json @@ -0,0 +1,10 @@ +[ + { + "transaction_version": 85, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18446744073909449225", + "transaction_timestamp": "2024-10-01T22:07:09", + "transaction_epoch": 2 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/current_fungible_asset_balances.json new file mode 100644 index 000000000..36d44a3e7 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/current_fungible_asset_balances.json @@ -0,0 +1,13 @@ +[ + { + "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", + "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "199999400", + "last_transaction_timestamp": "2024-10-01T22:07:09", + "last_transaction_version": 85, + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_85.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_activities.json similarity index 91% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_85.json rename to rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_activities.json index 16d6f8f04..593947fa6 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/fungible_asset_processor_85.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_activities.json @@ -14,7 +14,7 @@ "entry_function_id_str": null, "block_height": 39, "token_standard": "v1", - "transaction_timestamp": "2024-09-27T07:15:31", + "transaction_timestamp": "2024-10-01T22:07:09", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_balances.json new file mode 100644 index 000000000..3b92bffd5 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_balances.json @@ -0,0 +1,14 @@ +[ + { + "transaction_version": 85, + "write_set_change_index": 0, + "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", + "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "199999400", + "transaction_timestamp": "2024-10-01T22:07:09", + "token_standard": "v1" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/85/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/23/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/23/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/23/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/43/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/43/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/43/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/65/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/65/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/65/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/85/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/85/token_activities_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/85/token_activities_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1/events.json new file mode 100644 index 000000000..f3c7c9d2a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1/events.json @@ -0,0 +1,100 @@ +[ + { + "sequence_number": 1, + "creation_number": 3, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_version": 1, + "transaction_block_height": 1, + "type_": "0x1::block::NewBlockEvent", + "data": { + "hash": "0x1f4392dc07a74b39eaea58b912855cbbd1ab67e5089ae6166329e883c2085f0", + "epoch": "1", + "round": "3", + "height": "1", + "proposer": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", + "time_microseconds": "1662686657227425", + "failed_proposer_indices": [ + "2", + "1" + ], + "previous_block_votes_bitvec": "0x00" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 0, + "indexed_type": "0x1::block::NewBlockEvent" + }, + { + "sequence_number": 0, + "creation_number": 12, + "account_address": "0xb7c7d12080209e9dc14498c80200706e760363fb31782247e82cf57d1d6e5d6c", + "transaction_version": 1, + "transaction_block_height": 1, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xb7c7d12080209e9dc14498c80200706e760363fb31782247e82cf57d1d6e5d6c", + "rewards_amount": "0" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 0, + "creation_number": 12, + "account_address": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", + "transaction_version": 1, + "transaction_block_height": 1, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", + "rewards_amount": "4566200000" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 0, + "creation_number": 12, + "account_address": "0x828ca971e35c8b9a807439e5a328fdc9a5ed0efbfb12f40bc451d17f6998be3f", + "transaction_version": 1, + "transaction_block_height": 1, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x828ca971e35c8b9a807439e5a328fdc9a5ed0efbfb12f40bc451d17f6998be3f", + "rewards_amount": "0" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 0, + "creation_number": 12, + "account_address": "0xacb107b98cd634ca32d39d38ab13df8cbcd5fe7856ce2a3c3d123e53f95d0b6f", + "transaction_version": 1, + "transaction_block_height": 1, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xacb107b98cd634ca32d39d38ab13df8cbcd5fe7856ce2a3c3d123e53f95d0b6f", + "rewards_amount": "0" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 1, + "creation_number": 2, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_version": 1, + "transaction_block_height": 1, + "type_": "0x1::reconfiguration::NewEpochEvent", + "data": { + "epoch": "2" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 5, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json new file mode 100644 index 000000000..e781112ba --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json @@ -0,0 +1,82 @@ +[ + { + "sequence_number": 0, + "creation_number": 3, + "account_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::coin::WithdrawEvent", + "data": { + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 0, + "indexed_type": "0x1::coin::WithdrawEvent" + }, + { + "sequence_number": 707, + "creation_number": 4, + "account_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::coin::DepositEvent", + "data": { + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::fungible_asset::Deposit", + "data": { + "store": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 2, + "indexed_type": "0x1::fungible_asset::Deposit" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit", + "data": { + "pool": { + "inner": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8" + }, + "user": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "token": "0x1::aptos_coin::AptosCoin", + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 3, + "indexed_type": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::transaction_fee::FeeStatement", + "data": { + "io_gas_units": "16", + "storage_fee_octas": "45720", + "execution_gas_units": "32", + "total_charge_gas_units": "505", + "storage_fee_refund_octas": "0" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 4, + "indexed_type": "0x1::transaction_fee::FeeStatement" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json new file mode 100644 index 000000000..c84be8759 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json @@ -0,0 +1,34 @@ +[ + { + "sequence_number": 2, + "creation_number": 0, + "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "transaction_version": 278556781, + "transaction_block_height": 20040326, + "type_": "0x1::account::CoinRegisterEvent", + "data": { + "type_info": { + "module_name": "0x70726f746f6e5f63626479", + "struct_name": "0x5052545f4b4642434343", + "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862" + } + }, + "inserted_at": "2024-10-15T05:16:55.660399", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" + }, + { + "sequence_number": 0, + "creation_number": 10, + "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "transaction_version": 278556781, + "transaction_block_height": 20040326, + "type_": "0x1::coin::DepositEvent", + "data": { + "amount": "1000000000000000000" + }, + "inserted_at": "2024-10-15T05:16:55.660399", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json new file mode 100644 index 000000000..31bf8c5cf --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json @@ -0,0 +1,301 @@ +[ + { + "sequence_number": 9814, + "creation_number": 12, + "account_address": "0x0a4113560d0b18ba38797f2a899c4b27e0c5b0476be5d8f6be68fba8b1861ed0", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xa4113560d0b18ba38797f2a899c4b27e0c5b0476be5d8f6be68fba8b1861ed0", + "rewards_amount": "789371656" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 0, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 4252, + "creation_number": 12, + "account_address": "0x286e8af6717ef6b1e361aae8ab28dd6664bf562c2805dd9a53432246ec66566e", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x286e8af6717ef6b1e361aae8ab28dd6664bf562c2805dd9a53432246ec66566e", + "rewards_amount": "19174256316" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9823, + "creation_number": 12, + "account_address": "0x116176e2af223a8b7f8db80dc52f7a423b4d7f8c0553a1747e92ef58849aff4f", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x116176e2af223a8b7f8db80dc52f7a423b4d7f8c0553a1747e92ef58849aff4f", + "rewards_amount": "19178730843" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 3697, + "creation_number": 12, + "account_address": "0xba08cec00a8cfa1deff6c9212dda8d198c8fa6ee1992f3ada76d645f99e3402b", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xba08cec00a8cfa1deff6c9212dda8d198c8fa6ee1992f3ada76d645f99e3402b", + "rewards_amount": "818123890" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9813, + "creation_number": 12, + "account_address": "0x12000330d7cd8a748f46c25e6ce5d236a27e13d0b510d4516ac84ecc5fddd002", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x12000330d7cd8a748f46c25e6ce5d236a27e13d0b510d4516ac84ecc5fddd002", + "rewards_amount": "19178287161" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 14143, + "creation_number": 12, + "account_address": "0x5176f2252762e527e3598c22f1bdb3a1ac0ff0db2d7518cabbc99305330a864a", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x5176f2252762e527e3598c22f1bdb3a1ac0ff0db2d7518cabbc99305330a864a", + "rewards_amount": "963055869" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 5, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9812, + "creation_number": 12, + "account_address": "0xf0a156ed79ab6ccb5a643af48716263b565fd985ba36560966b4a91bdc8521f4", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xf0a156ed79ab6ccb5a643af48716263b565fd985ba36560966b4a91bdc8521f4", + "rewards_amount": "19177688699" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 6, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 7807, + "creation_number": 12, + "account_address": "0xa562415be88d9f08ba98fa3f6af9be0e36580c0f8fff5100a50b519e8f4a15c9", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xa562415be88d9f08ba98fa3f6af9be0e36580c0f8fff5100a50b519e8f4a15c9", + "rewards_amount": "841058926" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 7, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9823, + "creation_number": 12, + "account_address": "0x676f640c90cb6c45f21be50974531d440309aa4ddad919ae0429039789a3d8a9", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x676f640c90cb6c45f21be50974531d440309aa4ddad919ae0429039789a3d8a9", + "rewards_amount": "19178518163" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 8, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9829, + "creation_number": 12, + "account_address": "0x03c04549114877c55f45649aba48ac0a4ff086ab7bdce3b8cc8d3d9947bc0d99", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x3c04549114877c55f45649aba48ac0a4ff086ab7bdce3b8cc8d3d9947bc0d99", + "rewards_amount": "19185171265" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 9, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 4252, + "creation_number": 12, + "account_address": "0x6d00a8a82bd0b6d187f9a328118ad61b5c80237362e8f5dd2454f2d3a1b03890", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x6d00a8a82bd0b6d187f9a328118ad61b5c80237362e8f5dd2454f2d3a1b03890", + "rewards_amount": "19174925092" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 10, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 8256, + "creation_number": 12, + "account_address": "0x7a2ddb6af66beb0d9987c6c9010cb9053454f067e16775a8ecf19961195c3d28", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x7a2ddb6af66beb0d9987c6c9010cb9053454f067e16775a8ecf19961195c3d28", + "rewards_amount": "18813123628" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 11, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 8641, + "creation_number": 10, + "account_address": "0xeecd6e9fb71f3a67db6321e93deecf7a9d7c3f4fac6cd170deb3e8b183281943", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xeecd6e9fb71f3a67db6321e93deecf7a9d7c3f4fac6cd170deb3e8b183281943", + "rewards_amount": "828031401" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 12, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 1882, + "creation_number": 12, + "account_address": "0xfd47a2fb988c959839ea2fe4d7169b48536a42bf5e4933790701a08252ba2039", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xfd47a2fb988c959839ea2fe4d7169b48536a42bf5e4933790701a08252ba2039", + "rewards_amount": "798768182" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 13, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 2197, + "creation_number": 12, + "account_address": "0x479ca442491cfd636f84fa8e56fa420c8038587e459e886d16a0b9d3993b16ba", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x479ca442491cfd636f84fa8e56fa420c8038587e459e886d16a0b9d3993b16ba", + "rewards_amount": "18896078163" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 14, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 2199, + "creation_number": 12, + "account_address": "0x95a0e6b1105ba7ef9382e585d32e9dbf1a73833975af77d9b6924aa33468df07", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x95a0e6b1105ba7ef9382e585d32e9dbf1a73833975af77d9b6924aa33468df07", + "rewards_amount": "18894077814" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 15, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 225, + "creation_number": 12, + "account_address": "0xb59c2db675c086d0c07b0f5d5ebd95ea9ead4429d836284fc4a576c4eed5799c", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xb59c2db675c086d0c07b0f5d5ebd95ea9ead4429d836284fc4a576c4eed5799c", + "rewards_amount": "787639333" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 16, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 405, + "creation_number": 12, + "account_address": "0x50e52098d22c91f4c6a0065d03b2602cc2643089b218096e3cfe5f1bd98d80e6", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x50e52098d22c91f4c6a0065d03b2602cc2643089b218096e3cfe5f1bd98d80e6", + "rewards_amount": "789473752" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 17, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 330, + "creation_number": 10, + "account_address": "0xa5ed5d5e8c892165b18c2062596e8d1139fbb2cc451d430f787cd707122ce023", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xa5ed5d5e8c892165b18c2062596e8d1139fbb2cc451d430f787cd707122ce023", + "rewards_amount": "787913628" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 18, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 16643, + "creation_number": 2, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::reconfiguration::NewEpochEvent", + "data": { + "epoch": "16644" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 19, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json new file mode 100644 index 000000000..b54fcc818 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json @@ -0,0 +1,66 @@ +[ + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::account::CoinRegisterEvent", + "data": { + "type_info": { + "module_name": "0x6170746f735f636f696e", + "struct_name": "0x4170746f73436f696e", + "account_address": "0x1" + } + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" + }, + { + "sequence_number": 21684, + "creation_number": 3, + "account_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::coin::WithdrawEvent", + "data": { + "amount": "10" + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 1, + "indexed_type": "0x1::coin::WithdrawEvent" + }, + { + "sequence_number": 0, + "creation_number": 2, + "account_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::coin::DepositEvent", + "data": { + "amount": "10" + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 2, + "indexed_type": "0x1::coin::DepositEvent" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::transaction_fee::FeeStatement", + "data": { + "io_gas_units": "5", + "storage_fee_octas": "98800", + "execution_gas_units": "6", + "total_charge_gas_units": "999", + "storage_fee_refund_octas": "0" + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 3, + "indexed_type": "0x1::transaction_fee::FeeStatement" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json new file mode 100644 index 000000000..8cb171550 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json @@ -0,0 +1,50 @@ +[ + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5992795934, + "transaction_block_height": 356437526, + "type_": "0x1::fungible_asset::Withdraw", + "data": { + "store": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "amount": "100000000" + }, + "inserted_at": "2024-10-15T05:16:55.191117", + "event_index": 0, + "indexed_type": "0x1::fungible_asset::Withdraw" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5992795934, + "transaction_block_height": 356437526, + "type_": "0x1::fungible_asset::Deposit", + "data": { + "store": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "amount": "100000000" + }, + "inserted_at": "2024-10-15T05:16:55.191117", + "event_index": 1, + "indexed_type": "0x1::fungible_asset::Deposit" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5992795934, + "transaction_block_height": 356437526, + "type_": "0x1::transaction_fee::FeeStatement", + "data": { + "io_gas_units": "7", + "storage_fee_octas": "0", + "execution_gas_units": "5", + "total_charge_gas_units": "12", + "storage_fee_refund_octas": "0" + }, + "inserted_at": "2024-10-15T05:16:55.191117", + "event_index": 2, + "indexed_type": "0x1::transaction_fee::FeeStatement" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json new file mode 100644 index 000000000..94ba261f3 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 1, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18448344078275751615", + "transaction_timestamp": "2022-09-09T01:24:17", + "transaction_epoch": 1, + "inserted_at": "2024-10-15T05:16:57.771610" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json new file mode 100644 index 000000000..5b418f2b1 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 1255836496, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29152644549222814344", + "transaction_timestamp": "2024-06-18T05:07:55", + "transaction_epoch": 15650, + "inserted_at": "2024-10-15T05:16:55.270115" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json new file mode 100644 index 000000000..2cc36a315 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json @@ -0,0 +1,50 @@ +[ + { + "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", + "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "29450400", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:55.264297" + }, + { + "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", + "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "17374075418", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:55.264297" + }, + { + "storage_id": "0x7ea259eaaacce518a7479baca008e17fab2d0267a16e11979d52eb6c5433aad6", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "93054699", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.264297" + }, + { + "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "17272186129", + "last_transaction_timestamp": "2024-06-18T05:07:55", + "last_transaction_version": 1255836496, + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.264297" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json new file mode 100644 index 000000000..4aa6149e0 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json @@ -0,0 +1,78 @@ +[ + { + "transaction_version": 1255836496, + "event_index": -1, + "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "50500", + "type_": "0x1::aptos_coin::GasFeeEvent", + "is_gas_fee": true, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", + "block_height": 295534162, + "token_standard": "v1", + "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:16:54.793594", + "storage_refund_amount": "0" + }, + { + "transaction_version": 1255836496, + "event_index": 0, + "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "300000", + "type_": "0x1::coin::WithdrawEvent", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", + "block_height": 295534162, + "token_standard": "v1", + "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:16:54.793594", + "storage_refund_amount": "0" + }, + { + "transaction_version": 1255836496, + "event_index": 1, + "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "300000", + "type_": "0x1::coin::DepositEvent", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", + "block_height": 295534162, + "token_standard": "v1", + "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:16:54.793594", + "storage_refund_amount": "0" + }, + { + "transaction_version": 1255836496, + "event_index": 2, + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_frozen": null, + "amount": "300000", + "type_": "0x1::fungible_asset::Deposit", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", + "block_height": 295534162, + "token_standard": "v2", + "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:16:54.793594", + "storage_refund_amount": "0" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json new file mode 100644 index 000000000..07d9814a4 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json @@ -0,0 +1,54 @@ +[ + { + "transaction_version": 1255836496, + "write_set_change_index": 4, + "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", + "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "17374075418", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:55.253856" + }, + { + "transaction_version": 1255836496, + "write_set_change_index": 5, + "storage_id": "0x7ea259eaaacce518a7479baca008e17fab2d0267a16e11979d52eb6c5433aad6", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "93054699", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.253856" + }, + { + "transaction_version": 1255836496, + "write_set_change_index": 8, + "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", + "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "is_primary": false, + "is_frozen": false, + "amount": "17272186129", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.253856" + }, + { + "transaction_version": 1255836496, + "write_set_change_index": 16, + "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", + "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "29450400", + "transaction_timestamp": "2024-06-18T05:07:55", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:55.253856" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json new file mode 100644 index 000000000..6f61d2773 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json @@ -0,0 +1,20 @@ +[ + { + "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", + "creator_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "name": "Aptos Coin", + "symbol": "APT", + "decimals": 8, + "icon_uri": "", + "project_uri": "", + "last_transaction_version": 1255836496, + "last_transaction_timestamp": "2024-06-18T05:07:55", + "supply_aggregator_table_handle_v1": null, + "supply_aggregator_table_key_v1": null, + "token_standard": "v2", + "is_token_v2": null, + "inserted_at": "2024-10-15T05:16:55.056027", + "supply_v2": "17374075418", + "maximum_v2": "340282366920938463463374607431768211455" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json new file mode 100644 index 000000000..240eb07ab --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 278556781, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "18544645433533405815", + "transaction_timestamp": "2022-10-13T01:46:57", + "transaction_epoch": 746, + "inserted_at": "2024-10-15T05:16:56.913064" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json new file mode 100644 index 000000000..a4834fa77 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json @@ -0,0 +1,26 @@ +[ + { + "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10041540182", + "last_transaction_timestamp": "2022-10-13T01:46:57", + "last_transaction_version": 278556781, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:56.910478" + }, + { + "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", + "is_primary": true, + "is_frozen": false, + "amount": "1000000000000000000", + "last_transaction_timestamp": "2022-10-13T01:46:57", + "last_transaction_version": 278556781, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:56.910478" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json new file mode 100644 index 000000000..3de70092e --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json @@ -0,0 +1,40 @@ +[ + { + "transaction_version": 278556781, + "event_index": -1, + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "2787000", + "type_": "0x1::aptos_coin::GasFeeEvent", + "is_gas_fee": true, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::code::publish_package_txn", + "block_height": 20040326, + "token_standard": "v1", + "transaction_timestamp": "2022-10-13T01:46:57", + "inserted_at": "2024-10-15T05:16:56.507588", + "storage_refund_amount": "0" + }, + { + "transaction_version": 278556781, + "event_index": 1, + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", + "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", + "is_frozen": null, + "amount": "1000000000000000000", + "type_": "0x1::coin::DepositEvent", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::code::publish_package_txn", + "block_height": 20040326, + "token_standard": "v1", + "transaction_timestamp": "2022-10-13T01:46:57", + "inserted_at": "2024-10-15T05:16:56.507588", + "storage_refund_amount": "0" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json new file mode 100644 index 000000000..a837b8657 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json @@ -0,0 +1,28 @@ +[ + { + "transaction_version": 278556781, + "write_set_change_index": 3, + "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10041540182", + "transaction_timestamp": "2022-10-13T01:46:57", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:56.905449" + }, + { + "transaction_version": 278556781, + "write_set_change_index": 4, + "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", + "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", + "is_primary": true, + "is_frozen": false, + "amount": "1000000000000000000", + "transaction_timestamp": "2022-10-13T01:46:57", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:56.905449" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json new file mode 100644 index 000000000..ae1143fb1 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json @@ -0,0 +1,20 @@ +[ + { + "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", + "creator_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "name": "Aptos", + "symbol": "APT", + "decimals": 10, + "icon_uri": null, + "project_uri": null, + "last_transaction_version": 278556781, + "last_transaction_timestamp": "2022-10-13T01:46:57", + "supply_aggregator_table_handle_v1": null, + "supply_aggregator_table_key_v1": null, + "token_standard": "v1", + "is_token_v2": null, + "inserted_at": "2024-10-15T05:16:56.771727", + "supply_v2": null, + "maximum_v2": null + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json new file mode 100644 index 000000000..80a05f16c --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 5523474016, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29159026553346716168", + "transaction_timestamp": "2024-07-29T00:02:18", + "transaction_epoch": 16643, + "inserted_at": "2024-10-15T05:16:57.349833" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json new file mode 100644 index 000000000..19c29be9d --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 5979639459, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29164832318786122251", + "transaction_timestamp": "2024-09-13T16:48:29", + "transaction_epoch": 17778, + "inserted_at": "2024-10-15T05:16:54.402430" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json new file mode 100644 index 000000000..a26ddda00 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json @@ -0,0 +1,26 @@ +[ + { + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10", + "last_transaction_timestamp": "2024-09-13T16:48:29", + "last_transaction_version": 5979639459, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.392129" + }, + { + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "16673484350", + "last_transaction_timestamp": "2024-09-13T16:48:29", + "last_transaction_version": 5979639459, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.392129" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json new file mode 100644 index 000000000..6c17156cd --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json @@ -0,0 +1,59 @@ +[ + { + "transaction_version": 5979639459, + "event_index": -1, + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "99900", + "type_": "0x1::aptos_coin::GasFeeEvent", + "is_gas_fee": true, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::aptos_account::transfer", + "block_height": 354619634, + "token_standard": "v1", + "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:16:54.031990", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5979639459, + "event_index": 1, + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "10", + "type_": "0x1::coin::WithdrawEvent", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::aptos_account::transfer", + "block_height": 354619634, + "token_standard": "v1", + "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:16:54.031990", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5979639459, + "event_index": 2, + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "10", + "type_": "0x1::coin::DepositEvent", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::aptos_account::transfer", + "block_height": 354619634, + "token_standard": "v1", + "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:16:54.031990", + "storage_refund_amount": "0" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json new file mode 100644 index 000000000..53a1af128 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json @@ -0,0 +1,28 @@ +[ + { + "transaction_version": 5979639459, + "write_set_change_index": 0, + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "16673484350", + "transaction_timestamp": "2024-09-13T16:48:29", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.313422" + }, + { + "transaction_version": 5979639459, + "write_set_change_index": 2, + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10", + "transaction_timestamp": "2024-09-13T16:48:29", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.313422" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json new file mode 100644 index 000000000..729a5959d --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 5992795934, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29165678689185321503", + "transaction_timestamp": "2024-09-16T06:58:10", + "transaction_epoch": 17841, + "inserted_at": "2024-10-15T05:16:56.088926" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json new file mode 100644 index 000000000..38d0269b9 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json @@ -0,0 +1,38 @@ +[ + { + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "18901942640", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:56.081056" + }, + { + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "0", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:56.081056" + }, + { + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "9996985969300000000", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:56.081056" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json new file mode 100644 index 000000000..3e6f92c89 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json @@ -0,0 +1,59 @@ +[ + { + "transaction_version": 5992795934, + "event_index": -1, + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "1200", + "type_": "0x1::aptos_coin::GasFeeEvent", + "is_gas_fee": true, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x7120b5552460116c3734ec3fed721e376bf9afc10c1bba13c678d74cd4608f12::TeviStar::force_transfer", + "block_height": 356437526, + "token_standard": "v1", + "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:16:55.666070", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5992795934, + "event_index": 0, + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_frozen": null, + "amount": "100000000", + "type_": "0x1::fungible_asset::Withdraw", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x7120b5552460116c3734ec3fed721e376bf9afc10c1bba13c678d74cd4608f12::TeviStar::force_transfer", + "block_height": 356437526, + "token_standard": "v2", + "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:16:55.666070", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5992795934, + "event_index": 1, + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_frozen": null, + "amount": "100000000", + "type_": "0x1::fungible_asset::Deposit", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x7120b5552460116c3734ec3fed721e376bf9afc10c1bba13c678d74cd4608f12::TeviStar::force_transfer", + "block_height": 356437526, + "token_standard": "v2", + "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:16:55.666070", + "storage_refund_amount": "0" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json new file mode 100644 index 000000000..9ba1049a7 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json @@ -0,0 +1,41 @@ +[ + { + "transaction_version": 5992795934, + "write_set_change_index": 0, + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "0", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.923614" + }, + { + "transaction_version": 5992795934, + "write_set_change_index": 2, + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "18901942640", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:55.923614" + }, + { + "transaction_version": 5992795934, + "write_set_change_index": 4, + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "9996985969300000000", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.923614" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/src/cli_parser.rs b/rust/integration-tests/src/cli_parser.rs new file mode 100644 index 000000000..3f5d892b9 --- /dev/null +++ b/rust/integration-tests/src/cli_parser.rs @@ -0,0 +1,52 @@ +// use once_cell::sync::Lazy; +// use std::sync::Mutex; +// +// #[derive(Debug, Clone)] +// pub struct TestArgs { +// pub generate_output: bool, +// pub output_path: Option, +// } +// +// // Define a global static to store the parsed arguments +// #[allow(dead_code)] +// static TEST_CONFIG: Lazy> = Lazy::new(|| { +// let args = parse_test_args(); +// Mutex::new(args) +// }); +// +// // Function to fetch global test args +// #[allow(dead_code)] +// pub fn get_test_config() -> (bool, Option) { +// let test_args = TEST_CONFIG.lock().unwrap().clone(); +// (test_args.generate_output, test_args.output_path) +// } +// +// pub fn parse_test_args() -> TestArgs { +// let raw_args: Vec = std::env::args().collect(); +// +// // Find the "--" separator (if it exists) +// let clap_args_position = raw_args.iter().position(|arg| arg == "--"); +// +// // Only pass the arguments that come after "--", if it exists +// let custom_args: Vec = match clap_args_position { +// Some(position) => raw_args[position + 1..].to_vec(), // Slice after `--` +// None => Vec::new(), // If no `--` is found, treat as no custom args +// }; +// +// // Manually parse the "--generate-output" flag +// let generate_output_flag = custom_args.contains(&"--generate-output".to_string()); +// +// // Manually parse the "--output-path" flag and get its associated value +// let output_path = custom_args +// .windows(2) +// .find(|args| args[0] == "--output-path") +// .map(|args| args[1].clone()); +// +// println!("Parsed generate_output_flag: {}", generate_output_flag); +// println!("Parsed output_path: {:?}", output_path); +// +// TestArgs { +// generate_output: generate_output_flag, +// output_path, +// } +// } diff --git a/rust/integration-tests/src/diff_test_helper/event_processor.rs b/rust/integration-tests/src/diff_test_helper/event_processor.rs new file mode 100644 index 000000000..28e9ea85c --- /dev/null +++ b/rust/integration-tests/src/diff_test_helper/event_processor.rs @@ -0,0 +1,30 @@ +use crate::models::queryable_models::Event; +use anyhow::Result; +use diesel::{ + pg::PgConnection, + query_dsl::methods::{FilterDsl, ThenOrderDsl}, + ExpressionMethods, RunQueryDsl, +}; +use processor::schema::events::dsl::*; +use serde_json::Value; +use std::collections::HashMap; + +#[allow(dead_code)] +pub fn load_data(conn: &mut PgConnection, txn_version: &str) -> Result> { + let mut result_map: HashMap = HashMap::new(); + + let events_result = events + .filter(transaction_version.eq(txn_version.parse::().unwrap())) + .then_order_by(event_index.asc()) + .load::(conn); + + let all_events = events_result?; + let events_json_data = serde_json::to_string_pretty(&all_events)?; + + result_map.insert( + "events".to_string(), + serde_json::from_str(&events_json_data)?, + ); + + Ok(result_map) +} diff --git a/rust/integration-tests/src/diff_test_helper/fungible_asset_processor.rs b/rust/integration-tests/src/diff_test_helper/fungible_asset_processor.rs new file mode 100644 index 000000000..24a730350 --- /dev/null +++ b/rust/integration-tests/src/diff_test_helper/fungible_asset_processor.rs @@ -0,0 +1,95 @@ +use crate::models::queryable_models::{ + CoinSupply, CurrentFungibleAssetBalance, FungibleAssetActivity, FungibleAssetBalance, + FungibleAssetMetadataModel, +}; +use anyhow::Result; +use diesel::{ + pg::PgConnection, + query_dsl::methods::{FilterDsl, ThenOrderDsl}, + ExpressionMethods, RunQueryDsl, +}; +use processor::schema::{ + coin_supply::dsl as cs_dsl, current_fungible_asset_balances_legacy::dsl as cfab_dsl, + fungible_asset_activities::dsl as faa_dsl, fungible_asset_balances::dsl as fab_dsl, + fungible_asset_metadata::dsl as fam_dsl, +}; +use serde_json::Value; +use std::collections::HashMap; + +#[allow(dead_code)] +pub fn load_data(conn: &mut PgConnection, txn_version: &str) -> Result> { + let mut result_map: HashMap = HashMap::new(); + + // Query from fungible_asset_activities + let fungible_asset_activities_result = faa_dsl::fungible_asset_activities + .filter(faa_dsl::transaction_version.eq(txn_version.parse::().unwrap())) + .then_order_by(faa_dsl::event_index.asc()) + .load::(conn); + let all_fungible_asset_activities = fungible_asset_activities_result?; + let fungible_asset_activities_json = + serde_json::to_string_pretty(&all_fungible_asset_activities)?; + result_map.insert( + "fungible_asset_activities".to_string(), + serde_json::from_str(&fungible_asset_activities_json)?, + ); + + // Query from fungible_asset_metadata + let fungible_asset_metadata_result = fam_dsl::fungible_asset_metadata + .filter(fam_dsl::last_transaction_version.eq(txn_version.parse::().unwrap())) + .load::(conn); + let all_fungible_asset_metadata = fungible_asset_metadata_result?; + let fungible_asset_metadata_json = serde_json::to_string_pretty(&all_fungible_asset_metadata)?; + result_map.insert( + "fungible_asset_metadata".to_string(), + serde_json::from_str(&fungible_asset_metadata_json)?, + ); + + // Query from fungible_asset_balances + let fungible_asset_balances_result = fab_dsl::fungible_asset_balances + .filter(fab_dsl::transaction_version.eq(txn_version.parse::().unwrap())) + .load::(conn); + let all_fungible_asset_balances = fungible_asset_balances_result?; + let fungible_asset_balances_json = serde_json::to_string_pretty(&all_fungible_asset_balances)?; + result_map.insert( + "fungible_asset_balances".to_string(), + serde_json::from_str(&fungible_asset_balances_json)?, + ); + + // Query from current_fungible_asset_balances + let current_fungible_asset_balances_result = cfab_dsl::current_fungible_asset_balances_legacy + .filter(cfab_dsl::last_transaction_version.eq(txn_version.parse::().unwrap())) + .load::(conn); + let all_current_fungible_asset_balances = current_fungible_asset_balances_result?; + let current_fungible_asset_balances_json = + serde_json::to_string_pretty(&all_current_fungible_asset_balances)?; + result_map.insert( + "current_fungible_asset_balances".to_string(), + serde_json::from_str(¤t_fungible_asset_balances_json)?, + ); + + // Query from current_unified_fungible_asset_balances + // TODO: handle v1 and v2 + // let current_unified_fungible_asset_balances_result = cu_fab_dsl::current_fungible_asset_balances + // .filter(cu_fab_dsl::transaction_version.eq(txn_version.parse::().unwrap())) + // .load::(conn); + // let all_current_unified_fungible_asset_balances = current_unified_fungible_asset_balances_result?; + // let current_unified_fungible_asset_balances_json = serde_json::to_string_pretty(&all_current_unified_fungible_asset_balances)?; + // result_map.insert( + // "current_unified_fungible_asset_balances".to_string(), + // serde_json::from_str(¤t_unified_fungible_asset_balances_json)?, + // ); + + // Query from coin_supply + let coin_supply_result = cs_dsl::coin_supply + .filter(cs_dsl::transaction_version.eq(txn_version.parse::().unwrap())) + .load::(conn); + let all_coin_supply = coin_supply_result?; + let coin_supply_json = serde_json::to_string_pretty(&all_coin_supply)?; + result_map.insert( + "coin_supply".to_string(), + serde_json::from_str(&coin_supply_json)?, + ); + + // Return the complete map containing all table data + Ok(result_map) +} diff --git a/rust/integration-tests/src/diff_test_helper/mod.rs b/rust/integration-tests/src/diff_test_helper/mod.rs index a140cebda..78624537a 100644 --- a/rust/integration-tests/src/diff_test_helper/mod.rs +++ b/rust/integration-tests/src/diff_test_helper/mod.rs @@ -1,10 +1,3 @@ -use diesel::pg::PgConnection; -use serde_json::Value; - -pub mod processors; - -pub trait ProcessorTestHelper: Send + Sync { - // TODO: This only supports one table per processor. We need to support multiple tables. - #[allow(dead_code)] - fn load_data(&self, conn: &mut PgConnection, txn_version: &str) -> anyhow::Result; -} +pub mod event_processor; +pub mod fungible_asset_processor; +pub mod token_v2_processor; diff --git a/rust/integration-tests/src/diff_test_helper/processors/event_processor.rs b/rust/integration-tests/src/diff_test_helper/processors/event_processor.rs deleted file mode 100644 index 2a4656ddb..000000000 --- a/rust/integration-tests/src/diff_test_helper/processors/event_processor.rs +++ /dev/null @@ -1,25 +0,0 @@ -use crate::{diff_test_helper::ProcessorTestHelper, models::queryable_models::Event}; -use anyhow::Result; -use diesel::{ - pg::PgConnection, - query_dsl::methods::{FilterDsl, ThenOrderDsl}, - ExpressionMethods, RunQueryDsl, -}; -use processor::schema::events::dsl::*; -use serde_json::Value; - -// Example implementation for the EventsProcessor -pub struct EventsProcessorTestHelper; - -impl ProcessorTestHelper for EventsProcessorTestHelper { - fn load_data(&self, conn: &mut PgConnection, txn_version: &str) -> Result { - let events_result = events - .filter(transaction_version.eq(txn_version.parse::().unwrap())) - .then_order_by(event_index.asc()) - .load::(conn); - - let all_events = events_result?; - let json_data = serde_json::to_string_pretty(&all_events)?; - Ok(serde_json::from_str(&json_data)?) - } -} diff --git a/rust/integration-tests/src/diff_test_helper/processors/fungible_asset_processor.rs b/rust/integration-tests/src/diff_test_helper/processors/fungible_asset_processor.rs deleted file mode 100644 index 1c489ef81..000000000 --- a/rust/integration-tests/src/diff_test_helper/processors/fungible_asset_processor.rs +++ /dev/null @@ -1,26 +0,0 @@ -use crate::{ - diff_test_helper::ProcessorTestHelper, models::queryable_models::FungibleAssetActivity, -}; -use anyhow::Result; -use diesel::{ - pg::PgConnection, - query_dsl::methods::{FilterDsl, ThenOrderDsl}, - ExpressionMethods, RunQueryDsl, -}; -use processor::schema::fungible_asset_activities::dsl::*; -use serde_json::Value; - -pub struct FungibleAssetProcessorTestHelper; - -impl ProcessorTestHelper for FungibleAssetProcessorTestHelper { - fn load_data(&self, conn: &mut PgConnection, txn_version: &str) -> Result { - let fungible_asset_activities_result = fungible_asset_activities - .filter(transaction_version.eq(txn_version.parse::().unwrap())) - .then_order_by(event_index.asc()) - .load::(conn); - - let all_fungible_asset_activities = fungible_asset_activities_result?; - let json_data = serde_json::to_string_pretty(&all_fungible_asset_activities)?; - Ok(serde_json::from_str(&json_data)?) - } -} diff --git a/rust/integration-tests/src/diff_test_helper/processors/mod.rs b/rust/integration-tests/src/diff_test_helper/processors/mod.rs deleted file mode 100644 index 78624537a..000000000 --- a/rust/integration-tests/src/diff_test_helper/processors/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod event_processor; -pub mod fungible_asset_processor; -pub mod token_v2_processor; diff --git a/rust/integration-tests/src/diff_test_helper/processors/token_v2_processor.rs b/rust/integration-tests/src/diff_test_helper/processors/token_v2_processor.rs deleted file mode 100644 index 8921c18d2..000000000 --- a/rust/integration-tests/src/diff_test_helper/processors/token_v2_processor.rs +++ /dev/null @@ -1,24 +0,0 @@ -use crate::{diff_test_helper::ProcessorTestHelper, models::queryable_models::TokenActivityV2}; -use anyhow::Result; -use diesel::{ - pg::PgConnection, - query_dsl::methods::{FilterDsl, ThenOrderDsl}, - ExpressionMethods, RunQueryDsl, -}; -use processor::schema::token_activities_v2::dsl::*; -use serde_json::Value; - -pub struct TokenV2ProcessorTestHelper; - -impl ProcessorTestHelper for TokenV2ProcessorTestHelper { - fn load_data(&self, conn: &mut PgConnection, txn_version: &str) -> Result { - let token_activities_v2_result = token_activities_v2 - .filter(transaction_version.eq(txn_version.parse::().unwrap())) - .then_order_by(event_index.asc()) - .load::(conn); - - let all_collections_v2 = token_activities_v2_result?; - let json_data = serde_json::to_string_pretty(&all_collections_v2)?; - Ok(serde_json::from_str(&json_data)?) - } -} diff --git a/rust/integration-tests/src/diff_test_helper/token_v2_processor.rs b/rust/integration-tests/src/diff_test_helper/token_v2_processor.rs new file mode 100644 index 000000000..7c96f7122 --- /dev/null +++ b/rust/integration-tests/src/diff_test_helper/token_v2_processor.rs @@ -0,0 +1,30 @@ +use crate::models::queryable_models::TokenActivityV2; +use anyhow::Result; +use diesel::{ + pg::PgConnection, + query_dsl::methods::{FilterDsl, ThenOrderDsl}, + ExpressionMethods, RunQueryDsl, +}; +use processor::schema::token_activities_v2::dsl::*; +use serde_json::Value; +use std::collections::HashMap; + +#[allow(dead_code)] +pub fn load_data(conn: &mut PgConnection, txn_version: &str) -> Result> { + let mut result_map: HashMap = HashMap::new(); + + let token_activities_v2_result = token_activities_v2 + .filter(transaction_version.eq(txn_version.parse::().unwrap())) + .then_order_by(event_index.asc()) + .load::(conn); + + let all_collections_v2 = token_activities_v2_result?; + let token_activities_v2_json_data = serde_json::to_string_pretty(&all_collections_v2)?; + + result_map.insert( + "token_activities_v2".to_string(), + serde_json::from_str(&token_activities_v2_json_data)?, + ); + + Ok(result_map) +} diff --git a/rust/integration-tests/src/diff_tests/all_tests.rs b/rust/integration-tests/src/diff_tests/all_tests.rs index a140d6d4c..cbf60125a 100644 --- a/rust/integration-tests/src/diff_tests/all_tests.rs +++ b/rust/integration-tests/src/diff_tests/all_tests.rs @@ -4,12 +4,9 @@ mod test { use crate::{ diff_test_helper::{ - processors::{ - event_processor::EventsProcessorTestHelper, - fungible_asset_processor::FungibleAssetProcessorTestHelper, - token_v2_processor::TokenV2ProcessorTestHelper, - }, - ProcessorTestHelper, + event_processor::load_data as load_event_data, + fungible_asset_processor::load_data as load_fungible_asset_data, + token_v2_processor::load_data as load_token_v2_data, }, diff_tests::{ get_expected_imported_mainnet_txns, get_expected_imported_testnet_txns, @@ -20,19 +17,31 @@ mod test { use aptos_indexer_test_transactions::{ ALL_IMPORTED_MAINNET_TXNS, ALL_IMPORTED_TESTNET_TXNS, ALL_SCRIPTED_TRANSACTIONS, }; + use aptos_indexer_testing_framework::{ + cli_parser::get_test_config, sdk_test_context::generate_output_file, + }; use assert_json_diff::assert_json_eq; use diesel::pg::PgConnection; use processor::processors::token_v2_processor::TokenV2ProcessorConfig; - use std::{collections::HashMap, fs, sync::Arc}; + use std::fs; + + const DEFAULT_OUTPUT_FOLDER: &str = "expected_db_output_files"; #[tokio::test] async fn test_all_testnet_txns_schema_output_for_all_processors() { + let (generate_output_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path + .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "/imported_testnet_txns"); + let processor_configs = get_processor_configs(); let test_context = TestContext::new(ALL_IMPORTED_TESTNET_TXNS).await.unwrap(); run_processor_tests( processor_configs, &test_context, + generate_output_flag, + output_path, + false, get_expected_imported_testnet_txns, ) .await; @@ -40,12 +49,18 @@ mod test { #[tokio::test] async fn test_all_mainnet_txns_schema_output_for_all_processors() { + let (generate_output_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path + .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "/imported_mainnet_txns"); + let processor_configs = get_processor_configs(); let test_context = TestContext::new(ALL_IMPORTED_MAINNET_TXNS).await.unwrap(); - run_processor_tests( processor_configs, &test_context, + generate_output_flag, + output_path, + false, get_expected_imported_mainnet_txns, ) .await; @@ -53,68 +68,107 @@ mod test { #[tokio::test] async fn test_all_scripted_txns_schema_output_for_all_processors() { + let (generate_output_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path + .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "/scripted_txns"); + let processor_configs = get_processor_configs(); let test_context = TestContext::new(ALL_SCRIPTED_TRANSACTIONS).await.unwrap(); - run_processor_tests(processor_configs, &test_context, get_expected_scripted_txns).await; + run_processor_tests( + processor_configs, + &test_context, + generate_output_flag, + output_path, + true, + get_expected_scripted_txns, + ) + .await; } // Helper function to reduce duplicate code for running tests on all processors async fn run_processor_tests( processor_configs: Vec, test_context: &TestContext, - get_expected_json_path_fn: fn(&str, &str) -> String, + generate_output_flag: bool, + output_path: String, + _scripted: bool, + get_expected_json_path_fn: fn(&str, &str, &str) -> String, ) { - let processor_map = get_processor_map(); for processor_config in processor_configs { let processor_name = processor_config.config.name(); let test_type = TestType::Diff(DiffTest); + let output_path = output_path.clone(); - if let Some(test_helper) = processor_map.get(processor_name).cloned() { - test_context + let db_values_fn = match processor_name { + "events_processor" => load_event_data, + "fungible_asset_processor" => load_fungible_asset_data, + "token_v2_processor" => load_token_v2_data, + _ => panic!("Unknown processor: {}", processor_name), + }; + + test_context .run( processor_config, test_type, move |conn: &mut PgConnection, txn_version: &str| { - let mut json_data = match test_helper.load_data(conn, txn_version) { - Ok(data) => data, + + let mut db_values = match db_values_fn(conn, txn_version) { + Ok(db_data) => db_data, Err(e) => { eprintln!( "[ERROR] Failed to load data for processor {} and transaction version {}: {}", processor_name, txn_version, e ); return Err(e); - } + }, }; - let expected_json_path = get_expected_json_path_fn(processor_name, txn_version); - let mut expected_json = match read_and_parse_json(&expected_json_path) { - Ok(json) => json, - Err(e) => { - eprintln!( - "[ERROR] Error handling JSON for processor {} and transaction version {}: {}", - processor_name, txn_version, e - ); - return Err(e); + // Iterate over each table in the map and validate its data + for (table_name, db_value) in db_values.iter_mut() { + if generate_output_flag { + println!("[TEST] Generating output files for all tables."); + remove_inserted_at(db_value); + // Iterate over each table's data in the HashMap and generate an output file + generate_output_file( + processor_name, + table_name, + txn_version, + db_value, + output_path.clone(), + )?; } - }; - // TODO: we need to enhance json diff, as we might have more complex diffs. - remove_inserted_at(&mut json_data); - remove_transaction_timestamp(&mut json_data); - remove_transaction_timestamp(&mut expected_json); - assert_json_eq!(&json_data, &expected_json); + // Generate the expected JSON file path for each table + let expected_file_path = &get_expected_json_path_fn(processor_name, txn_version, table_name); + + // Read and parse the expected JSON file for the current table + let mut expected_json = match read_and_parse_json(expected_file_path) { + Ok(json) => json, + Err(e) => { + eprintln!( + "[ERROR] Error handling JSON for processor {} table {} and transaction version {}: {}", + processor_name, table_name, txn_version, e + ); + panic!("Failed to read and parse JSON for table: {}", table_name); + }, + }; + + // TODO: Clean up non-deterministic fields (e.g., timestamps, `inserted_at`) + remove_inserted_at(db_value); + remove_transaction_timestamp(db_value); + remove_inserted_at(&mut expected_json); + remove_transaction_timestamp(&mut expected_json); + + // Validate the actual vs expected JSON for the current table + assert_json_eq!(db_value, expected_json); + } - println!( - "[INFO] Test passed for processor {} and transaction version: {}", - processor_name, txn_version - ); Ok(()) }, ) .await .unwrap(); - } } } @@ -135,24 +189,6 @@ mod test { } } - fn get_processor_map() -> HashMap>> { - let mut processor_map: HashMap>> = HashMap::new(); - processor_map.insert( - "events_processor".to_string(), - Arc::new(Box::new(EventsProcessorTestHelper) as Box), - ); - processor_map.insert( - "fungible_asset_processor".to_string(), - Arc::new(Box::new(FungibleAssetProcessorTestHelper) as Box), - ); - processor_map.insert( - "token_v2_processor".to_string(), - Arc::new(Box::new(TokenV2ProcessorTestHelper) as Box), - ); - - processor_map - } - fn get_processor_configs() -> Vec { vec![ TestProcessorConfig { diff --git a/rust/integration-tests/src/diff_tests/mod.rs b/rust/integration-tests/src/diff_tests/mod.rs index 748ea82f7..0396cfce0 100644 --- a/rust/integration-tests/src/diff_tests/mod.rs +++ b/rust/integration-tests/src/diff_tests/mod.rs @@ -1,7 +1,7 @@ -use serde_json::Value; - mod all_tests; +use serde_json::Value; + #[allow(dead_code)] pub fn remove_inserted_at(value: &mut Value) { if let Some(array) = value.as_array_mut() { @@ -25,25 +25,37 @@ pub fn remove_transaction_timestamp(value: &mut Value) { } #[allow(dead_code)] -pub fn get_expected_imported_testnet_txns(processor_name: &str, txn_version: &str) -> String { +pub fn get_expected_imported_testnet_txns( + processor_name: &str, + txn_version: &str, + table_name: &str, +) -> String { format!( - "expected_db_output_files/imported_testnet_txns/{}/{}_{}.json", - processor_name, processor_name, txn_version + "expected_db_output_files/imported_testnet_txns/{}/{}/{}.json", + processor_name, txn_version, table_name ) } #[allow(dead_code)] -pub fn get_expected_imported_mainnet_txns(processor_name: &str, txn_version: &str) -> String { +pub fn get_expected_imported_mainnet_txns( + processor_name: &str, + txn_version: &str, + table_name: &str, +) -> String { format!( - "expected_db_output_files/imported_mainnet_txns/{}/{}_{}.json", - processor_name, processor_name, txn_version + "expected_db_output_files/imported_mainnet_txns/{}/{}/{}.json", + processor_name, txn_version, table_name ) } #[allow(dead_code)] -pub fn get_expected_scripted_txns(processor_name: &str, txn_version: &str) -> String { +pub fn get_expected_scripted_txns( + processor_name: &str, + txn_version: &str, + table_name: &str, +) -> String { format!( - "expected_db_output_files/scripted_txns/{}/{}_{}.json", - processor_name, processor_name, txn_version + "expected_db_output_files/scripted_txns/{}/{}/{}.json", + processor_name, txn_version, table_name ) } diff --git a/rust/integration-tests/src/lib.rs b/rust/integration-tests/src/lib.rs index 55285dc33..b26993fec 100644 --- a/rust/integration-tests/src/lib.rs +++ b/rust/integration-tests/src/lib.rs @@ -12,11 +12,15 @@ use testcontainers::{ ContainerAsync, GenericImage, ImageExt, }; +mod cli_parser; mod diff_test_helper; mod diff_tests; mod models; mod scenarios_tests; +#[cfg(test)] +mod sdk_tests; + /// The test context struct holds the test name and the transaction batches. pub struct TestContext { pub transaction_batches: Vec, @@ -120,7 +124,6 @@ impl TestContext { processor .process_transactions(vec![txn.clone()], version, version, None) .await?; - // } last_version = Some(version); diff --git a/rust/integration-tests/src/models/queryable_models.rs b/rust/integration-tests/src/models/queryable_models.rs index 42f820aa8..5105665d5 100644 --- a/rust/integration-tests/src/models/queryable_models.rs +++ b/rust/integration-tests/src/models/queryable_models.rs @@ -6,7 +6,10 @@ use bigdecimal::BigDecimal; use diesel::{Identifiable, Insertable, Queryable}; use field_count::FieldCount; -use processor::schema::{events, fungible_asset_activities, token_activities_v2}; +use processor::schema::{ + coin_supply, current_fungible_asset_balances_legacy, events, fungible_asset_activities, + fungible_asset_balances, fungible_asset_metadata, token_activities_v2, +}; use serde::{Deserialize, Serialize}; /** * Event model @@ -74,3 +77,93 @@ pub struct TokenActivityV2 { pub transaction_timestamp: chrono::NaiveDateTime, pub inserted_at: chrono::NaiveDateTime, } + +#[derive(Clone, Debug, Deserialize, FieldCount, Identifiable, Insertable, Serialize, Queryable)] +#[diesel(primary_key(transaction_version, write_set_change_index))] +#[diesel(table_name = fungible_asset_balances)] +pub struct FungibleAssetBalance { + pub transaction_version: i64, + pub write_set_change_index: i64, + pub storage_id: String, + pub owner_address: String, + pub asset_type: String, + pub is_primary: bool, + pub is_frozen: bool, + pub amount: BigDecimal, + pub transaction_timestamp: chrono::NaiveDateTime, + pub token_standard: String, + pub inserted_at: chrono::NaiveDateTime, +} + +#[derive(Clone, Debug, Deserialize, FieldCount, Identifiable, Insertable, Serialize, Queryable)] +#[diesel(primary_key(storage_id))] +#[diesel(table_name = current_fungible_asset_balances_legacy)] +pub struct CurrentFungibleAssetBalance { + pub storage_id: String, + pub owner_address: String, + pub asset_type: String, + pub is_primary: bool, + pub is_frozen: bool, + pub amount: BigDecimal, + pub last_transaction_timestamp: chrono::NaiveDateTime, + pub last_transaction_version: i64, + pub token_standard: String, + pub inserted_at: chrono::NaiveDateTime, +} + +// #[derive(Clone, Debug, Deserialize, FieldCount, Identifiable, Insertable, Serialize, Queryable, Default)] +// #[diesel(primary_key(storage_id))] +// #[diesel(table_name = current_fungible_asset_balances)] +// pub struct CurrentUnifiedFungibleAssetBalance { +// pub storage_id: String, +// pub owner_address: String, +// pub asset_type: Option, +// pub coin_type: Option, // Changed from asset_type_v1/v2 to match schema +// pub is_primary: Option, +// pub is_frozen: bool, +// pub amount_v1: Option, +// pub amount_v2: Option, +// pub amount: Option, // Added amount field to match schema +// pub last_transaction_version_v1: Option, +// pub last_transaction_version_v2: Option, +// pub last_transaction_version: Option, // Added to match schema +// pub last_transaction_timestamp_v1: Option, +// pub last_transaction_timestamp_v2: Option, +// pub last_transaction_timestamp: Option, // Added to match schema +// pub inserted_at: chrono::NaiveDateTime, +// } + +#[derive(Clone, Debug, Deserialize, FieldCount, Identifiable, Insertable, Serialize, Queryable)] +#[diesel(primary_key(asset_type))] +#[diesel(table_name = fungible_asset_metadata)] +pub struct FungibleAssetMetadataModel { + pub asset_type: String, + pub creator_address: String, + pub name: String, + pub symbol: String, + pub decimals: i32, + pub icon_uri: Option, + pub project_uri: Option, + pub last_transaction_version: i64, + pub last_transaction_timestamp: chrono::NaiveDateTime, + pub supply_aggregator_table_handle_v1: Option, + pub supply_aggregator_table_key_v1: Option, + pub token_standard: String, + pub is_token_v2: Option, + pub inserted_at: chrono::NaiveDateTime, + pub supply_v2: Option, + pub maximum_v2: Option, +} + +#[derive(Clone, Debug, Deserialize, FieldCount, Identifiable, Insertable, Serialize, Queryable)] +#[diesel(primary_key(transaction_version, coin_type_hash))] +#[diesel(table_name = coin_supply)] +pub struct CoinSupply { + pub transaction_version: i64, + pub coin_type_hash: String, + pub coin_type: String, + pub supply: BigDecimal, + pub transaction_timestamp: chrono::NaiveDateTime, + pub transaction_epoch: i64, + pub inserted_at: chrono::NaiveDateTime, +} diff --git a/rust/integration-tests/src/scenarios_tests/event_processor_tests.rs b/rust/integration-tests/src/scenarios_tests/event_processor_tests.rs index de6b1a3cf..727e967b3 100644 --- a/rust/integration-tests/src/scenarios_tests/event_processor_tests.rs +++ b/rust/integration-tests/src/scenarios_tests/event_processor_tests.rs @@ -37,7 +37,6 @@ mod test { processor_config, test_type, move |conn: &mut PgConnection, version: &str| { - println!("version: {}", version); // Load and validate events let withdraw_events = load_transaction_events( conn, diff --git a/rust/integration-tests/src/sdk_tests/events_processor_tests.rs b/rust/integration-tests/src/sdk_tests/events_processor_tests.rs new file mode 100644 index 000000000..8538047b6 --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/events_processor_tests.rs @@ -0,0 +1,101 @@ +#[allow(clippy::needless_return)] +#[cfg(test)] +mod tests { + use crate::{ + diff_test_helper::event_processor::load_data, + sdk_tests::{ + run_processor_test, setup_test_environment, validate_json, DEFAULT_OUTPUT_FOLDER, + }, + }; + use ahash::AHashMap; + use aptos_indexer_test_transactions::ALL_IMPORTED_TESTNET_TXNS; + use aptos_indexer_testing_framework::{cli_parser::get_test_config, database::TestDatabase}; + use aptos_protos::transaction::v1::Transaction; + use sdk_processor::{ + config::{ + db_config::{DbConfig, PostgresConfig}, + indexer_processor_config::IndexerProcessorConfig, + processor_config::{DefaultProcessorConfig, ProcessorConfig}, + }, + processors::events_processor::EventsProcessor, + }; + use std::collections::HashSet; + + // This test cases runs the events processor and validates the output of all available transactions proto jsons + #[tokio::test] + async fn testnet_events_processor_db_output_diff_test() { + let (diff_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path + .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "imported_testnet_txns"); + + // Step 1: set up an input transaction that will be used + let transaction_batches = ALL_IMPORTED_TESTNET_TXNS + .iter() + .map(|txn| serde_json::from_slice(txn).unwrap()) + .collect::>(); + + let (db, mut test_context) = setup_test_environment(ALL_IMPORTED_TESTNET_TXNS).await; + + // Step 2: Loop over each transaction and run the test for each + for txn in transaction_batches.iter() { + let txn_version = txn.version; + + // Step 3: Run the processor + let db_url = db.get_db_url(); + + let transaction_stream_config = + test_context.create_transaction_stream_config(txn_version); + let postgres_config = PostgresConfig { + connection_string: db_url.to_string(), + db_pool_size: 100, + }; + + let db_config = DbConfig::PostgresConfig(postgres_config); + let default_processor_config = DefaultProcessorConfig { + per_table_chunk_sizes: AHashMap::new(), + channel_size: 100, + deprecated_tables: HashSet::new(), + }; + + let processor_config = ProcessorConfig::EventsProcessor(default_processor_config); + let process_name = processor_config.name(); + let indexer_processor_config = IndexerProcessorConfig { + processor_config, + transaction_stream_config, + db_config, + }; + + let events_processor = EventsProcessor::new(indexer_processor_config) + .await + .expect("Failed to create EventsProcessor"); + + match run_processor_test( + &mut test_context, + events_processor, + load_data, + &db_url, + txn_version, + diff_flag, + output_path.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version, + process_name, + output_path.clone(), + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + txn_version, e + ); + panic!("Test failed due to processor error"); + }, + } + } + } +} diff --git a/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs b/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs new file mode 100644 index 000000000..7ad4a4c5b --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs @@ -0,0 +1,100 @@ +#[allow(clippy::needless_return)] +#[cfg(test)] +mod tests { + use crate::{ + diff_test_helper::fungible_asset_processor::load_data, + sdk_tests::{ + run_processor_test, setup_test_environment, validate_json, DEFAULT_OUTPUT_FOLDER, + }, + }; + use ahash::AHashMap; + use aptos_indexer_test_transactions::ALL_IMPORTED_TESTNET_TXNS; + use aptos_indexer_testing_framework::{cli_parser::get_test_config, database::TestDatabase}; + use aptos_protos::transaction::v1::Transaction; + use sdk_processor::{ + config::{ + db_config::{DbConfig, PostgresConfig}, + indexer_processor_config::IndexerProcessorConfig, + processor_config::{DefaultProcessorConfig, ProcessorConfig}, + }, + processors::fungible_asset_processor::FungibleAssetProcessor, + }; + use std::collections::HashSet; + + #[tokio::test] + async fn fa_processor_db_output_diff_test() { + let (diff_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path + .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "imported_testnet_txns"); + + let transaction_batches = ALL_IMPORTED_TESTNET_TXNS + .iter() + .map(|txn| serde_json::from_slice(txn).unwrap()) + .collect::>(); + + let (db, mut test_context) = setup_test_environment(ALL_IMPORTED_TESTNET_TXNS).await; + + // Step 2: Loop over each transaction and run the test for each + for txn in transaction_batches.iter() { + let txn_version = txn.version; + + // Step 3: Run the processor + let db_url = db.get_db_url(); + + let transaction_stream_config = + test_context.create_transaction_stream_config(txn_version); + let postgres_config = PostgresConfig { + connection_string: db_url.to_string(), + db_pool_size: 100, + }; + + let db_config = DbConfig::PostgresConfig(postgres_config); + let default_processor_config = DefaultProcessorConfig { + per_table_chunk_sizes: AHashMap::new(), + channel_size: 100, + deprecated_tables: HashSet::new(), + }; + + let processor_config = + ProcessorConfig::FungibleAssetProcessor(default_processor_config); + + let indexer_processor_config = IndexerProcessorConfig { + processor_config, + transaction_stream_config, + db_config, + }; + + let fungible_asset_processor = FungibleAssetProcessor::new(indexer_processor_config) + .await + .expect("Failed to create FungibleAssetProcessor"); + + match run_processor_test( + &mut test_context, + fungible_asset_processor, + load_data, + &db_url, + txn_version, + diff_flag, + output_path.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version, + "fungible_asset_processor", + output_path.clone(), + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + txn_version, e + ); + panic!("Test failed due to processor error"); + }, + } + } + } +} diff --git a/rust/integration-tests/src/sdk_tests/mod.rs b/rust/integration-tests/src/sdk_tests/mod.rs new file mode 100644 index 000000000..f60333cf3 --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/mod.rs @@ -0,0 +1,135 @@ +use crate::diff_tests::remove_transaction_timestamp; +use aptos_indexer_processor_sdk::traits::processor_trait::ProcessorTrait; +use aptos_indexer_testing_framework::{ + database::{PostgresTestDatabase, TestDatabase}, + sdk_test_context::{remove_inserted_at, SdkTestContext}, +}; +use assert_json_diff::assert_json_eq; +use diesel::{Connection, PgConnection}; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path}; + +mod events_processor_tests; +mod fungible_asset_processor_tests; +mod test_cli_flag_util; + +#[allow(dead_code)] +const DEFAULT_OUTPUT_FOLDER: &str = "sdk_expected_db_output_files/"; + +pub fn read_and_parse_json(path: &str) -> anyhow::Result { + match fs::read_to_string(path) { + Ok(content) => match serde_json::from_str::(&content) { + Ok(json) => Ok(json), + Err(e) => { + eprintln!("[ERROR] Failed to parse JSON at {}: {}", path, e); + Err(anyhow::anyhow!("Failed to parse JSON: {}", e)) + }, + }, + Err(e) => { + eprintln!("[ERROR] Failed to read file at {}: {}", path, e); + Err(anyhow::anyhow!("Failed to read file: {}", e)) + }, + } +} + +// Common setup for database and test context +async fn setup_test_environment(transactions: &[&[u8]]) -> (PostgresTestDatabase, SdkTestContext) { + let mut db = PostgresTestDatabase::new(); + db.setup().await.unwrap(); + + let test_context = SdkTestContext::new(transactions).await.unwrap(); + + (db, test_context) +} + +fn validate_json( + db_values: &mut HashMap, + txn_version: u64, + processor_name: &str, + output_path: String, +) -> anyhow::Result<()> { + for (table_name, db_value) in db_values.iter_mut() { + // Generate the expected JSON file path for each table + let expected_file_path = Path::new(&output_path) + .join(processor_name) + .join(txn_version.to_string()) + .join(format!("{}.json", table_name)); // File name format: processor_table_txnVersion.json + + let mut expected_json = match read_and_parse_json(expected_file_path.to_str().unwrap()) { + Ok(json) => json, + Err(e) => { + eprintln!( + "[ERROR] Error handling JSON for processor {} table {} and transaction version {}: {}", + processor_name, table_name, txn_version, e + ); + panic!("Failed to read and parse JSON for table: {}", table_name); + }, + }; + + // TODO: Clean up non-deterministic fields (e.g., timestamps, `inserted_at`) + remove_inserted_at(db_value); + remove_transaction_timestamp(db_value); + remove_inserted_at(&mut expected_json); + remove_transaction_timestamp(&mut expected_json); + + assert_json_eq!(db_value, expected_json); + } + Ok(()) +} + +// Helper function to configure and run the processor +async fn run_processor_test( + test_context: &mut SdkTestContext, + processor: impl ProcessorTrait, + load_data: F, + db_url: &str, + txn_version: u64, + diff_flag: bool, + output_path: String, +) -> anyhow::Result> +where + F: Fn(&mut PgConnection, &str) -> anyhow::Result> + + Send + + Sync + + 'static, +{ + println!( + "[INFO] Running {} test for transaction version: {}", + processor.name(), + txn_version + ); + + let db_value = test_context + .run( + &processor, + db_url, + txn_version, + diff_flag, + output_path.clone(), + move |db_url| { + // TODO: might not need this. + let mut conn = + PgConnection::establish(db_url).expect("Failed to establish DB connection"); + + let db_values = match load_data(&mut conn, &txn_version.to_string()) { + Ok(db_data) => db_data, + Err(e) => { + eprintln!( + "[ERROR] Failed to load data for transaction version {}: {}", + txn_version, e + ); + return Err(e); + }, + }; + + if db_values.is_empty() { + eprintln!("[WARNING] No data found for txn version: {}", txn_version); + } + + Ok(db_values) + }, + ) + .await?; + + Ok(db_value) +} diff --git a/rust/integration-tests/src/sdk_tests/temp.rs b/rust/integration-tests/src/sdk_tests/temp.rs new file mode 100644 index 000000000..79986514c --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/temp.rs @@ -0,0 +1,140 @@ +#[allow(clippy::needless_return)] +#[cfg(test)] +mod tests { + use crate::{ + diff_test_helper::{ + processors::fungible_asset_processor::FungibleAssetProcessorTestHelper, + }, + sdk_tests::{ + setup_test_environment, + test_cli_flag_util::{parse_test_args, TestArgs}, + validate_json, + }, + }; + use ahash::AHashMap; + use aptos_indexer_test_transactions::ALL_IMPORTED_TESTNET_TXNS; + use aptos_indexer_testing_framework::{ + database::{TestDatabase}, + }; + use aptos_protos::transaction::v1::Transaction; + use once_cell::sync::Lazy; + use sdk_processor::{ + config::{ + db_config::{DbConfig, PostgresConfig}, + indexer_processor_config::IndexerProcessorConfig, + processor_config::{ + DefaultProcessorConfig, ProcessorConfig, + }, + }, + processors::fungible_asset_processor::FungibleAssetProcessor, + }; + use std::{collections::HashSet}; + use crate::sdk_tests::run_processor_test; + use crate::sdk_tests::get_test_config; + use crate::sdk_tests::DEFAULT_OUTPUT_FOLDER; + use std::collections::HashMap; + + #[tokio::test] + async fn fa_processor_db_output_diff_test() { + // Step 0: Get the test configuration (args) + let (diff_flag , custom_output_path) = get_test_config(); + let output_path = custom_output_path.unwrap_or_else(|| { + DEFAULT_OUTPUT_FOLDER.to_string() + "imported_testnet_txns"}); + let mut version_to_txn_name = HashMap::new(); + // Step 1: set up an input transaction that will be used + let transaction_batches = ALL_IMPORTED_TESTNET_TXNS + .iter() + .map(|&txn| { + // we are only going to use this txn_name for scripted txn + let txn_name = get_transaction_name(txn) + .unwrap_or("imported_transactions") + .to_string(); + let txn: Transaction = serde_json::from_slice(txn).unwrap(); + let txn_version = txn.version; + version_to_txn_name.insert(txn_version, txn_name.to_string()); + txn + }) + .collect::>(); + + + // .map(|txn| serde_json::from_slice(txn).unwrap()) + // .collect::>(); + + // for scdripted: + // .map(|&txn| { + // // we are only going to use this txn_name for scripted txn + // let txn_name = get_transaction_name(txn) + // .unwrap_or("imported_transactions") + // .to_string(); + // let txn: Transaction = serde_json::from_slice(txn).unwrap(); + // let txn_version = txn.version; + // version_to_txn_name.insert(txn_version, txn_name.to_string()); + // txn + // }) + + let (db, mut test_context) = setup_test_environment(ALL_IMPORTED_TESTNET_TXNS).await; + + // Step 2: Loop over each transaction and run the test for each + for txn in transaction_batches.iter() { + let txn_version = txn.version; + + // Step 3: Run the processor + let db_url = db.get_db_url(); + + let transaction_stream_config = test_context.create_transaction_stream_config(txn_version); + let postgres_config = PostgresConfig { + connection_string: db_url.to_string(), + db_pool_size: 100, + }; + + let db_config = DbConfig::PostgresConfig(postgres_config); + let default_processor_config = DefaultProcessorConfig { + per_table_chunk_sizes: AHashMap::new(), + channel_size: 100, + deprecated_tables: HashSet::new(), + }; + + let processor_config = ProcessorConfig::FungibleAssetProcessor(default_processor_config); + + let indexer_processor_config = IndexerProcessorConfig { + processor_config, + transaction_stream_config, + db_config, + }; + + let fungible_asset_processor = FungibleAssetProcessor::new(indexer_processor_config) + .await + .expect("Failed to create FungibleAssetProcessor"); + + let test_helper = FungibleAssetProcessorTestHelper; + + match run_processor_test( + &mut test_context, + fungible_asset_processor, + test_helper, + &db_url, + txn_version, + diff_flag, + output_path.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version, + "fungible_asset_processor", + output_path.clone(), + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + txn_version, e + ); + panic!("Test failed due to processor error"); + }, + } + } + } +} diff --git a/rust/integration-tests/src/sdk_tests/test_cli_flag_util.rs b/rust/integration-tests/src/sdk_tests/test_cli_flag_util.rs new file mode 100644 index 000000000..c84793565 --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/test_cli_flag_util.rs @@ -0,0 +1,43 @@ +#[allow(dead_code)] +#[derive(Debug, Clone)] +pub struct TestArgs { + pub generate_output: bool, + pub output_path: Option, +} + +#[allow(dead_code)] +pub fn parse_test_args() -> TestArgs { + // Capture the raw arguments + let raw_args: Vec = std::env::args().collect(); + + // Log the raw arguments for debugging + println!("Raw arguments: {:?}", raw_args); + + // Find the "--" separator (if it exists) + let clap_args_position = raw_args.iter().position(|arg| arg == "--"); + + // Only pass the arguments that come after "--", if it exists + let custom_args: Vec = match clap_args_position { + Some(position) => raw_args[position + 1..].to_vec(), // Slice after `--` + None => Vec::new(), // If no `--` is found, treat as no custom args + }; + println!("Custom arguments: {:?}", custom_args); + + // Manually parse the "--generate-output" flag + let generate_output_flag = custom_args.contains(&"--generate-output".to_string()); + + // Manually parse the "--output-path" flag and get its associated value + let output_path = custom_args + .windows(2) + .find(|args| args[0] == "--output-path") + .map(|args| args[1].clone()); // Correct the flag name to `--output-path` + + // Log the parsed values + println!("Parsed generate_output_flag: {}", generate_output_flag); + println!("Parsed output_path: {:?}", output_path); + + TestArgs { + generate_output: generate_output_flag, + output_path, + } +} diff --git a/rust/processor/src/db/postgres/schema.rs b/rust/processor/src/db/postgres/schema.rs index 43f091757..42634a353 100644 --- a/rust/processor/src/db/postgres/schema.rs +++ b/rust/processor/src/db/postgres/schema.rs @@ -837,8 +837,8 @@ diesel::table! { supply_aggregator_table_key_v1 -> Nullable, #[max_length = 10] token_standard -> Varchar, - inserted_at -> Timestamp, is_token_v2 -> Nullable, + inserted_at -> Timestamp, supply_v2 -> Nullable, maximum_v2 -> Nullable, } diff --git a/rust/sdk-processor/src/config/indexer_processor_config.rs b/rust/sdk-processor/src/config/indexer_processor_config.rs index 8d5fde492..6b3921613 100644 --- a/rust/sdk-processor/src/config/indexer_processor_config.rs +++ b/rust/sdk-processor/src/config/indexer_processor_config.rs @@ -6,7 +6,10 @@ use crate::processors::{ events_processor::EventsProcessor, fungible_asset_processor::FungibleAssetProcessor, }; use anyhow::Result; -use aptos_indexer_processor_sdk::aptos_indexer_transaction_stream::TransactionStreamConfig; +use aptos_indexer_processor_sdk::{ + aptos_indexer_transaction_stream::TransactionStreamConfig, + traits::processor_trait::ProcessorTrait, +}; use aptos_indexer_processor_sdk_server_framework::RunnableConfig; use serde::{Deserialize, Serialize}; diff --git a/rust/sdk-processor/src/processors/events_processor.rs b/rust/sdk-processor/src/processors/events_processor.rs index 115ffff06..853f16da2 100644 --- a/rust/sdk-processor/src/processors/events_processor.rs +++ b/rust/sdk-processor/src/processors/events_processor.rs @@ -20,7 +20,7 @@ use aptos_indexer_processor_sdk::{ aptos_indexer_transaction_stream::{TransactionStream, TransactionStreamConfig}, builder::ProcessorBuilder, common_steps::{OrderByVersionStep, TransactionStreamStep}, - traits::IntoRunnableStep, + traits::{processor_trait::ProcessorTrait, IntoRunnableStep}, }; use std::time::Duration; use tracing::{debug, info}; @@ -53,8 +53,15 @@ impl EventsProcessor { }, } } +} + +#[async_trait::async_trait] +impl ProcessorTrait for EventsProcessor { + fn name(&self) -> &'static str { + self.config.processor_config.name() + } - pub async fn run_processor(self) -> Result<()> { + async fn run_processor(&self) -> Result<()> { let processor_name = self.config.processor_config.name(); // Run migrations @@ -78,7 +85,7 @@ impl EventsProcessor { .await?; check_or_update_chain_id(grpc_chain_id as i64, self.db_pool.clone()).await?; - let processor_config = match self.config.processor_config { + let processor_config = match self.config.processor_config.clone() { ProcessorConfig::EventsProcessor(processor_config) => processor_config, _ => { return Err(anyhow::anyhow!( @@ -92,7 +99,7 @@ impl EventsProcessor { // Define processor steps let transaction_stream = TransactionStreamStep::new(TransactionStreamConfig { starting_version: Some(starting_version), - ..self.config.transaction_stream_config + ..self.config.transaction_stream_config.clone() }) .await?; let events_extractor = EventsExtractor {}; diff --git a/rust/sdk-processor/src/processors/fungible_asset_processor.rs b/rust/sdk-processor/src/processors/fungible_asset_processor.rs index 1351fd07a..8890b9937 100644 --- a/rust/sdk-processor/src/processors/fungible_asset_processor.rs +++ b/rust/sdk-processor/src/processors/fungible_asset_processor.rs @@ -27,6 +27,7 @@ use aptos_indexer_processor_sdk::{ }; use processor::worker::TableFlags; use std::time::Duration; +use aptos_indexer_processor_sdk::traits::processor_trait::ProcessorTrait; use tracing::{debug, info}; pub struct FungibleAssetProcessor { @@ -57,8 +58,15 @@ impl FungibleAssetProcessor { }, } } +} + +#[async_trait::async_trait] +impl ProcessorTrait for FungibleAssetProcessor { + fn name(&self) -> &'static str { + self.config.processor_config.name() + } - pub async fn run_processor(self) -> Result<()> { + async fn run_processor(&self) -> Result<()> { let processor_name = self.config.processor_config.name(); // Run migrations @@ -68,7 +76,7 @@ impl FungibleAssetProcessor { postgres_config.connection_string.clone(), self.db_pool.clone(), ) - .await; + .await; }, } @@ -82,7 +90,7 @@ impl FungibleAssetProcessor { .await?; check_or_update_chain_id(grpc_chain_id as i64, self.db_pool.clone()).await?; - let processor_config = match self.config.processor_config { + let processor_config = match &self.config.processor_config { ProcessorConfig::FungibleAssetProcessor(processor_config) => processor_config, _ => return Err(anyhow::anyhow!("Processor config is wrong type")), }; @@ -92,13 +100,13 @@ impl FungibleAssetProcessor { // Define processor steps let transaction_stream = TransactionStreamStep::new(TransactionStreamConfig { starting_version: Some(starting_version), - ..self.config.transaction_stream_config + ..self.config.transaction_stream_config.clone() }) - .await?; + .await?; let fa_extractor = FungibleAssetExtractor {}; let fa_storer = FungibleAssetStorer::new( self.db_pool.clone(), - processor_config, + processor_config.clone(), deprecated_table_flags, ); let order_step = OrderByVersionStep::new( @@ -112,20 +120,20 @@ impl FungibleAssetProcessor { let (_, buffer_receiver) = ProcessorBuilder::new_with_inputless_first_step( transaction_stream.into_runnable_step(), ) - .connect_to(fa_extractor.into_runnable_step(), channel_size) - .connect_to(fa_storer.into_runnable_step(), channel_size) - .connect_to(order_step.into_runnable_step(), channel_size) - .connect_to(version_tracker.into_runnable_step(), channel_size) - .end_and_return_output_receiver(channel_size); + .connect_to(fa_extractor.into_runnable_step(), channel_size) + .connect_to(fa_storer.into_runnable_step(), channel_size) + .connect_to(order_step.into_runnable_step(), channel_size) + .connect_to(version_tracker.into_runnable_step(), channel_size) + .end_and_return_output_receiver(channel_size); // (Optional) Parse the results loop { match buffer_receiver.recv().await { Ok(txn_context) => { debug!( - "Finished processing versions [{:?}, {:?}]", - txn_context.metadata.start_version, txn_context.metadata.end_version, - ); + "Finished processing versions [{:?}, {:?}]", + txn_context.metadata.start_version, txn_context.metadata.end_version, + ); }, Err(e) => { info!("No more transactions in channel: {:?}", e); @@ -134,4 +142,4 @@ impl FungibleAssetProcessor { } } } -} +} \ No newline at end of file diff --git a/rust/sdk-processor/src/steps/events_processor/events_extractor.rs b/rust/sdk-processor/src/steps/events_processor/events_extractor.rs index 442148c76..bb444d986 100644 --- a/rust/sdk-processor/src/steps/events_processor/events_extractor.rs +++ b/rust/sdk-processor/src/steps/events_processor/events_extractor.rs @@ -57,6 +57,7 @@ impl Processable for EventsExtractor { TxnData::BlockMetadata(tx_inner) => &tx_inner.events, TxnData::Genesis(tx_inner) => &tx_inner.events, TxnData::User(tx_inner) => &tx_inner.events, + TxnData::Validator(tx_inner) => &tx_inner.events, _ => &default, };