From 2dc38bfbe372bf3402c189df56e1d4d8975d2ffb Mon Sep 17 00:00:00 2001 From: Gaston Ponti Date: Fri, 11 Aug 2023 19:06:06 -0300 Subject: [PATCH] Remove CIP20 precompile (gingerbread) --- core/vm/contracts.go | 2 +- .../test-precompile-wrappers/cip20.json | 274 ------------------ .../test-precompile-wrappers/cip20.test.ts | 34 --- 3 files changed, 1 insertion(+), 309 deletions(-) delete mode 100644 e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.json delete mode 100644 e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.test.ts diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 2c28ab5272..b3e73961fd 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -222,7 +222,6 @@ var PrecompiledContractsGingerbreadP2 = map[common.Address]CeloPrecompiledContra // New in Donut hard fork celoPrecompileAddress(12): &ed25519Verify{}, - celoPrecompileAddress(29): &wrap{&cip20HashFunctions{Cip20HashesDonut}}, celoPrecompileAddress(30): &getValidatorBLS{}, // Precompiles removed in Gingerbread P2 hard fork @@ -242,6 +241,7 @@ var PrecompiledContractsGingerbreadP2 = map[common.Address]CeloPrecompiledContra // * bls12377G2Mul // * bls12377G2MultiExp // * bls12377Pairing + // * cip20HashFunctions } var ( diff --git a/e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.json b/e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.json deleted file mode 100644 index a324b276f7..0000000000 --- a/e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.json +++ /dev/null @@ -1,274 +0,0 @@ -[ - { - "preimage": "616263", - "sha2_512": "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f", - "keccak512": "18587dc2ea106b9a1563e32b3312421ca164c7f1f07bc922a9c83d77cea3a1e5d0c69910739025372dc14ac9642629379540c17e2a65b19d77aa511a9d00bb96", - "sha3_256": "3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532", - "sha3_512": "b751850b1a57168a5693cd924b6b096e08f621827444f70d884f5d0240d2712e10e116e9192af3c91a7ec57647e3934057340b4cf408d5a56592f8274eec53f0", - "blake2s": "508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982" - }, - { - "preimage": "", - "sha2_512": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", - "keccak512": "0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e", - "sha3_256": "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a", - "sha3_512": "a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26", - "blake2s": "69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9" - }, - { - "preimage": "277654f3bc5110c653f24c9e15e0cd1363021156e2e4e49e94727df6b5627ab0", - "keccak512": "7c16fe4679063f6d33a83f9f133f7d331d85ccd25d072cb638779b08372a186e48d78ad615c6ffce659bf81ec97bc235f829dede1bbf99f77ec5ba5566711814", - "sha3_256": "3ce0ceb92210884a9f0b103405ff821fb9d7340a864104d64abd1d0c699d9ed8", - "sha3_512": "5c578bcd24731f575cf114f078e409618e390ec683ed3fadfb9e4b6838369a7651462b52ea75bc9c44636119dd6ec9fc7a18951c86d9259eaa6add15ac2b2bf9", - "sha2_512": "287808f50c3c2ebfae6f875da8f730930fced0d51945f97b1928d4e42e44eb86a93f5b837e07f61560f240dddb26101a927f0f28235bcf578e5fbe9c362ee894", - "blake2s": "2c5597458545a8479dcebeced1e725c53ca965198f8ecb89d2f5bb1da52dfefd" - }, - { - "preimage": "415030de6a8219381b11255d82a8974740d1e5650da5cfebf4334b5df35213f2", - "keccak512": "aef1228515322c2bb583c88a95913b904581565cdcb123154a7b8efbac620f463e482e8bfda816eba6f982c054ef40cc174c15dc45b72d9ff53eedcc7af412af", - "sha3_256": "50156b153cd03cabccca39b5446ab5f517121c3a98a76f5dab540435646be500", - "sha3_512": "649bc7cfa56d40ef43be019a9e9e77afce4ef9b75af85c94b3001d91203a93443d02a3017eeccc3d0e3cbf409bc26e00fd06f524ec308fb54546d9e97f38fe3b", - "sha2_512": "442dfedaf8852f36901ff7758724d75ee7bc7f940bd1fa1204fc535632cb7a277ab980612d7af85c78fe9d691390c40d3f37035d504d95db266e1d949d548429", - "blake2s": "8c197350646cde1822412a68f39795f5bac705a51a01dfa8d7c42870f3a47864" - }, - { - "preimage": "b1d82af3aabb9fa32a2c49fc5eac744ae7f057b4b72e50e1e31001b7443d798e", - "keccak512": "851842328c870598500064b0b6a59378a457be2fe12431101aaf85e5ee391748801e544c60a4a82b2289d53231dc11d266c59cd42fb4aa3f4adfa1b8dd8c0851", - "sha3_256": "7f5513f715d55b9662f61e65c4dc1fe9eeeaa4f105c398c83c27f9d912bd02a0", - "sha3_512": "736d437f2c9360c7efb51827c1f71915ab563d50681d89fd9b6eeba3b6676459b96b537d6b1f80fa0c665ef43d9b87a6f68696806e34ec8101de76b9f8d69fd2", - "sha2_512": "cbb8e03b14d54ad8933ce5fdbef04719d589624a3a07f36dbe8b8828a721458e1c1e718fd99893f5c34bf49ac3d459c92bb50f46aff9c97c8ca7c2a70a0ac521", - "blake2s": "02ec8f4b8160a91648b36de7a21b0f0673365021d4d47296dc3db96ba98dec4f" - }, - { - "preimage": "e594f1ceee341f0ebad985951eba93fa71fa6fd38724806dbeafc6dbba83592f", - "keccak512": "ef7d196e8f74f8b6dcf81297fa420fc27470a29740b41a38d6f5221f475646b4fcbaf20e3178484ded392bbae42794c15280734efda9d884af9ddf1a65da0cba", - "sha3_256": "ebc79056675ecf27facbc955986894a6f636e47ee94945d2c156c9fe8f0f52e4", - "sha3_512": "61221f9ffb2a143cc631d32c7b1bbfe3226c6a9607537e89e912a1e0943ba282a33b34032082839ead9898d2ac55457d55720262703e7ce1004fc1159ca619f2", - "sha2_512": "b6fdf37dfe339c2a17c4ecd9573b33df5ad3bac21cccb2c2245a4e80cc128568949a9ae9953f8782a3afe86f682eca39d236086b77f7eea6ed25d5b54c7418bd", - "blake2s": "4cb1eb4444d2a9186f2c676f20ec1152e52c8e6f5e743f6d36b1130b57682343" - }, - { - "preimage": "6d112f0460671168b8089098987efcc464cee19b9030d8bc367a8683c42b2b8b", - "keccak512": "7878f4ed718f91aa1f813f920dfdb73b41b1e93054340887fbbf0240708ba5244bef7c84e50fc5e1463934ecaed21e572f2e4432f8a3e2e8d0b9a74c9c0061e6", - "sha3_256": "068e9b89cc4d7092741737db02fa3c510924ee2187130404d180ed8fa1717016", - "sha3_512": "c289be6c901dc695989fc7c62fc3684456ac9e6e6a0339e2faf9e68473dcd0895259be18a7b22a73a4b41e003308836ca5c7318ee50e825af572e3199b2cb1a2", - "sha2_512": "2753c4d15527f011d28ab4041839d026df84d0b8399ddb5b13be9b5eee2492bebb85d38fb161cedced9f667c573e1f988fcb4e9d4b3bc9be64761aefdc7108fc", - "blake2s": "9342b1434ee69c486681cfff25a967b754115f19f0c3b4d4e0f829dc0e6defb7" - }, - { - "preimage": "cd00e5d26386acb1016fb3316178854bb3afd7d233376c51b80a9b67a2a5b5d7", - "keccak512": "9c4c0590a5cd98cfcaeb23719d9649eb41337b842c1190c497425a9cbba9797820a00bdc5659a6f1d2dcf1e2c98e961ac9a62ff1ceca07443fea579f7c785bac", - "sha3_256": "6987cf2592f79bbdebc185f22d3c1f46b2b158a21e39bbb759978235ab0d8468", - "sha3_512": "559360628e3e7c0160bdc596da69b93176525f76d0d036866bfc0163c1cd1e1552518f2a50317a65a9404f6abb715f38971bbd4d463944189eb2622a3e804a9d", - "sha2_512": "3f274e0f616c5636444ddc02c5c13d9fa0332dc0968e597ca395d67d599516623968ace0a468cda4c8dcfafdb8fb7137fadf8b6df6f8b1f5b1479f5ec5909b2b", - "blake2s": "a4ab8cf21174ab78705d4faa73fab7b0b7833c5c7969c06fb1af7c6bcf0de427" - }, - { - "preimage": "029b6fcf272a09129c7fc99f6ce7a15522ea4df0319c977e2820e5f1b05c5c56", - "keccak512": "92e5ba6ef77cd89ceca652d405bf6a9d190078341d66d0a9346eda67afdc82bab5f02adf2e797473a5cd3d07b93db8c12a204ca0f61855a2b27cfc152b2968d7", - "sha3_256": "07cff0c327002b1c9bf88e0e510f4f000635ce4707f7ed3146edc0ed579fea65", - "sha3_512": "80c7e097577a1e281b535b5525ccf74269005ca33313ae0e013b6caedc2b4693477bb7ef4cc7c9408728218e69d3d80614881f6d0531ba2c26d0123b17a2a6d7", - "sha2_512": "95ce600845667bb7bf1b218655fff8df35c62ee974e9522d804903254f78bbe86aaaf982589f1d0cc883633e0db4e20c9dd7ab79dfe868e08054eec1c842af49", - "blake2s": "b1dfaeee8b321153d5800ba31c0076fb4f1257df485952c87a5ce963f970ad27" - }, - { - "preimage": "d5c6c5612aa716e81e749930bd795d57f783c318757b9b01901c7142d787f16c", - "keccak512": "7a22d373499b7d7d6bdd760321c592cdd2b2dfbfd881d8dbd14d296d96e75394bd92aa6b03fcf68408d1c5049aba1144c8cd0590dc6738182b915914fe8bc1e1", - "sha3_256": "c5032f7e2530098e630d3455c922c1c8defb6dc49cc8c1f1ab3196b16383e1aa", - "sha3_512": "c601e82db70dc4da01734c8ce6caaa2cc466397738255dd1a24d80b471aa9002225c6b5d8fe7c8d22af12cbdfd1901d8e7b7f254d99b27f407dc7a7e49be609a", - "sha2_512": "650f8e6448d52e1bd513fef3355f15a180e9537177cbbaa6ae77a7381675cf3d2d80717dd236cddc236d106138913c59b5bc2d5eb40dddf45850851ed81ad02c", - "blake2s": "76a84819fe4350c1fb62522f1fa78d3f267318a15f770f717d903df46c8b6fc5" - }, - { - "preimage": "1fb0ab360bcd7ab6f13821cae09d2ce629aa7865adc08c55dc6534bf074fe1a4", - "keccak512": "a74c07f3e02233d2fdde61e9a45f4fb3434073944ba007f06d36d9c09a755d8c5149312d4a9dad9ac71bf8a77df57e82a81f85c28e53a0a40b2da81c800e92b3", - "sha3_256": "39b668d119fafcef779b1d292a8588e7992075e20a6a935082dd0c1bcd770ed8", - "sha3_512": "fcea75f276bf8d7bace02b295f5eb33ef17ea44ca755b37894d388b4b6e7f77a51ef13feacf30ca217268e3898176645014c543db8d85346ac83f1a4b3af7877", - "sha2_512": "ee1e95aa7e238579cdaf10f0b44d255fade6ee671abef596562baf099f4e26ed03cae6a141b1e125883fa03a8d5d93e15b864647874f15b17450c5ce747a0355", - "blake2s": "7848d36b7adf7baadb55e6c2ea1e91039de0435f77d37b3c018a651193aafc64" - }, - { - "preimage": "4cc15bbc961163f66a7d06e349f46c2f3da9f4e6d2b42006c3781d347432f4e8", - "keccak512": "3180304f56f5727775b9198bacf1b27cb76812e99e927953bacf47d6fd7ca7596085db8c84fa6243d52b671e250e0c58552e283f9577aa78d953b1d11d095e2d", - "sha3_256": "4567689954d385b3699554a0eb25db8d2c917bbdde548883a3f5d12e483ca313", - "sha3_512": "0857770ce21d809f12a946783e92ad2ab9d9456fd6bbf7357a8875f91557b2512959a0c7b3cf3aded8d84b113792de581504a18ce6a3c6e2ee1363204500f053", - "sha2_512": "e14e127406c1bf6501849ae9a082755b6659855059b0495ed1fa0410db0a9b906e98b1e17ade463b644ebce4540628fede9c02678af2b798977196c1fa15c231", - "blake2s": "7fc8b3eccaf0ef8a9a517e8374e49556290b1244a5f934883816c1d141af77cc" - }, - { - "preimage": "adf13ab313ffb0b1422f4c4262771363284df90432c2bf05418e96f81fd63bb0", - "keccak512": "77339a13b568f723e59c971242727f81fc30c370ed3ddde715c590fbaa04f466e8029aa3ac5c6eb4b93acfb411a7e23472196d24da4bff3091029f54766853f9", - "sha3_256": "fa00bc68e9e98a7db80b72329890138f293ce5f74640dc01ec01f3eee3ab856b", - "sha3_512": "eb6b4dd5874d9b01a2a207b80bbe03c428b693f3d920747a697cb76e1cf1a4f8dbe47c6334992a90dedd7d7256c2bf5df6c7b8ff646a2e3100cdd945dff0011d", - "sha2_512": "dfa934c981ca31ddc04d2efadc9e052e5d7770c728614d84ace94ce4d7461f067591fbc06a4cb7da1e6b981c35f497da19e71e642fa838331b5abe3b9e4e2244", - "blake2s": "4de8254aae47477e97fb42de060c85fc7cfe9be606ad2d54c39d1a9ae4939d0a" - }, - { - "preimage": "617c747d928e2291ef01f9d8ab659551df93963000cb4ebd837d2156dbf24cb9", - "keccak512": "6937e6a9d48f9a6c4a2b1de35bcf66d9346098f1690f8331330a0bc0b5ff1685d3fe09df864ecb264866e3c05b3d2f31283f2c4e3221073ebd1d695b54713ab8", - "sha3_256": "a5675e07df94a78241c3a08daf3a50923fdd226bb006e78ce5d46a04006a8f11", - "sha3_512": "01aad57e479e3e14822c24dbc4341bc0eb8632b55bc8d77a027b95804268f0a20419aab20a43d036439f92d524c0005756df2c6559046ab885a9ce9a2039f79c", - "sha2_512": "b679e046e6a52c10ce10947fc3c975731b8ac120d566d8e53fd672caa499574f555b7cfe67eee308d55f1dad6a8c7db51455de3737a9b9cf80b8c614588780e5", - "blake2s": "34616bef0e5311d60ddc5c3e764c0f84da5141ac428ad86c6c9996bacc844ae3" - }, - { - "preimage": "059b84b7f5067f3cf33fd839cab22c2ac79941455c85642a50de33509855b7e3", - "keccak512": "c6965eecd727b2d9916c3e183c945d08d46c9b7dcb867548f1d225615287f0c3bef0da5800353849aa0e6120ed1587afea8ab129b4cbb0be635e868488c908f7", - "sha3_256": "1f1a902b3a151d3328cc77d332fd99c18c73d297ea49291d67b6b37fe8fcaf9e", - "sha3_512": "e58c98d844f094f9d6b063c0ba1db600c05dfbdb8f3cd02e44ee42d1a4a4ddcbd2ca4614c6ab44f4e96e01ccd13835e20c26486f48686ee2749d6f3771d65630", - "sha2_512": "bdc933a8fd612e8275ccbdebcc08d76631b771099aff58abdcb4977504fd4611776c782f21395b002abcc594d225c3c1929d3ee0ac80fb208b80210a6dae61da", - "blake2s": "b37ca09a5587b699d09a032d485d381063dc481ff85a9a4e6b3a04db16bb8a2a" - }, - { - "preimage": "631d90a19290f894059b760cd0894fde89732ed4f15db0cdd02af032a870fa2d", - "keccak512": "38108f665c53663b39d9485abac38ebc2c1031f107538171f563b82b2fc22ac33c7bfa4b3296a84dae8abfd0fbcaec61063bff8dacf27f328611595f062ce87b", - "sha3_256": "a6f355e573754991e2d1b3d42a4c4964f973db0ae9cc43d6e19effbb784c844a", - "sha3_512": "be5eaf5a8509df0614777971dfc780715baa2efe35fca47bd9a16cf1cc24040ba3068edb8710205958a1c42f7e35e3be69ae8b98b1e6f8bc8bd0186f84a9240f", - "sha2_512": "96f1b0b5923ceb2afd83ac07478a5d2fad0cf42c90f0ab2d5e85b177ced39537de3aa8d8d46416b3912e208ac853dc1e91540a8f883a0c5ca090e63d6fdfcf9e", - "blake2s": "d8e45f186facbd291fc3008359ad1dc483599fdbd0ae19d9aefe0b60619a8e0c" - }, - { - "preimage": "83a09f2fb8ea57df1e905e50b068c12d8f278f8f876259b5bc4cff3e3fca1ff5", - "keccak512": "9e4b1b903abae10674ac4b485662826015ffd4eb28138f1798c8f8aa1fa97781288078335cadbb291e8f70da72591e449a0fda323d82384a9da0b312f203c58b", - "sha3_256": "c6433419010bf573478ed8f7d111f74ac810421e8e2ef03d9d29d6420dc8e9c0", - "sha3_512": "3d29ed2b8f3cff6f1b96b10fd2ad186a14f7f63f5606f1efbbd962311a7bd28db3e33ae9d5e97ba67f9cffc93d793a1a5d708ccb804b2c2f6fadd40569a1525e", - "sha2_512": "d1de785953e090d23dc942ec7c2b5d13d62d8dd201c4187785be6c71ab345e397fdd8ebb7de2761f858cdbcb2979b244ab2a9a4ec421ffa540a6e2ffc4f35e50", - "blake2s": "cdadb629dd47e85b532f1b8045986d69685bb0fa31d32a7fa45ba8855e7357cc" - }, - { - "preimage": "ed2cf899ce15d9cbd663c4b2c17d6fe5e73d02ca26a48f1d5eb9cf64b620801d", - "keccak512": "f52277abcf44731d5d552cc4c178581e1410a850b7e9a1ec106b446e7136ada811adc9e068a3f3dabfd56b91995539c5788ed8615b76ef4e31f5edbbd50e2c6b", - "sha3_256": "581bbe0664499c44a55b51b65502e5a2801add8118f0865955d734ad43b6720a", - "sha3_512": "e6faca0109223d936fad55fdf30a589a403dbd984819c795a3d4f8b94632b4e78fecd3d5e25b1d0b4fe9b64640e9dbb18cc0d79663c6b3282ca3e65ac0e11a01", - "sha2_512": "660ecd71451703bad1dfe2a568753d365713cd9549e135b3edf4bc943d802d4a8650514a34002f30925e4dabdbe3b532d784c2ab137126b4894360ee98350e38", - "blake2s": "b5912aa533e5d08a9c79c0a53f97cbed6fc57e9d444c966e4813e90019970936" - }, - { - "preimage": "2042e700c85160f2c798dfd2adfea098008affd374405c0f490967bca583c51e", - "keccak512": "cea90fa988f7eeffb7fd2115f41c3c6d144d767e970244cbd2af9f6608c47218bce65ca1dcbe5cff934ca22ea601f8054c7b3e62e6a84951b7ee9205d301cf63", - "sha3_256": "f86634a46cbb5c732bfbd1ca6c54f6a63dafc1b7782ab3a9a526dc99611cd0b3", - "sha3_512": "41b5904619093d6f275c1fe8daac4b1daf827b4f85470d936a29ea3d7039c2a9f7c2270630c4ec065cb03001a6d4bf6c881fd3486317550e448c648c5f98a4d4", - "sha2_512": "6ce2ab9b9c1e725cd628481ce87cac19e94746340d59a94b5603afaef65ac65f2ee3821eeb24197af321645c86d95acbb7ae260401ec8daf689523bba07b02ba", - "blake2s": "01454d9fe099412263c20a9e279997b7f12aa5513c8268ff6608e71693e4e64a" - }, - { - "preimage": "c52da93d3acc84f5537cf6af7eb9f2a4dfcdb39423c1cac35cfd891bda90752d", - "keccak512": "a1ff39caa8a056f12ea376aa2ca2b5a6076028f2442bf2b2dbd2e0af58e260168023cd4da5a69c4941f656b5d2b7d18431d9faa7682fb1bc5c45bf9741d5d309", - "sha3_256": "6ea40c0bb2e8c3899d4fe05834c8c777fb7264890831a0bb70f5e835be5b5c2b", - "sha3_512": "6a386ba28d132d73d3c5a355616033c6c933b59db1ad37d222b533fc65cc024d0ddf5e1150d6e850d6950d32891fa7aa5e298e37aba09280c8dc312013afb5a6", - "sha2_512": "37c3758cb67430be9cfc7139ad51475b69da71206d1051bf040aa0aa14e8a86cc64ff1dd5300688c87deb6b980fc1f3ef284fd7e317dc7be4614d2a391d5780a", - "blake2s": "b4dd7874c9b138e5fd9171f21a156ced8de2fefaf65f3274b4db2aaf2e1b8b41" - }, - { - "preimage": "8848920558e5928a2c2d0648ec69544f39c89d4b677dfe4781602b830b9ac0c6", - "keccak512": "35d662e63d50a4b9e5119b6c0cffe3943b01eaa836fee218fb365299ce8b0955b0a2ca21e5d2e0976cab728778fce383e85b97d371c9676b059abd34d9716940", - "sha3_256": "9e865aca4bf6c24bb084cd26bf17726277dc17ed6decb3c397b5e74370e2cfe8", - "sha3_512": "9a5c6bf3415ce7ac64d29c61b1d7debf61c1c19fb9c350e8fa6577f2e27cda23cb0dc5149f7dde4c988e3833a24731fba77e1217457b90ca0ebef9673201c0e3", - "sha2_512": "f603c8dc90d1303b50ff235133e1bd7fcd829a91531db61c6c7938e8752851d8a53f20f33529f152543e981247e2e7a5dbb456d7975d1618a1969586372f8c04", - "blake2s": "1873c4b7090e28b2e9f492a2dee7dd6c1b2f3a7d292dcc269ec5ac9a10a9ec9e" - }, - { - "preimage": "64ffb8d9f14568f3a4a95ec36fcfa6e4df3862c6ef489bb44352927fed6fc782", - "keccak512": "8599a46d1446888460a91ff11086c83148b79abef3ff7da81fd44865b8f3a00ec8531abd41a5c057849dc5f06a424eb90a503453b7547c3b25b404a33024229f", - "sha3_256": "73c9dfbd39a6b0c08dee2c6a247fc03c230e4fb7716668ad0a342fd269c32d4b", - "sha3_512": "177263b18eacba51d56d4ff34717b62a9cf6db921f7565eb954bf268d6b158a06c7f8567374d34fa90d332f517577fb9252013cc61160f5852a9c8396b8482f8", - "sha2_512": "8762cdf0812f5c74eeb73e195a94c6d408712ee6ba23cfb6bffffbe124a487ba8d8bae7f7541ff7f4db9166a18dd0b8a73029a8ece69949017258726c832bb7b", - "blake2s": "a49424f326e31dbd66e30a5748b4384ab2015d4f82a1f812d96d4e3d38ce688d" - }, - { - "preimage": "316e23d718005c86923bac964117314d216881c4206f3b9943ccdb7ea25293bd", - "keccak512": "bee3ecd06ba55c14ddb0f9d82984dbb5ed8f5cac1fba8dd499913b170db868c1afe44d7e4267bcabd651f4af019524e02614f2fe737d4b3750b459eddefe69c7", - "sha3_256": "563aeb618b36fabc06252aeb4d3b731f0351a51dc23e36b3a4a01df9b838ba8f", - "sha3_512": "c9db8f7455cb6a0fbed779d93272e6e4d30645a63d1af116866e46396d77f42a9311d49b1d0fc56b4e9babda99128a2378aead4aacb254cd7577f4132f365b55", - "sha2_512": "3c6fbad0a08eeab4248a251f8fe7e709f7bc211ab56107a1c7a7cf98847e443c5c6955249e292bc62350ff63df95c5c1caec9365606d48447b82ce4220dc06bb", - "blake2s": "bee485056481915dc5f6286027b7a24e8f6ed8f3a05370794b622fc9c9e70002" - }, - { - "preimage": "5730af8ec99691a3d1e35814a72a9e98a8e65d584a62c6a56e3c6a9935a1ca1c", - "keccak512": "78d846c82a4fbe3b79fe56966f26925fc32534cbabc974b0ce7b5708908ea3dc170604a1b68b61b4c67c261e4a8198e1e8b7699f28cb8d73d307f099a2665279", - "sha3_256": "2899914981ed581fae166b07151473df66fd545ab0e3349b060e61ca7f6e8125", - "sha3_512": "1752267e8d4416897f54ed396460633d7e95ad0fefa49a2df742d534d815e9fc13fe30adca2aac2f1b4aa48c376df3943ebc17b031d0d8413a1868985650dfa6", - "sha2_512": "6608beb1754f57192edc86e1708b20914333832e63d3faf343a2a0878e3f640cd3024c11b15b383deb13cd2212df8fd689f4ee8c74586f2ee13c702543ff5c5c", - "blake2s": "a6739e9123394e3ba203a2e609d73568d0737ee989b56201f95014f72e0d884d" - }, - { - "preimage": "e7420eae16fe73378b62d40eb045c51ee3c660d48089411deeb6e564727f870d", - "keccak512": "3e0d5ff28adfe29071536df79c503a45c91349a5c5de4dcfee66373700bb9114a4b273050f5beb3240ef2c9c9bcbcf99d5aee1a249512b466669bd138fd78aec", - "sha3_256": "d125fd5de7f238d5a0204a70ca1c044f96607fcc6ad3890545f46ca617887f69", - "sha3_512": "3b6c02a7546c42322bffd1fe64b463eb5c2f6acecc1ed2db03685eab699054a0f1a254e1f59dc13398633d9e9581bf7127cfee851f3a6dfb5c21df7f29ce3976", - "sha2_512": "78eb7ee5d4373be6c2d0fd53429d08b827df054a80f4584b0ca50962b3a5acdf9c9607f2d27b7cc1370118a95ff9f772751862073eceb168bf30744b67327470", - "blake2s": "0fbb70bb79cf5bc066508b3cb0778555804e5c0a9dc3ea02ba5c37aaac14414d" - }, - { - "preimage": "4365c01430ce3e8c3f79ae2715ff39b7d076796ec2c85abc7800cb390414117e", - "keccak512": "5d90c7c1b51479c731d9f5d4ea942182118d9f670c5d32b99a521c8de7dda927171a82342c79b1841a8240a8255d2cec5a4da79685e71f3ddf24e6912f38bf27", - "sha3_256": "abc79daba834986d5f77dfccb29d1cad622c0a7abb998f2b300317ce64f833e9", - "sha3_512": "333abe5c66b1fc2a7d78fdcc55c2ae14c919d0c41d8338db73a9a23178a65cdac61844ad1dcbfd4a050fff81062fb7c445ae5ac31f360e1d39047db457e3cb7d", - "sha2_512": "a47283f704bebc46b4c9d9d64b417b8269bb3ed8a65f109f7594ff74ce4e7e295519e49b71f9f8676968f4265dbbd49a573c06e053de53a210458eab7e8620ea", - "blake2s": "c7aae1d73ad0ae7d3db025f8241071ec7b083c55387f749f1b2b2e24265646cb" - }, - { - "preimage": "0ca0096268255cdfd06b7d83c4e4c17b12dd5807ae9be8b3b88864ece812f5eb", - "keccak512": "299c7883fdda4e3460e626cacbd929c4a09311f274dd7eea1e6c8060bb35f3b3adace8f05201a59284e519d09780a795f8bebf9101bc3e1e810ff04059614233", - "sha3_256": "d5ffc5b23428756269664742ab8f10787b819eb47fbc9893d3b4ea9ffd79be08", - "sha3_512": "aecfaffd8c6cdeff7bc6464aef1ecd377b6c7c505b18e0eba839406f9a18813715a5157a02625953da9c4c5b2af79344ef82758e8d0be8381444aad50a301d1c", - "sha2_512": "3af373f722a833fe536828b967607ccf5a24e30aa42bab29bebcd61a819cdb7e374b8a42d8c359235db39df7a24dfcb345ab4a66fa5bb900731f0aaf7d92e18c", - "blake2s": "1214fa5a4e588c3ec1157e0c769fe46f58f4f34a899f925bda3874860b5e0a2c" - }, - { - "preimage": "da2148c7d9417503cd6391d1c91ee3e2ee841d8e10bb1356619f4b7d109697d0", - "keccak512": "52e874cc372773bec851932ada2aab47cc72acc2efa00ba719e4d39833282a5a3ab7ba96454fcac6a18b5da713f562c74cb1115ad49195d805aa0d4f2151e0de", - "sha3_256": "1db010e04eaf3d2d5fdbaa791dc71d90a3cb792dc6ff79b31a17ac83efba3042", - "sha3_512": "6c143f25c598e3a3dc236fccced1e7c82cc548960db37181699a8d37d52073ebd972662ef7652c7c9f7928e7e175a391c3c2a9f5d8f891d3fdb681db947276a6", - "sha2_512": "e25d3ed479543753639578522a9ad0aaf9a4630cafa98ce016f56aa87e0ae9a1655a8d922f03e083fc7993656b27597516acd068605e2c1ae2d9b2cbae042868", - "blake2s": "af35afe7144e527619bab69f0668dc4d3ad281c474e9a8f4de10e82137fc8711" - }, - { - "preimage": "2c35c9bdfc797c123358e60fa64a891dc0ab8c2ecba01abd37007112a2fc34d6", - "keccak512": "f5ec7cd785942513188a3936d17a349d41475da6cf10c6e1d6189636171dc914f236e23a9bc3f97e154130550038a28489125443ff431545e9b98e2d62a4901a", - "sha3_256": "4c34d218325e8e111a1ba2fbca8c336b4bcaf6182e9d099aef9bb7cc4ac57548", - "sha3_512": "0292b4ec194115efbea696086400fe761d059b8c4010ed98173d409ed3f49ab98a475ea3b5e01eadbe9ba377694cb8b3fdd2cfbff76911617206f3f3d988c03e", - "sha2_512": "884e493051f146bc2708c5bb17b836d1acaf4a7bd0d1f6511dfc7e113a686ec27e2f180c39ab993b7043aa41c616828a3f435d67534b5b9302396366d33b28d6", - "blake2s": "d7feebbb6a0a4781b220d54254c08c1f0c9899eb638a315a372f94c3ea38cd49" - }, - { - "preimage": "5420e535ef66555f0ae9efb55d905f49202fdc28fc9c6c0db8168a0b2765c0d7", - "keccak512": "da20ea3e671b20337549fe2e788c7c0f3c061b5058bfa25f27797d5c74e3dcf74698b5c7972e9a22630986eb2bc32b39ad6a6a43c892664e2c4f5d898cb57499", - "sha3_256": "354987c13d458833872db8c9d419d2901ad553cb507cb3969ae3a16f288c32c7", - "sha3_512": "377d24ebe854a796eab966ebc592b83c269f1dfffb789fa1f207f7dcf9b78f5eb786e8b059138bc8cdfc10c513b936873ff6a3c09822e6bba6693145a1e83fb2", - "sha2_512": "5b853df29c1607b069583377505012255d15e554e972f08970559c4cc9ba03b88aa49104daf4e0c835d7f4a3d02ccd2850dbedd80d63bd9430d0b0679a2ae16c", - "blake2s": "5235b7518749cd2424d308ba7d41fcef331755ad9575b8e971a6ee8f79096536" - }, - { - "preimage": "914b0ecfa7f50598b03a5ae5af1221efd3a09bbac237e37e7e6f717f62364fc9", - "keccak512": "0bb1b609e24be7aee46c6cda3cb1bb0ad9bdd3be6bdbf8340628ffd61652ba35b14c96b581f6379560cfc971235b1cd78229d9e86ae8cdca3e6f635b54b178b8", - "sha3_256": "988bb6f9560eeb993984198e3b92c219b0d6bf7cbc1a9e74dda36414b3a8f452", - "sha3_512": "4a429f97209db58212f103f86e70fef750fd98b3549af3c925f0e8911155382fb38670384fd2b27c74069f856b20c8afe75f44be2b9878fbe4fdad0d61c095bf", - "sha2_512": "02f94456587259ffb6669ec7f5dd77ea7b79b584fcaed9a457965b4c95e8b2f8eb9f79b2c0ad4c5fe49ff2693c91e4cda97856b1539c0379efad4ec51b6f5eff", - "blake2s": "564b31bb56e1faa759dc910883485ec0b84ad4cfc464ec039b0e66b63e8db64d" - }, - { - "preimage": "b802930c1edeefa8ae52a1e297ed8d3ac22a45b1d6ee3a89a96836462b5dfad3", - "keccak512": "a6e9f1068de2c3d8711efbaf88fca053beb33ad41e74f8426c3cdb60775a89ebc843dbe1d81b60b59d33a1ac49e355a634c17a443d3325082b632d649d304901", - "sha3_256": "a40eaa431ce150ebea3203764dd24010cf7efa70d47f051d1aa6bc9e0dba3a17", - "sha3_512": "c7aeb3b9c9b3caeb03fc312f58674fdea510160bd69e7b1bde6f8c0afcd25bbf3ae693cf23f8dce46c6c8db77a2c1f1345643b33da8af23366c86e0f6f481f4c", - "sha2_512": "1a3406b552f956c1f63464082f0180ac1beeaeba2c754b60a9c1df7a5889c7d107205ad110a1bdd3eeea7f6d563348a94489f112250c0d0e2a37a5c332e5e845", - "blake2s": "89dd1a8837c77af02e8d4f48b50ed9d9bc39a3245a4a7c3044a44a6cbfa1e518" - }, - { - "preimage": "56c233f77ba6aff0503ade30d45da388738b847a85e4e4d057b99a6d9ac542aa", - "keccak512": "65c1678050f4858f29ab622b715069ca95bf4838bc31e129ee115dd1d0835ff417b007aea1c301e128d332877c98d2256b16309285de861cc379dead6d90bc35", - "sha3_256": "73445bae874a4a577ff894aa5cfea7486e3c8588cb59bd268c633c9416c3c211", - "sha3_512": "2d5ef85c3c128bb38fdcbf3fbb4d042399129e9b764190745c56129b64d933e5875491a4167fcb977b28eeace4604355206d6596d30dad6ad7885fd306806e96", - "sha2_512": "c847dac85162b89d330189fb52dc860b6eb06516ec6c07132187f83382621b38cfcb124fbf162c1ddf53afc4899972c3f5899f65fedf929635444aba353edf06", - "blake2s": "12cbdbc47ac27b15d808e8a69b9579b21d6545f86e0282b5b28f961a7f4f7f00" - }, - { - "preimage": "a9e26128ad28daed01f6160f242d2572bfc3285d99f13515d1e20bc041f31365", - "keccak512": "b787b7aa8a78c544b9a12d2fb08e5890d2da19fc40d5e1a7b739262a16aedb97d4e756062a389d61f80b388537c5f3349e5debc3ed6a66219664d88784c68bf9", - "sha3_256": "61cd08c8b97577369ca126fc1e8bc7be0d52353ae280d0313fc980871693c0e8", - "sha3_512": "4595c9bf05c249a4588ea744aa6ca55aca0a3f67e3f026d6ded85b8f65c01246b1337f08ad2647b44140f089c158d31d9495c94cf872292ef89e2067a9da55dd", - "sha2_512": "10ede929ea48c82922f7fbffb564ac572c4ff0f29653e77607e4c58a22d450d798cc0e1da9647ca21666d2ed068bd7d7387c9cf374164925d51f63eeb2a0030e", - "blake2s": "e4b79b8c00f3af6247e4cf6b0fa3a12347c82e3340a70d7cbf3ffc3ce01f1dff" - } -] \ No newline at end of file diff --git a/e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.test.ts b/e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.test.ts deleted file mode 100644 index 88b0ec8648..0000000000 --- a/e2e_test/ethersjs-api-check/test-precompile-wrappers/cip20.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {ethers} from 'ethers'; -import {assert} from 'chai'; -import 'mocha'; -import * as fs from 'fs'; - - -describe("CIP20", function () { - let cip20: any; - this.timeout(25000); - - before(async () => { - const provider = new ethers.JsonRpcProvider(process.env.npm_config_networkaddr); - const signerKey: any = ethers.toBeHex(process.env.npm_config_signerkey!) - const signer = new ethers.Wallet(signerKey, provider); - - const contractJSON = fs.readFileSync("../../compiled-system-contracts/contracts/CIP20Test.json", 'utf8'); - const CIP20TestFactory = ethers.ContractFactory.fromSolidity(contractJSON, signer); - cip20 = await CIP20TestFactory.deploy(); - await new Promise(f => setTimeout(f, 100)); - }); - - it("should run hashes", async () => { - const vectors = require("./cip20.json") - for (const vector of vectors) { - let preimage = `0x${vector.preimage}`; - - assert.include(await cip20.sha2_512(preimage), `0x${vector.sha2_512}`); - assert.include(await cip20.keccak512(preimage), `0x${vector.keccak512}`); - assert.include(await cip20.sha3_256(preimage), `0x${vector.sha3_256}`); - assert.include(await cip20.sha3_512(preimage), `0x${vector.sha3_512}`); - assert.include(await cip20.blake2s(preimage), `0x${vector.blake2s}`); - } - }); -});