Skip to content

Commit

Permalink
Merge pull request #56 from cardano2vn/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
independenceee authored Oct 30, 2024
2 parents 76371f5 + 4da5d23 commit 92e4f48
Show file tree
Hide file tree
Showing 11 changed files with 421 additions and 406 deletions.
65 changes: 32 additions & 33 deletions contract/tests/cip68.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,41 +60,40 @@ describe("Mint, Burn, Update, Remove Assets (NFT/TOKEN) CIP68", function () {
// expect(txHash.length).toBe(64);
// });

test("Update", async function () {
const cip68Contract: Cip68Contract = new Cip68Contract({
fetcher: blockfrostProvider,
wallet: wallet,
meshTxBuilder: meshTxBuilder,
});

const unsignedTx: string = await cip68Contract.update({
assetName: "CIP68 Generators",
metadata: {
name: "CIP68 Generators",
image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua",
mediaType: "image/jpg",
},
txHash:
"d3c92245ad396c3c05e2530be2e0d3a3adbf1871113fcb18a197c23e4fdfcd1a",
});
const signedTx = await wallet.signTx(unsignedTx, true);
const txHash = await wallet.submitTx(signedTx);
console.log(txHash);
expect(txHash.length).toBe(64);
});
// test("Update", async function () {
// const cip68Contract: Cip68Contract = new Cip68Contract({
// fetcher: blockfrostProvider,
// wallet: wallet,
// meshTxBuilder: meshTxBuilder,
// });

// test('Mint Reference Script', async function () {
// const cip68Contract: Cip68Contract = new Cip68Contract({
// fetcher: blockfrostProvider,
// wallet: wallet,
// meshTxBuilder: meshTxBuilder,
// });
// const unsignedTx: string = await cip68Contract.createReferenceScriptMint();
// const signedTx = await wallet.signTx(unsignedTx, true);
// const txHash = await wallet.submitTx(signedTx);
// console.log(txHash);
// expect(txHash.length).toBe(64);
// const unsignedTx: string = await cip68Contract.update({
// assetName: "CIP68 Generators",
// metadata: {
// name: "CIP68 Generators",
// image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua",
// mediaType: "image/jpg",
// },
// txHash: "d3c92245ad396c3c05e2530be2e0d3a3adbf1871113fcb18a197c23e4fdfcd1a",
// });
// const signedTx = await wallet.signTx(unsignedTx, true);
// const txHash = await wallet.submitTx(signedTx);
// console.log(txHash);
// expect(txHash.length).toBe(64);
// });

test('Mint Reference Script', async function () {
const cip68Contract: Cip68Contract = new Cip68Contract({
fetcher: blockfrostProvider,
wallet: wallet,
meshTxBuilder: meshTxBuilder,
});
const unsignedTx: string = await cip68Contract.createReferenceScriptMint();
const signedTx = await wallet.signTx(unsignedTx, true);
const txHash = await wallet.submitTx(signedTx);
console.log(txHash);
expect(txHash.length).toBe(64);
});

// test('Store Reference Script', async function () {
// const cip68Contract: Cip68Contract = new Cip68Contract({
Expand Down
9 changes: 6 additions & 3 deletions contract/validators/mint.ak
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
use aiken/crypto.{VerificationKeyHash}
use cardano/assets.{PolicyId}
use cardano/transaction.{Transaction}
use cardano/tx.{verify_signature}
use cip68generator/types.{Burn, Mint, MintRedeemer}

validator mint {
mint(redeemer: MintRedeemer, _policy_id: PolicyId, _transaction: Transaction) {
validator mint(issuer: VerificationKeyHash) {
mint(redeemer: MintRedeemer, _policy_id: PolicyId, transaction: Transaction) {
let Transaction { extra_signatories, .. } = transaction
when redeemer is {
Mint -> True
Mint -> verify_signature(extra_signatories, issuer)
Burn -> True
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/(landing)/_components/feature-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Feature = function () {
{/* Front Side of the Flip Card */}
<div className="flip-card-front group-hover:rotate-y-180 absolute inset-0 flex items-center justify-center rounded-lg bg-slate-900 p-6 transition-transform duration-700 ease-in-out">
<div className="flex flex-col items-center md:flex-row">
<div className="mb-4 inline-block h-14 w-14 flex-shrink-0 text-gray-600 md:mb-0">
<div className="mb-4 max-md:mb-1 inline-block h-14 w-14 flex-shrink-0 text-gray-600 md:mb-0">
<Image
className="object-contain"
src={appImage.logo}
Expand All @@ -21,27 +21,27 @@ const Feature = function () {
/>
</div>
<div className="text-center md:ml-6 md:text-left">
<h3 className="truncate text-xl font-normal text-white">
<h3 className="truncate text-xl font-normal text-white max-md:text-base">
Transform
</h3>
<p className="line-clamp-4 text-sm font-normal text-white">
<p className="line-clamp-4 text-sm font-normal text-white max-md:text-xs">
To enable transformations you have to add the transform utility.
</p>
</div>
</div>
</div>

{/* Back Side of the Flip Card */}
<div className="flip-card-back group-hover:rotate-y-0 rotate-y-180 absolute inset-0 rounded-lg bg-slate-900 p-6 transition-transform duration-700 ease-in-out">
<div className="flip-card-back group-hover:rotate-y-0 rotate-y-180 absolute inset-0 rounded-lg bg-slate-900 p-6 max-md:p-4 transition-transform duration-700 ease-in-out">
<div className="flex h-full flex-col gap-3">
<div className="text-sm font-normal text-white">
<div className="text-sm font-normal text-white max-md:text-xs">
<p>
A lot of transformations can be executed on the GPU instead of
the CPU. This enables better performance. You can use the
transform-gpu utility to enable GPU Acceleration.
</p>
</div>
<Button>Explore</Button>
<Button className="max-md:text-xs h-8">Explore</Button>
</div>
</div>
</div>
Expand Down
161 changes: 58 additions & 103 deletions src/app/(landing)/_components/landing-page.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,31 @@
import { cn } from "@/utils";
import {} from "@/utils";
import Header from "@/app/(landing)/_layout/header";
import { Button } from "@/components/ui/button";
import Footer from "@/app/(landing)/_layout/footer";
import Image from "next/image";
import Title from "./title";
import { appImage } from "@/public/images";
import { appImage, bannerImage } from "@/public/images";
import features from "../_data/features";
import Feature from "./feature-section";
import { founderData } from "../_data/founders";
import Founder from "./founder-section";

export default function LandingPage() {
return (
<main className={cn("relative bg-[#0d0e12] px-4")}>
<main className="relative bg-[#0d0e12] px-4 overflow-x-hidden">
<Header />
{/* background-begin */}
<section className={cn("absolute inset-0 -z-10 h-full w-full")}>
<Image
src={appImage.logo}
alt="Background"
className={cn("h-full w-full")}
/>
</section>
{/* background-end */}

{/* banner-begin */}
<section className={cn("px-0 pt-[215px]")}>
<aside className={cn("mx-auto my-0 w-full max-w-[1200px]")}>
<section className="px-0 pt-[215px] max-md:pt-[150px] max-md:px-3">
<aside className="mx-auto my-0 w-full max-w-[1200px]">
{/* slogan-begin */}
<section className={cn("text-center")}>
<h2 className={cn("text-[54px] leading-[64px] text-[#ff9345]")}>
<section className="text-center">
<h2 className="text-[54px] leading-[64px] text-[#ff9345] max-md:text-[28px] max-md:leading-[33px] max-md:w-[320px] max-md:my-0 max-md:mx-auto">
Intelligent and Secure Messaging
</h2>
<h3
className={cn("mt-[15px] text-[42px] leading-[50px] text-[#fff]")}
>
<h3 className="mt-[15px] text-[42px] leading-[50px] text-[#fff] max-md:mt-[10px] max-md:text-[18px] max-md:leading-[22px]">
Keeping You Informed and Connected.
</h3>
<h4
className={cn(
"text-[rgb(119, 119, 118)] mx-auto mb-0 mt-10 max-w-[940px] text-[16px] leading-[20px]",
)}
>
<h4 className="text-[rgb(119, 119, 118)] mx-auto mb-0 mt-10 max-w-[940px] text-[16px] leading-[20px] max-md:mt-5 max-md:mx-auto max-md:mb-0 max-md:text-[12px] max-md:leading-[16px]">
Dmail Network is an AI-powered decentralized communication
infrastructure built to provide encrypted emails, unified
notifications, and targeted marketing across multiple chains and
Expand All @@ -51,67 +35,64 @@ export default function LandingPage() {
{/* slogan-end */}

{/* links-begin */}
<section className={cn("mt-[60px] flex justify-center gap-10")}>
<Button className="box-border flex cursor-pointer items-center rounded-[10px] px-6 py-0 text-[16px] font-medium leading-8 transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg">
<section className="mt-[60px] max-md:mt-[30px] flex justify-center gap-10">
<Button className="box-border flex cursor-pointer items-center rounded-[10px] px-6 py-0 text-[16px] font-medium leading-8 transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg max-md:text-[14px] max-md:h-[35px] max-md:rounded-[5px] gap-2 ">
Launch Token
<svg
width="12"
height="9"
viewBox="0 0 13 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M7.92652 0.198869L11.9459 4.51989C12.1925 4.78505 12.1925 5.21495 11.9459 5.48011L7.92652 9.80113C7.67987 10.0663 7.27998 10.0663 7.03334 9.80113C6.78669 9.53597 6.78669 9.10606 7.03334 8.8409L9.9745 5.67898H0.631579C0.282768 5.67898 0 5.37499 0 5C0 4.62501 0.282768 4.32102 0.631579 4.32102H9.9745L7.03334 1.1591C6.78669 0.893936 6.78669 0.464029 7.03334 0.198869C7.27998 -0.0662898 7.67987 -0.0662898 7.92652 0.198869Z"
fill="currentColor"
></path>
</svg>
</Button>
<Button className="box-border flex cursor-pointer items-center rounded-[10px] px-6 py-0 text-[16px] font-medium transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg">
<Button className="max-md:hidden box-border flex cursor-pointer items-center rounded-[10px] px-6 py-0 text-[16px] font-medium transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg">
Subcription
</Button>
</section>
{/* links-end */}

{/* statistic-begin */}
<section
className={cn(
"mt-[125px] flex h-[160px] items-center justify-around rounded-xl bg-[#13161B] px-[10px] py-0 text-center shadow-2xl",
)}
>
<div className="min-w-[160px]">
<p
className={cn(
"mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff]",
)}
>
<section className="mt-[125px] flex h-[160px] items-center justify-around rounded-xl bg-[#13161B] px-[10px] py-0 text-center shadow-2xl max-md:mt-[35px] max-md:bg-none max-md:flex-wrap max-md:h-0 max-md:p-0">
<div className="min-w-[160px] max-md:flex max-md:flex-col-reverse max-md:justify-center max-md:items-center max-md:w-[50%] max-md:h-[88px] max-md:mb-[16px] max-md:bg-slate-900 max-md-relative">
<p className="mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff] max-md:text-[20px] max-md:leading-[24px] max-md:mt-[10px]">
152.77M
</p>
<span className={cn("block text-[16px] leading-[20px]")}>
<span className="block text-[16px] leading-[20px] max-md:mt-[3px] max-md:leading-1 max-md:text-[12px]">
Total Dmailers
</span>
</div>
<div className="min-w-[160px]">
<p
className={cn(
"mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff]",
)}
>

<div className="min-w-[160px] max-md:flex max-md:flex-col-reverse max-md:justify-center max-md:items-center max-md:w-[50%] max-md:h-[88px] max-md:mb-[16px] max-md:bg-slate-900 max-md-relative">
<p className="mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff] max-md:text-[20px] max-md:leading-[24px] max-md:mt-[10px]">
152.77M
</p>
<span className={cn("block text-[16px] leading-[20px]")}>
<span className="block text-[16px] leading-[20px] max-md:mt-[3px] max-md:leading-1 max-md:text-[12px]">
Total Dmailers
</span>
</div>
<div className="min-w-[160px]">
<p
className={cn(
"mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff]",
)}
>

<div className="min-w-[160px] max-md:flex max-md:flex-col-reverse max-md:justify-center max-md:items-center max-md:w-[50%] max-md:h-[88px] max-md:mb-[16px] max-md:bg-slate-900 max-md-relative">
<p className="mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff] max-md:text-[20px] max-md:leading-[24px] max-md:mt-[10px]">
152.77M
</p>
<span className={cn("block text-[16px] leading-[20px]")}>
<span className="block text-[16px] leading-[20px] max-md:mt-[3px] max-md:leading-1 max-md:text-[12px]">
Total Dmailers
</span>
</div>
<div className="min-w-[160px]">
<p
className={cn(
"mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff]",
)}
>

<div className="min-w-[160px] max-md:flex max-md:flex-col-reverse max-md:justify-center max-md:items-center max-md:w-[50%] max-md:h-[88px] max-md:mb-[16px] max-md:bg-slate-900 max-md-relative">
<p className="mb-[10px] text-[42px] font-normal leading-[50px] text-[#fff] max-md:text-[20px] max-md:leading-[24px] max-md:mt-[10px]">
152.77M
</p>
<span className={cn("block text-[16px] leading-[20px]")}>
<span className="block text-[16px] leading-[20px] max-md:mt-[3px] max-md:leading-1 max-md:text-[12px]">
Total Dmailers
</span>
</div>
Expand All @@ -122,20 +103,12 @@ export default function LandingPage() {
{/* banner-end */}

{/* feature-begin */}
<section className={cn("px-0 py-[100px]")}>
<aside
className={cn(
"mx-auto my-0 flex w-full max-w-[1200px] flex-col gap-2",
)}
>
<section className={"px-0 mt-[200px]"}>
<aside className="mx-auto my-0 flex w-full max-w-[1200px] flex-col gap-2">
<Title />

{/* content-begin */}
<section
className={cn(
"grid grid-cols-3 gap-1 max-lg:grid-cols-2 max-sm:grid-cols-1",
)}
>
<section className="grid grid-cols-3 gap-1 max-md:grid-cols-2 ">
{features.map(function (feature, index: number) {
return <Feature key={index} />;
})}
Expand All @@ -146,68 +119,50 @@ export default function LandingPage() {
{/* feature-end */}

{/* about-begin */}
<section className="px-0 py-[100px]">
<section className="px-0 mt-[100px]">
<aside className="mx-auto my-0 flex w-full max-w-[1200px] flex-col gap-2">
<div className={"flex w-full gap-7 max-sm:flex-col"}>
<div
className={
'm relative aspect-video w-[60%] rounded-3xl before:absolute before:left-8 before:top-8 before:h-full before:w-full before:rounded-3xl before:bg-slate-900 before:shadow-xl before:content-[""] max-sm:w-full'
}
>
<div className="flex w-full gap-7 max-sm:flex-col">
<div className='m relative aspect-video w-[60%] rounded-3xl before:absolute before:left-8 before:top-8 before:h-full before:w-full before:rounded-3xl before:bg-slate-900 before:shadow-xl before:content-[""] max-sm:w-full'>
<iframe
className={
"absolute inset-0 z-10 block h-full w-full rounded-xl"
}
className="absolute inset-0 z-10 block h-full w-full rounded-xl"
src="https://www.youtube.com/embed/_GrbIRoT3mU"
title="Open source dynamic assets (Token/NFT) generator (CIP68)"
frameBorder={"none"}
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
></iframe>
</div>
<div
className={cn(
"z-10 flex w-[40%] flex-col items-start gap-[15px] max-sm:w-full",
)}
>
<h2 className={cn("text-left text-[25px] font-bold")}>
<div className="z-10 flex w-[40%] flex-col items-start gap-[15px] max-md:gap-3 max-sm:w-full">
<h2 className="text-left text-[25px] font-bold max-md:text-xl">
About CIP68 Generator
</h2>
<p className={cn("mb-1 text-[20px] font-normal")}>
<p className="mb-1 text-[20px] font-normal max-md:text-lg">
Open source dynamic assets (Token/NFT) generator (CIP68)
</p>
<span className={cn("text-left leading-[1.8]")}>
<span className={"text-left leading-[1.8] max-md:text-base"}>
We will develop a platform that enables users to choose dual
targets and trading methods directly within their wallets.
Simultaneously, we will create automated trading bots on
decentralized exchanges
</span>
<span className={cn("text-left leading-[1.8]")}>
<span className={"text-left leading-[1.8] max-md:text-base"}>
We will develop a platform that enables users to choose dual
targets and trading methods directly within their wallets.
Simultaneously, we will create automated trading bots on
decentralized exchanges
</span>
<Button className={cn("w-full px-8 py-6")}>About us</Button>
<Button className={"w-full px-8 py-6"}>About us</Button>
</div>
</div>
</aside>
</section>
{/* about-end */}

{/* founder-begin */}
<section className={cn("px-0 pt-[100px]")}>
<aside
className={cn(
"mx-auto my-0 flex w-full max-w-[1200px] flex-col gap-2",
)}
>
<section className={"px-0 mt-[100px] max-md:mt-[50px]"}>
<aside className="mx-auto my-0 flex w-full max-w-[1200px] flex-col gap-2">
<Title />
{/* founder-begin */}
<section
className={cn(
"grid grid-cols-3 content-start justify-stretch gap-8 rounded-lg max-lg:grid-cols-2 max-sm:grid-cols-1",
)}
>
<section className="grid grid-cols-3 content-start justify-stretch gap-8 rounded-lg max-lg:grid-cols-2 max-sm:grid-cols-1">
{founderData.map(function (founder, index: number) {
return (
<Founder
Expand Down
Loading

0 comments on commit 92e4f48

Please sign in to comment.