Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Annotation Processor] Set default int type to BigInteger #432

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
80eb095
chore: Update default cost model during Conway HF
satran004 Aug 30, 2024
a4a1593
Merge branch 'master' into cost_model
satran004 Sep 5, 2024
e72ba2b
chore: Change Map to LinkedHashMap to maintain the ordering
satran004 Sep 5, 2024
d1f8f5b
chore: Update CostModels from Map to LinkedHashMap to maintain origin…
satran004 Sep 5, 2024
184581c
chore: Return minFeeReferenceScriptByte in Ogmios backe and HashMap t…
satran004 Sep 5, 2024
4e983fa
chore: Added Plutus ops for V3
satran004 Sep 5, 2024
1953490
chore: New abstract method getLanguage to return Language
satran004 Sep 5, 2024
db7900c
chore: Handle Plutus V3
satran004 Sep 5, 2024
1e6a078
chore: CostModels is now a LinkedHashMap instead of Map and Ogmios PP…
satran004 Sep 5, 2024
10befbc
chore: Reference script resolver
satran004 Sep 5, 2024
aa07e29
chore: Add reference scripts
satran004 Sep 5, 2024
ffb88f3
chore: Conway era script data hash changes
satran004 Sep 5, 2024
514da26
chore: Ignore resolving reference scripts if reference scripts are ad…
satran004 Sep 5, 2024
3de4d36
chore: fixed tests
satran004 Sep 5, 2024
ebeb2e5
chore: Add a new overloaded method to pay a single Amount
satran004 Sep 7, 2024
1557dbf
chore: Adjust tests for Conway era related serialization changes
satran004 Sep 7, 2024
6d47e23
chore: Updated cost model -> languageview for V3
satran004 Sep 7, 2024
f3292af
feat: Conway era serialization change 258 tag for set.
satran004 Sep 7, 2024
74add54
feat: Adjust script data hash for Plutus V3
satran004 Sep 7, 2024
0c083e2
chore: Conway era changes
satran004 Sep 7, 2024
3d0fe07
feat: Update Koios and Ogmios backend service for latest Conway era c…
satran004 Sep 7, 2024
3ad9bb1
chore: Set era to Babbage for babbage era specific failed tests
satran004 Sep 7, 2024
eec470b
chore: Fixed test
satran004 Sep 7, 2024
9b3a912
chore: Merge with master
satran004 Sep 7, 2024
3dd6761
chore: Show error stack incase of error
satran004 Sep 12, 2024
c87b462
chore: Updated default int type to BigInteger and package name to low…
satran004 Sep 12, 2024
ebfbc80
Merge branch 'master' into fix_422
satran004 Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
try {
plutusContractBlueprint = PlutusBlueprintLoader.loadBlueprint(blueprintFile);
} catch (Exception e) {
e.printStackTrace();
error(typeElement, "Error processing blueprint file %s", blueprintFile.getAbsolutePath(), e);
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Modifier;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -36,7 +37,7 @@ public FieldSpec processIntegerDataType(String javaDoc, BlueprintSchema schema,
if(schema.getDataType() != integer)
throw new IllegalArgumentException("Schema is not of type integer");
String title = schema.getTitle() == null ? alternativeName : schema.getTitle();
return FieldSpec.builder(int.class, title)
return FieldSpec.builder(BigInteger.class, title)
.addModifiers(Modifier.PRIVATE)
.addJavadoc(javaDoc)
.build();
Expand Down Expand Up @@ -94,7 +95,7 @@ private TypeName getInnerType(String ns, BlueprintSchema items) {
case bytes:
return TypeName.get(byte[].class);
case integer:
return TypeName.get(Integer.class);
return TypeName.get(BigInteger.class);
case string:
return TypeName.get(String.class);
case bool:
Expand Down Expand Up @@ -207,6 +208,8 @@ public FieldSpec processPlutusDataType(String javaDoc, BlueprintSchema schema, S
private String getPackage(String ns) {
String pkg = (ns != null && !ns.isEmpty())? annotation.packageName() + "." + ns + ".model"
: annotation.packageName() + ".model";

pkg = pkg.toLowerCase();
return pkg;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ public List<FieldSpec> createFieldSpecForDataTypes(String ns, String javaDoc, Bl
private String getPackageName(String ns) {
String pkg = (ns != null && !ns.isEmpty()) ? annotation.packageName() + "." + ns + ".model"
: annotation.packageName() + ".model";

pkg = pkg.toLowerCase();
return pkg;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public void processValidator(Validator validator, PlutusVersion plutusVersion) {
if (pkgSuffix != null)
packageName = packageName + "." + pkgSuffix;

packageName = packageName.toLowerCase();

String title = validatorName;
title = JavaFileUtil.toCamelCase(title);

Expand Down
Loading