@@ -158,6 +158,8 @@ private static class DynamicResourceProperties {
158158 private static final byte [] AVAILABLE_CONTRACT_TYPE = "AVAILABLE_CONTRACT_TYPE" .getBytes ();
159159 private static final byte [] ACTIVE_DEFAULT_OPERATIONS = "ACTIVE_DEFAULT_OPERATIONS" .getBytes ();
160160
161+ private static final byte [] IMPROVE_TRANSFER_TRC10_SECURITY = "IMPROVE_TRANSFER_TRC10_SECURITY" .getBytes ();
162+
161163
162164 @ Autowired
163165 private DynamicPropertiesStore (@ Value ("properties" ) String dbName ) {
@@ -469,6 +471,12 @@ private DynamicPropertiesStore(@Value("properties") String dbName) {
469471 this .saveAllowTvmTransferTrc10 (Args .getInstance ().getAllowTvmTransferTrc10 ());
470472 }
471473
474+ try {
475+ this .getImproveTransferTrc10Security ();
476+ } catch (IllegalArgumentException e ) {
477+ this .saveImproveTransferTrc10Security (Args .getInstance ().getImproveTransferTrc10Security ());
478+ }
479+
472480 try {
473481 this .getAvailableContractType ();
474482 } catch (IllegalArgumentException e ) {
@@ -1206,6 +1214,19 @@ public long getAllowTvmTransferTrc10() {
12061214 () -> new IllegalArgumentException ("not found ALLOW_TVM_TRANSFER_TRC10" ));
12071215 }
12081216
1217+ public void saveImproveTransferTrc10Security (long value ) {
1218+ this .put (IMPROVE_TRANSFER_TRC10_SECURITY ,
1219+ new BytesCapsule (ByteArray .fromLong (value )));
1220+ }
1221+
1222+ public long getImproveTransferTrc10Security () {
1223+ return Optional .ofNullable (getUnchecked (IMPROVE_TRANSFER_TRC10_SECURITY ))
1224+ .map (BytesCapsule ::getData )
1225+ .map (ByteArray ::toLong )
1226+ .orElseThrow (
1227+ () -> new IllegalArgumentException ("not found IMPROVE_TRANSFER_TRC10_SECURITY" ));
1228+ }
1229+
12091230 public void saveAvailableContractType (byte [] value ) {
12101231 this .put (AVAILABLE_CONTRACT_TYPE ,
12111232 new BytesCapsule (value ));
0 commit comments