Skip to content

Commit

Permalink
feat(cactus-core-api): add Ethereum ledger type
Browse files Browse the repository at this point in the history
Peter's change: Added the missing `ETHEREUM` constant to the leger type
that the static consortium plugin has built in to it.
This was necessary because adding it only to the core-api broke the build.
The two types (since they are duplicates of each other) must be updated in
tandem otherwise the code won't compile (which is a good thing because it
is an example if when the compiler saves us from mistakes like this that would
otherwise stay hidden until much later and only come out as runtime errors)

Authored-by: Bruno Mateus

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
RafaelAPB authored and petermetz committed Nov 30, 2024
1 parent c6a6c3f commit a1be603
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"BESU_2X",
"BURROW_0X",
"CORDA_4X",
"ETHEREUM",
"FABRIC_2",
"SAWTOOTH_1X"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"BESU_2X",
"BURROW_0X",
"CORDA_4X",
"ETHEREUM",
"FABRIC_2",
"SAWTOOTH_1X"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass
/**
* Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.
*
* Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,sAWTOOTH1X
* Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC2,sAWTOOTH1X
*/

@JsonClass(generateAdapter = false)
Expand All @@ -40,6 +40,9 @@ enum class LedgerType(val value: kotlin.String) {
@Json(name = "CORDA_4X")
cORDA4X("CORDA_4X"),

@Json(name = "ETHEREUM")
eTHEREUM("ETHEREUM"),

@Json(name = "FABRIC_2")
fABRIC2("FABRIC_2"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ export const LedgerType = {
Besu2X: 'BESU_2X',
Burrow0X: 'BURROW_0X',
Corda4X: 'CORDA_4X',
Ethereum: 'ETHEREUM',
Fabric2: 'FABRIC_2',
Sawtooth1X: 'SAWTOOTH_1X'
} as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ components:
- BESU_2X
- BURROW_0X
- CORDA_4X
- ETHEREUM
- FABRIC_2
- SAWTOOTH_1X
type: string
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/cactus-core-api/src/main/json/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
"BESU_2X",
"BURROW_0X",
"CORDA_4X",
"ETHEREUM",
"FABRIC_2",
"SAWTOOTH_1X"
]
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-core-api/src/main/json/openapi.tpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
"BESU_2X",
"BURROW_0X",
"CORDA_4X",
"ETHEREUM",
"FABRIC_2",
"SAWTOOTH_1X"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass
/**
* Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.
*
* Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,sAWTOOTH1X
* Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC2,sAWTOOTH1X
*/

@JsonClass(generateAdapter = false)
Expand All @@ -40,6 +40,9 @@ enum class LedgerType(val value: kotlin.String) {
@Json(name = "CORDA_4X")
cORDA4X("CORDA_4X"),

@Json(name = "ETHEREUM")
eTHEREUM("ETHEREUM"),

@Json(name = "FABRIC_2")
fABRIC2("FABRIC_2"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ export const LedgerType = {
Besu2X: 'BESU_2X',
Burrow0X: 'BURROW_0X',
Corda4X: 'CORDA_4X',
Ethereum: 'ETHEREUM',
Fabric2: 'FABRIC_2',
Sawtooth1X: 'SAWTOOTH_1X'
} as const;
Expand Down

0 comments on commit a1be603

Please # to comment.