Skip to content

Commit

Permalink
Changed typing constraints
Browse files Browse the repository at this point in the history
- made 0x optional in byte arrays
- removed min size constraints on uint types
  • Loading branch information
dennis guye committed Dec 11, 2019
1 parent 59618b5 commit 9528028
Show file tree
Hide file tree
Showing 8 changed files with 241 additions and 241 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* AUTO-GENERATED SOURCE FILE. DO NOT EDIT MANUALLY -- YOUR CHANGES WILL
* BE WIPED OUT WHEN THIS FILE GETS RE-GENERATED OR UPDATED.
* GENERATED: 2019-12-10
* GENERATED: 2019-12-11
*
*****************************************************************************/
public class RPCClientMethods{
Expand Down
2 changes: 1 addition & 1 deletion rpc-lib4j/src/main/java/org/aion/rpc/constants/Method.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* AUTO-GENERATED SOURCE FILE. DO NOT EDIT MANUALLY -- YOUR CHANGES WILL
* BE WIPED OUT WHEN THIS FILE GETS RE-GENERATED OR UPDATED.
* GENERATED: 2019-12-10
* GENERATED: 2019-12-11
*
*****************************************************************************/
public enum Method{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* AUTO-GENERATED SOURCE FILE. DO NOT EDIT MANUALLY -- YOUR CHANGES WILL
* BE WIPED OUT WHEN THIS FILE GETS RE-GENERATED OR UPDATED.
* GENERATED: 2019-12-10
* GENERATED: 2019-12-11
*
*****************************************************************************/
public interface RPCServerMethods extends RPC{
Expand Down
2 changes: 1 addition & 1 deletion rpc-lib4j/src/main/java/org/aion/rpc/types/RPCTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* AUTO-GENERATED SOURCE FILE. DO NOT EDIT MANUALLY -- YOUR CHANGES WILL
* BE WIPED OUT WHEN THIS FILE GETS RE-GENERATED OR UPDATED.
* GENERATED: 2019-12-10
* GENERATED: 2019-12-11
*
*****************************************************************************/
public class RPCTypes{
Expand Down
448 changes: 224 additions & 224 deletions rpc-lib4j/src/main/java/org/aion/rpc/types/RPCTypesConverter.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rpc-lib4j/tests/RPCMethodsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
*
* AUTO-GENERATED SOURCE FILE. DO NOT EDIT MANUALLY -- YOUR CHANGES WILL
* BE WIPED OUT WHEN THIS FILE GETS RE-GENERATED OR UPDATED.
* GENERATED: 2019-12-10
* GENERATED: 2019-12-11
*
*****************************************************************************/
public class RPCMethodsTest{
Expand Down
2 changes: 1 addition & 1 deletion rpc-lib4j/tests/RPCTestUtilsInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* AUTO-GENERATED SOURCE FILE. DO NOT EDIT MANUALLY -- YOUR CHANGES WILL
* BE WIPED OUT WHEN THIS FILE GETS RE-GENERATED OR UPDATED.
* GENERATED: 2019-12-10
* GENERATED: 2019-12-11
*
*****************************************************************************/
public interface RPCTestUtilsInterface{
Expand Down
22 changes: 11 additions & 11 deletions spec/types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<regex name="unsignedHexPattern" value="^0x([0-9a-fA-F]{2})+$" comment="Validates that a number is encoded as a hex string. This is different from hex pattern since this validates that the string correctly encodes a byte array."/>
<regex name="decPattern" value="^[-+]?[0-9]+$" comment="Validates a signed decimal string."/>
<regex name="booleanPattern" value="^([Tt]rue|[Ff]alse)$" comment="Validates a boolean string."/>
<regex name="byteArrayPattern" value="^0x([0-9a-fA-F]{2})*$" comment="Validates a byte hex string. This is different from unsignedHexPattern since empty byte arrays are allowed here."/>
<regex name="byteArrayPattern" value="^(0x)?([0-9a-fA-F]{2})*$" comment="Validates a byte hex string. This is different from unsignedHexPattern since empty byte arrays are allowed here."/>
<regex name="aionAddressPattern" value="^(0x)?([a-fA-F0-9]{64})$"
comment="Validates that an aion address is valid"/>
</regexes>
Expand Down Expand Up @@ -333,7 +333,7 @@
<type-composite typeName="ethTxReceiptLogs">
<field fieldName="address" required="true" type="address"/>
<field fieldName="data" required="true" type="dataHexString"/>
<field fieldName="blockNumber" required="true" type="long"/>
<field fieldName="blockNumber" required="true" type="uint32HexString"/>
<field fieldName="transactionIndex" required="true" type="uint16HexString"/>
<field fieldName="logIndex" required="true" type="uint16HexString"/>
<field fieldName="topics" required="true" type="dataHexString_array"/>
Expand Down Expand Up @@ -403,26 +403,26 @@
min="2" regex=".*" typeName="dataHexString"/>
<type-constrained baseType="bigInt" max="infinity" min="3" regex="^(0x)?[0-9a-fA-F]+$"
typeName="bigIntHexString"/>
<type-constrained baseType="uint256" max="66" min="66" regex="^(0x)?[0-9a-fA-F]+$"
<type-constrained baseType="uint256" max="66" min="2" regex="^(0x)?[0-9a-fA-F]+$"
typeName="uint256HexString"/>
<type-constrained baseType="uint64" max="18" min="18" regex="^(0x)?[0-9a-fA-F]+$"
<type-constrained baseType="uint64" max="18" min="2" regex="^(0x)?[0-9a-fA-F]+$"
typeName="uint64HexString"/>
<type-constrained baseType="uint128" max="34" min="34" regex="^(0x)?[0-9a-fA-F]+$"
<type-constrained baseType="uint128" max="34" min="2" regex="^(0x)?[0-9a-fA-F]+$"
typeName="uint128HexString"/>
<type-constrained baseType="uint32" max="18" min="18" regex="^(0x)?[0-9a-fA-F]+$"
<type-constrained baseType="uint32" max="18" min="2" regex="^(0x)?[0-9a-fA-F]+$"
typeName="uint32HexString"/>
<type-constrained baseType="uint16" max="18" min="18" regex="^(0x)?[0-9a-fA-F]+$"
<type-constrained baseType="uint16" max="18" min="2" regex="^(0x)?[0-9a-fA-F]+$"
typeName="uint16HexString"/>
<type-constrained baseType="long" min="3" max="18" regex="^(0x)?[0-9a-fA-F]+$"
typeName="longHexString"/>
<type-constrained baseType="int" min="3" max="10" regex="^(0x)?[0-9a-fA-F]+$"
typeName="intHexString"/>
<type-constrained baseType="byte" min="3" max="4" regex="^(0x)?[0-9a-fA-F]+$"
typeName="byteHexString"/>
<type-constrained baseType="dataHexString" typeName="byte32String" max="66" min="66"
regex=".*"/>
<type-constrained baseType="dataHexString" typeName="byte64String" max="130" min="130"
regex=".*"/>
<type-constrained baseType="dataHexString" typeName="byte32String" max="66" min="64"
regex="^(0x)?[a-fA-F0-9]{64}$"/>
<type-constrained baseType="dataHexString" typeName="byte64String" max="130" min="128"
regex="^(0x)?[a-fA-F0-9]{128}$"/>
<type-constrained baseType="string" typeName="decimalstring"
regex="^([+-]([1-9][0-9]*|[0-9]+[.][0-9])|[0-9]+([.][0-9])?)[0-9]*$" min="1"
max="infinity"/>
Expand Down

0 comments on commit 9528028

Please sign in to comment.