Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
HinsonSIDAN committed Aug 2, 2024
1 parent 7a5496f commit 0e1278f
Show file tree
Hide file tree
Showing 35 changed files with 1,401 additions and 1,034 deletions.
12 changes: 0 additions & 12 deletions apps/playground/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ const withMDX = require("@next/mdx")();
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
transpilePackages: [
// "@meshsdk/react",
// "@cardano-sdk/core",
// "@cardano-sdk/crypto",
// "@cardano-sdk/util",
],
webpack: function (config, options) {
config.experiments = {
asyncWebAssembly: true,
Expand All @@ -17,11 +11,5 @@ const nextConfig = {
return config;
},
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
};
module.exports = withMDX(nextConfig);
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import LiveCodeDemo from "~/components/sections/live-code-demo";
import TwoColumnsScroll from "~/components/sections/two-columns-scroll";
import Codeblock from "~/components/text/codeblock";
import { demoAsset, demoPlutusAlwaysSucceedScript } from "~/data/cardano";
import { getTxBuilder, getWalletUtxo } from "../common";
import { getTxBuilder } from "../common";

export default function TxbuilderContractLockAssets() {
return (
Expand Down Expand Up @@ -48,7 +48,7 @@ function Right() {
const [userInput2, setUserInput2] = useState<string>("meshsecretcode");

async function runDemo() {
const { utxo } = await getWalletUtxo(wallet, "3000000");
const utxos = await wallet.getUtxos();

const changeAddress = await wallet.getChangeAddress();

Expand All @@ -62,10 +62,10 @@ function Right() {

// todo
const unsignedTx = await txBuilder
.txIn(utxo.input.txHash, utxo.input.outputIndex)
.txOut(scriptAddress, [])
.txOutInlineDatumValue(userInput2)
.changeAddress(changeAddress)
.selectUtxosFrom(utxos)
.complete();

const signedTx = await wallet.signTx(unsignedTx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import LiveCodeDemo from "~/components/sections/live-code-demo";
import TwoColumnsScroll from "~/components/sections/two-columns-scroll";
import Codeblock from "~/components/text/codeblock";
import { demoAsset, demoPlutusAlwaysSucceedScript } from "~/data/cardano";
import { getTxBuilder, getWalletUtxo } from "../common";
import { getTxBuilder } from "../common";

export default function TxbuilderContractUnlockAssets() {
return (
Expand Down Expand Up @@ -50,7 +50,8 @@ function Right() {
const [userInput2, setUserInput2] = useState<string>("meshsecretcode");

async function runDemo() {
const { utxo } = await getWalletUtxo(wallet, "5000000");
const utxos = await wallet.getUtxos();
const collateral = await wallet.getCollateral();

const changeAddress = await wallet.getChangeAddress();

Expand All @@ -73,15 +74,18 @@ function Right() {

// todo
const unsignedTx = await txBuilder
.txIn(utxo.input.txHash, utxo.input.outputIndex)
.spendingPlutusScriptV2()
.txIn(assetUtxo.input.txHash, assetUtxo.input.outputIndex)
.txInInlineDatumPresent()
.txInRedeemerValue(mConStr0([]))
// .txInScript(getScriptCbor("Spending")) // todo
.txOut(changeAddress, [])
.changeAddress(changeAddress)
.txInCollateral(utxo.input.txHash, utxo.input.outputIndex)
.txInCollateral(
collateral[0]?.input.txHash!,
collateral[0]?.input.outputIndex!,
)
.selectUtxosFrom(utxos)
.complete();

const signedTx = await wallet.signTx(unsignedTx);
Expand Down
13 changes: 0 additions & 13 deletions jest.config.ts

This file was deleted.

Loading

0 comments on commit 0e1278f

Please sign in to comment.