Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7161148
feat: code for deploying asteria in preview
francolq Feb 19, 2025
4f449fa
feat: code for creating ship in preview
francolq Feb 19, 2025
eb51396
feat: missing utils module
francolq Feb 19, 2025
22b4fa3
more useful lucid pallas code
francolq Jul 23, 2025
f237581
Merge branch 'txpipe:main' into draft/lucid-sdk
franciscojoray Jul 28, 2025
61b7e26
fix: update parameter descriptions for getRingAreaSample function
franciscojoray Jul 28, 2025
f7c00a4
feat: update pellets CSV handling to include prize-related fields
franciscojoray Jul 28, 2025
ab44857
script for deployment and Asteria creation
franciscojoray Jul 28, 2025
110f3e6
create pellets in deployment script
franciscojoray Jul 28, 2025
cccd4fc
feat: update pellets CSV path and add pellets data
franciscojoray Jul 28, 2025
e20ef09
feat: enhance pellet csv structure check for prize tokens
franciscojoray Jul 29, 2025
c2f5db1
improved UTxOs update check
franciscojoray Jul 29, 2025
9dbe27c
create pellets in batches
franciscojoray Aug 1, 2025
5eb591c
scripts for consuming pellets and Asteria
franciscojoray Aug 1, 2025
1b64639
board example
franciscojoray Aug 1, 2025
d52d90f
Merge branch 'txpipe:main' into draft/lucid-sdk
franciscojoray Aug 1, 2025
e208616
Merge branch 'txpipe:main' into draft/lucid-sdk
franciscojoray Aug 4, 2025
421363f
minting admin tokens on deploy
franciscojoray Aug 4, 2025
80b4182
burning admin tokens when consuming pellets and Asteria
franciscojoray Aug 4, 2025
f782832
script for adding lovelace to Asteria
franciscojoray Aug 4, 2025
606353e
Merge branch 'txpipe:main' into draft/lucid-sdk
franciscojoray Aug 4, 2025
55ed764
Merge branch 'txpipe:main' into draft/lucid-sdk
franciscojoray Aug 6, 2025
543521f
fixed error when consuming pellets in last chunk
franciscojoray Aug 6, 2025
e5c4579
pellets for deploy
franciscojoray Aug 6, 2025
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
129 changes: 5 additions & 124 deletions offchain/tests/admin/pellets/pellets.csv
Original file line number Diff line number Diff line change
@@ -1,124 +1,5 @@
fuel,x,y
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
36,-4,-17
68,19,-10
90,12,-35
40,-8,3
25,20,16
fuel,x,y,prize_policy,prize_name,prize_amount
90,12,-35,255d6456fa68e3d858d80e3168b0d76d57b6c4033c6234e2f0de8499,tokenA,2
40,-8,3,,,
25,20,16,255d6456fa68e3d858d80e3168b0d76d57b6c4033c6234e2f0de8499,tokenA,3
36,-4,-17,,,
15 changes: 9 additions & 6 deletions offchain/tests/admin/pellets/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ function getRingAreaCoordinates(inner_r: number, outer_r: number): Coordinates {
/**
* Returns an array with a random sample of pellet parameters over the area
* between two circles with radii inner_r and outer_r respectively.
* @param inner_r Inner diamond diagonal. Must be greater than or equal to 0.
* @param outer_r Outer diamond diagonal. Must be greater than or equal to inner_r.
* @param inner_r Inner circle radius. Must be greater than or equal to 0.
* @param outer_r Outer circle radius. Must be greater than or equal to inner_r.
* @param min_fuel Minimum fuel held by the sample pellets. Must be greater than or equal to 0.
* @param max_fuel Maximum fuel held by the sample pellets. Must be greater than or equal to min_fuel.
* @param density Density of the sample: equals 1 if every diamond point is taken. Must be in the range 0 - 1, inclusive.
* @param density Density of the sample: equals 1 if every ring area point is taken. Must be in the range 0 - 1, inclusive.
*/
function getRingAreaSample(
inner_r: number,
Expand All @@ -165,7 +165,7 @@ function getRingAreaSample(

function writePelletsCSV(pellets: PelletParams, path: string) {
const csv = stringify(pellets, {
columns: ["fuel", "pos_x", "pos_y"],
columns: ["fuel", "pos_x", "pos_y", "prize_policy", "prize_name", "prize_amount"],
});
Deno.writeTextFileSync(path, csv);
}
Expand All @@ -174,13 +174,16 @@ async function readPelletsCSV(path: string) {
const text = await Deno.readTextFile(path);
const data = parse(text, {
skipFirstRow: true,
columns: ["fuel", "pos_x", "pos_y"],
columns: ["fuel", "pos_x", "pos_y", "prize_policy", "prize_name", "prize_amount"],
});
const params: { fuel: bigint; pos_x: bigint; pos_y: bigint }[] = data.map(
const params: { fuel: bigint; pos_x: bigint; pos_y: bigint; prize_policy: string | null; prize_name: string | null; prize_amount: bigint | null }[] = data.map(
(p) => ({
fuel: BigInt(p.fuel),
pos_x: BigInt(p.pos_x),
pos_y: BigInt(p.pos_y),
prize_policy: p.prize_policy || null,
prize_name: p.prize_name || null,
prize_amount: BigInt(p.prize_amount) || null,
})
);
return params;
Expand Down
Loading
Loading