-
Notifications
You must be signed in to change notification settings - Fork 1
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
nft:helios #64
nft:helios #64
Conversation
aleeusgr
commented
Apr 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯
|
||
try { | ||
// Create an Instance of NetworkEmulator | ||
const network = new NetworkEmulator(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
network.createUtxo(alice, BigInt(5000000)); | ||
|
||
// Create a Test Asset | ||
const testAsset = new Assets(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const utxo of utxos) { | ||
// console.log("txId", utxo.txId.hex + "#" + utxo.utxoIdx); | ||
// console.log("value", utxo.value.dump()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here above we added a native asset into a wallet on emulator instantiation;
// Add the UTXO as inputs | ||
tx.addInputs(utxos); | ||
|
||
// Add the script as a witness to the transaction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
Init | ||
} | ||
|
||
const TX_ID: ByteArray = #7c873bf399ed9255e38f9d897e835f017377320794a3ecd4f1d0453ca9aaac29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 💭
const TX_IDX: Int = 0 | ||
const outputId: TxOutputId = TxOutputId::new(txId, TX_IDX) | ||
|
||
func main(_, ctx: ScriptContext) -> Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename?
|
||
const lucid = await Lucid.new(emulator); | ||
|
||
// emulator state changes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
choose user wallet.