-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from cardano2vn/refactor
feat: update compiler version and refactor reference script handling …
- Loading branch information
Showing
7 changed files
with
50 additions
and
223 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
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,15 +1,12 @@ | ||
export const EXCHANGE_FEE_ADDRESS = process.env.EXCHANGE_FEE_ADDRESS || ""; | ||
export const MINT_REFERENCE_SCRIPT_ADDRESS = | ||
process.env.MINT_REFERENCE_SCRIPT_ADDRESS || ""; | ||
export const STORE_REFERENCE_SCRIPT_ADDRESS = | ||
process.env.STORE_REFERENCE_SCRIPT_ADDRESS || ""; | ||
export const MINT_REFERENCE_SCRIPT_HASH = | ||
process.env.MINT_REFERENCE_SCRIPT_HASH || ""; | ||
export const STORE_REFERENCE_SCRIPT_HASH = | ||
process.env.STORE_REFERENCE_SCRIPT_HASH || ""; | ||
export const REFERENCE_SCRIPT_ADDRESS = | ||
process.env.REFERENCE_SCRIPT_ADDRESS || ""; | ||
|
||
export const REFERENCE_SCRIPT_HASH = process.env.REFERENCE_SCRIPT_HASH || ""; | ||
|
||
export const EXCHANGE_FEE_PRICE = process.env.EXCHANGE_FEE_PRICE || ""; | ||
|
||
export const title = { | ||
mint: "mint.mint.mint", | ||
store: "store.store.spend", | ||
mint: "cip68generator.cip68generator.mint", | ||
store: "cip68generator.cip68generator.spend", | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use aiken/crypto.{ScriptHash, VerificationKeyHash} | ||
use cardano/assets.{PolicyId} | ||
use cardano/transaction.{OutputReference,Transaction} | ||
use cip68generator/types.{MintRedeemer,StoreRedeemer} | ||
use types/cip68.{CIP68} | ||
|
||
validator cip68generator( | ||
_exchange: VerificationKeyHash, | ||
_exchange_fee: Int, | ||
_store: ScriptHash, | ||
) { | ||
mint(_redeemer: MintRedeemer, _policy_id: PolicyId, _transaction: Transaction) { | ||
True | ||
} | ||
spend( | ||
_datum: Option<CIP68>, | ||
_redeemer: StoreRedeemer, | ||
_output_reference: OutputReference, | ||
_transaction: Transaction, | ||
) { | ||
True | ||
} | ||
|
||
else(_) { | ||
fail | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.