-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
66 add prize tokens to pellets (#67)
* onchain for adding prices into pellets. * offchain for creating pellets with prizes. * fixed typo. * updated mvp doc.
- Loading branch information
1 parent
b4814b1
commit 861866a
Showing
13 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"txHash":"6c8a843625a261c2be8119b83fca0d504100a1faa8d117e51725187143ed12e6"} | ||
{"txHash":"dc3f0b00161f7c7db78734fb458d34f591b182991dab9df7bfae3be031a25631"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"txHash":"368f05bd14617c5f78479c3d05affee3ae94dd7f55d2e2a40dabfefdb0137bba"} | ||
{"txHash":"2ead0a8f05c4ff750b708da18e0f56d72d5d91af313b5a611661d546e78cfa69"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"txHash":"10b9d30439c45d536882304148ff1269b150434d4196cda50062d15611d24458"} | ||
{"txHash":"98f9f1163a9395261ee27a0eaded2224d5e953b796bd7aa911c1eed7383bc542"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,28 @@ import { admin_token } from "../../../constants.ts"; | |
import { createPellets } from "../../../transactions/admin/pellets/create-pellets.ts"; | ||
import { readPelletsCSV } from "./utils.ts"; | ||
import { printTxURL } from "../../../utils.ts"; | ||
import { AssetClassT } from "../../../types.ts"; | ||
import { | ||
Assets, | ||
fromText, | ||
toUnit, | ||
} from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
const tokenA: AssetClassT = { | ||
policy: "255d6456fa68e3d858d80e3168b0d76d57b6c4033c6234e2f0de8499", | ||
name: fromText("tokenA"), | ||
}; | ||
const tokenB: AssetClassT = { | ||
policy: "b7341c90d38390ae3a890435559184f01fac24f79df06fd5c02f7fe4", | ||
name: fromText("tokenB"), | ||
}; | ||
const tokenAUnit = toUnit(tokenA.policy, tokenA.name); | ||
const tokenBUnit = toUnit(tokenB.policy, tokenB.name); | ||
const prize_tokens: Assets = { | ||
[tokenAUnit]: 1n, | ||
[tokenBUnit]: 2n, | ||
}; | ||
|
||
const params = await readPelletsCSV("tests/admin/pellets/pellets.csv"); | ||
const txHash = await createPellets(admin_token, params); | ||
const txHash = await createPellets(prize_tokens, admin_token, params); | ||
printTxURL(txHash); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters