From 48bafd2102bb2410c10302b553b194e747938968 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Tue, 22 Aug 2023 16:05:21 +0800 Subject: [PATCH] fix EasyGas error code and add v12 release --- build/StarcoinFramework/BuildInfo.yaml | 2 +- .../bytecode_modules/EasyGas.mv | Bin 1554 -> 1589 bytes .../source_maps/EasyGas.mvsm | Bin 8490 -> 8532 bytes .../source_maps/EasyGasScript.mvsm | Bin 1436 -> 1436 bytes release/v12/BuildInfo.yaml | 2 +- release/v12/bytecode_modules/EasyGas.mv | Bin 1554 -> 1589 bytes release/v12/source_maps/EasyGas.mvsm | Bin 8490 -> 8532 bytes release/v12/source_maps/EasyGasScript.mvsm | Bin 1436 -> 1436 bytes release/v12/sources/EasyGas.move | 4 +++- release/v12/sources/EasyGasScript.move | 4 +++- sources/EasyGas.move | 4 +++- 11 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build/StarcoinFramework/BuildInfo.yaml b/build/StarcoinFramework/BuildInfo.yaml index 8de28fd6..35647241 100644 --- a/build/StarcoinFramework/BuildInfo.yaml +++ b/build/StarcoinFramework/BuildInfo.yaml @@ -5,7 +5,7 @@ compiled_package_info: StarcoinAssociation: "0x0000000000000000000000000a550c18" StarcoinFramework: "0x00000000000000000000000000000001" VMReserved: "0x00000000000000000000000000000000" - source_digest: 43D3D1EFB0689A52B0DADED8DDB3DED2C03C392683B42CE1E28CE538D1F7CA6E + source_digest: FE212729EBF6A8DBC3934A155AE1FB2DA968820E6F59159E2235D0E6123C0B74 build_flags: dev_mode: false test_mode: false diff --git a/build/StarcoinFramework/bytecode_modules/EasyGas.mv b/build/StarcoinFramework/bytecode_modules/EasyGas.mv index 340a54a9d2ba89bbd3508c840d99e718760194c0..9194df2cea9728929e3963faded17937405e1a7f 100644 GIT binary patch delta 474 zcmW+zyJ{6t6y0l|=ggd$%$eNh+?(V^lW3lr6p~U=3-Kc)popLmE-H2jA*EP2UtnWv zAtL4NWtNCCP{q|m?VUmYLdP8Qq5I9J*8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u>J;ps2Y%G%tN3LRk>KhKp(0cs}wAXj^p)AckT$b)3*Y-3W_{V+{Lt60fio> z>?`;!P8$!CbvyniP8$!C^&tLn@O!;+Gcz2>dhMVW$3Cnhpclt6tdpP@$0@7}pclvcSQkOxINZ0ZZyY_j2M-5* z;|O4l0Da@Q#WUUkedG8YtBIQW#<37^8i8PAAgbk97oeEUm>l3ObgqV)fxTr(?@TD!{`q&qc2Re?iFZ@2y415y%hM+x+*FK+Qmo$N!p!cQ>XC^6uRQ zR4N?8{06!-#WT-FQ{kqN#eZ+BXs`juY`M-``3lECPl20Q|A3wX^XWGUdJ0U$Y5<)G z4~9*CqaD<11DyyPvAzJE2=0jLgUT)Hu>)E}haamG=!43))C^$igUW;HB1dUF^&SI# zQ0aj+74$)+5~~UHK_!c|3iLr`4%SPc4=Rqe8jP=haORBJq1vZsRMyOxRa;S28JZIe MhH9&x3|1QRFOgQB+W-In diff --git a/build/StarcoinFramework/source_maps/EasyGasScript.mvsm b/build/StarcoinFramework/source_maps/EasyGasScript.mvsm index b60635855156c5924db1fb62e64462e3ff469b14..d574c7323a2013db5681125d345b0d0e753e9930 100644 GIT binary patch literal 1436 zcmb7@ze@sP7=XXKN;C+GenCWGK{*7{U{KZ)h+9ie4ccKxT;+G-X<(xb7Bw0{e?)_= zO-V~Nv@}I65kyP>LG?H`y`Klq_S}8E&%K{LJJI;^qV;fo@ldzkGgI;Cq}^OTi>-S)sdHH8V4!Z&c?-G- z=%DX{X}|!t27N|*dW3llM)7VC+aSlg!@37K-X+!p7%b{1+7EOQ?-xBhY94P8cML*K k(XZ-?w0berIWW5AIYbxadOKJ}kn1gBX^?Mu$MQj`Ka&Hx=Kufz literal 1436 zcmb7@Pbfoi9Ke5X{xzjm*hwsk)Cz|wxoJz09JVMat$BwR-ezx8yC`K`aBy)U?4md+ zHwwAA$w|otD-KGEgNDyLI(>h8^|^iC`@Qey_xlyM&rkOY{^mX3#Axr)NqD6_`cN2X ziQJs^eJ;%hL!0$V?Si5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ln*)p!4=F z*02(r6usSHS_JM-1;$(h4?E~}^xMFP%e301O4!ZI!Qwc*Dc_jw;Ne+5MBfE|%Ntx9 z?mp-oPsB5!mEq-$^5%I2{RCLO_r8qFU}rexxD3S_4f?%br1LSDdY^Tyv0$+&e#S+8 zKbSnrkvod~9rU_?O6j;C+Foie(DE-Rx!<}z8Esr13njw!a`+2bZ3CgBWjd2;jAX1@ zmeFb!6h_0Da44N@OhsgG3-F`h?CkOt?m*lH`elELbrAH+K8$r5^vgbjbq(~P>IT*w z(1)tGu>J;ps2Y%G%tN3LRk>KhKp(0cs}wAXj^p)AckT$b)3*Y-3W_{V+{Lt60fio> z>?`;!P8$!CbvyniP8$!C^&tLn@O!;+Gcz2>dhMVW$3Cnhpclt6tdpP@$0@7}pclvcSQkOxINZ0ZZyY_j2M-5* z;|O4l0Da@Q#WUUkedG8YtBIQW#<37^8i8PAAgbk97oeEUm>l3ObgqV)fxTr(?@TD!{`q&qc2Re?iFZ@2y415y%hM+x+*FK+Qmo$N!p!cQ>XC^6uRQ zR4N?8{06!-#WT-FQ{kqN#eZ+BXs`juY`M-``3lECPl20Q|A3wX^XWGUdJ0U$Y5<)G z4~9*CqaD<11DyyPvAzJE2=0jLgUT)Hu>)E}haamG=!43))C^$igUW;HB1dUF^&SI# zQ0aj+74$)+5~~UHK_!c|3iLr`4%SPc4=Rqe8jP=haORBJq1vZsRMyOxRa;S28JZIe MhH9&x3|1QRFOgQB+W-In diff --git a/release/v12/source_maps/EasyGasScript.mvsm b/release/v12/source_maps/EasyGasScript.mvsm index b60635855156c5924db1fb62e64462e3ff469b14..d574c7323a2013db5681125d345b0d0e753e9930 100644 GIT binary patch literal 1436 zcmb7@ze@sP7=XXKN;C+GenCWGK{*7{U{KZ)h+9ie4ccKxT;+G-X<(xb7Bw0{e?)_= zO-V~Nv@}I65kyP>LG?H`y`Klq_S}8E&%K{LJJI;^qV;fo@ldzkGgI;Cq}^OTi>-S)sdHH8V4!Z&c?-G- z=%DX{X}|!t27N|*dW3llM)7VC+aSlg!@37K-X+!p7%b{1+7EOQ?-xBhY94P8cML*K k(XZ-?w0berIWW5AIYbxadOKJ}kn1gBX^?Mu$MQj`Ka&Hx=Kufz literal 1436 zcmb7@Pbfoi9Ke5X{xzjm*hwsk)Cz|wxoJz09JVMat$BwR-ezx8yC`K`aBy)U?4md+ zHwwAA$w|otD-KGEgNDyLI(>h8^|^iC`@Qey_xlyM&rkOY{^mX3#Axr)NqD6_`cN2X ziQJs^eJ;%hL!0$V?Si5HKSo_7?&JpJPBf9WQW;gLR8ja;ra`G?FubwkjA_SmDN}kS zkG=t(YR9yv&9vli;qE}KWm}o4h4^e%T;c%z7?jQkuZZtph{JwhmB1sKS6Dw#A)2oB z3mVJcvt>{2w&}NiMt=j{)?c_K@TSsc!g8#nE$vPX|L$}DpIOCW!-&Hmryju?137g7 zYaBGxrbeY&p^SiS=t0m87{cv`Dy?%G!5jjuc#DX6kmIdlt$`eG5^Eha4(cJ=1(Xr* z68#!< has copy, store, drop {} @@ -83,7 +85,7 @@ module EasyGas { let gas_token_entry = borrow_global(genesis); assert!(module_name(&token_type_info) == *&gas_token_entry.module_name && account_address( &token_type_info - ) == *&gas_token_entry.account_address && struct_name(&token_type_info) == *&gas_token_entry.struct_name, EBAD_TRANSACTION_FEE_TOKEN); + ) == *&gas_token_entry.account_address && struct_name(&token_type_info) == *&gas_token_entry.struct_name, Errors::invalid_argument(EBAD_TRANSACTION_FEE_TOKEN)); gas_token_entry.data_source } diff --git a/release/v12/sources/EasyGasScript.move b/release/v12/sources/EasyGasScript.move index ddd19de1..04dcac3b 100644 --- a/release/v12/sources/EasyGasScript.move +++ b/release/v12/sources/EasyGasScript.move @@ -10,6 +10,8 @@ module EasyGas { use StarcoinFramework::CoreAddresses; use StarcoinFramework::GenesisSignerCapability; use StarcoinFramework::PriceOracle; + use StarcoinFramework::Errors; + const EBAD_TRANSACTION_FEE_TOKEN: u64 = 18; struct STCToken has copy, store, drop {} @@ -83,7 +85,7 @@ module EasyGas { let gas_token_entry = borrow_global(genesis); assert!(module_name(&token_type_info) == *&gas_token_entry.module_name && account_address( &token_type_info - ) == *&gas_token_entry.account_address && struct_name(&token_type_info) == *&gas_token_entry.struct_name, EBAD_TRANSACTION_FEE_TOKEN); + ) == *&gas_token_entry.account_address && struct_name(&token_type_info) == *&gas_token_entry.struct_name, Errors::invalid_argument(EBAD_TRANSACTION_FEE_TOKEN)); gas_token_entry.data_source } diff --git a/sources/EasyGas.move b/sources/EasyGas.move index ddd19de1..04dcac3b 100644 --- a/sources/EasyGas.move +++ b/sources/EasyGas.move @@ -10,6 +10,8 @@ module EasyGas { use StarcoinFramework::CoreAddresses; use StarcoinFramework::GenesisSignerCapability; use StarcoinFramework::PriceOracle; + use StarcoinFramework::Errors; + const EBAD_TRANSACTION_FEE_TOKEN: u64 = 18; struct STCToken has copy, store, drop {} @@ -83,7 +85,7 @@ module EasyGas { let gas_token_entry = borrow_global(genesis); assert!(module_name(&token_type_info) == *&gas_token_entry.module_name && account_address( &token_type_info - ) == *&gas_token_entry.account_address && struct_name(&token_type_info) == *&gas_token_entry.struct_name, EBAD_TRANSACTION_FEE_TOKEN); + ) == *&gas_token_entry.account_address && struct_name(&token_type_info) == *&gas_token_entry.struct_name, Errors::invalid_argument(EBAD_TRANSACTION_FEE_TOKEN)); gas_token_entry.data_source }