From 360bce23dc2fd01e61ba05f536b4a83cbb8687e7 Mon Sep 17 00:00:00 2001 From: 0xExp-po <153439271+0xExp-po@users.noreply.github.com> Date: Sat, 21 Sep 2024 07:36:24 +0900 Subject: [PATCH] Dapp add devote (#56) --- dapp/.env.example | 4 + dapp/package.json | 2 + dapp/src/components/DonateModal.astro | 238 ++++++++++++++++++ dapp/src/components/ProjectInfo.astro | 91 +++++-- dapp/src/components/RegisterProject.astro | 147 ++++++++++- dapp/src/components/utils/ModalInput.astro | 13 +- dapp/src/components/utils/PrimaryButton.astro | 2 +- dapp/src/contracts/soroban_domain_sdk.ts | 21 ++ dapp/src/service/PaymentService.ts | 66 +++++ .../service/SorobanDomainContractService.ts | 31 +++ dapp/src/styles/global.css | 7 + 11 files changed, 584 insertions(+), 38 deletions(-) create mode 100644 dapp/src/components/DonateModal.astro create mode 100644 dapp/src/contracts/soroban_domain_sdk.ts create mode 100644 dapp/src/service/PaymentService.ts create mode 100644 dapp/src/service/SorobanDomainContractService.ts diff --git a/dapp/.env.example b/dapp/.env.example index 847effa..9b064f6 100644 --- a/dapp/.env.example +++ b/dapp/.env.example @@ -4,6 +4,10 @@ PUBLIC_SOROBAN_RPC_URL="https://soroban-testnet.stellar.org:443" PUBLIC_TANSU_CONTRACT_ID="CCYM5OC6RTMEUHRK2BRU5YX4G4O745DPLPU4EXVTRCUN7JRJJWXEEXAB" PUBLIC_SOROBAN_DOMAIN_CONTRACT_ID="CADDH3WW3EHDEUY4HIQUAZHRPCFQFL4MZIEZBFUIIHJAXZNLQWVC6DV4" +PUBLIC_TANSU_OWNER_ID="GCMFQP44AR32S7IRIUKNOEJW5PNWOCLRHLQWSHUCSV4QZOMUXZOVA7Q2" + +PUBLIC_DEFAULT_FEE=100 +PUBLIC_DEFAULT_TIMEOUT=30 SOROBAN_ACCOUNT="alice" SOROBAN_NETWORK="testnet" diff --git a/dapp/package.json b/dapp/package.json index 006ddbb..97e38da 100644 --- a/dapp/package.json +++ b/dapp/package.json @@ -3,8 +3,10 @@ "@astrojs/check": "^0.9.3", "@astrojs/react": "^3.6.2", "@astrojs/tailwind": "^5.1.0", + "@creit.tech/sorobandomains-sdk": "^0.1.2", "@creit.tech/stellar-wallets-kit": "^1.0.0", "@nanostores/react": "^0.7.3", + "@stellar/stellar-sdk": "^12.3.0", "astro": "^4.2.4", "install": "^0.13.0", "js-sha3": "^0.9.3", diff --git a/dapp/src/components/DonateModal.astro b/dapp/src/components/DonateModal.astro new file mode 100644 index 0000000..f312063 --- /dev/null +++ b/dapp/src/components/DonateModal.astro @@ -0,0 +1,238 @@ +--- +import Loading from "./utils/Loading.astro"; + +--- + +
+ + diff --git a/dapp/src/components/ProjectInfo.astro b/dapp/src/components/ProjectInfo.astro index 4759ae1..cf4dac5 100644 --- a/dapp/src/components/ProjectInfo.astro +++ b/dapp/src/components/ProjectInfo.astro @@ -5,6 +5,7 @@ import Loading from "./utils/Loading.astro"; import CommitHistory from "./CommitHistory.jsx"; import PrimaryButton from "./utils/PrimaryButton.astro"; import ModalInput from "./utils/ModalInput.astro"; +import DonateModal from "./DonateModal.astro"; ---