From 9e3d14f7dc3bf75d21eb0e545dcbca19d8d73cc2 Mon Sep 17 00:00:00 2001 From: megrogan Date: Thu, 14 Nov 2024 12:01:00 +0000 Subject: [PATCH] Fee of 500 CHAT to list a new token --- .../registry/api/src/updates/add_token.rs | 6 +-- .../components/home/MakeProposalModal.svelte | 50 +++++++++++++------ frontend/app/src/i18n/cn.json | 3 +- frontend/app/src/i18n/de.json | 3 +- frontend/app/src/i18n/en.json | 3 +- frontend/app/src/i18n/es.json | 3 +- frontend/app/src/i18n/fa.json | 3 +- frontend/app/src/i18n/fr.json | 3 +- frontend/app/src/i18n/hi.json | 3 +- frontend/app/src/i18n/it.json | 3 +- frontend/app/src/i18n/iw.json | 3 +- frontend/app/src/i18n/jp.json | 3 +- frontend/app/src/i18n/pl.json | 3 +- frontend/app/src/i18n/ru.json | 3 +- frontend/app/src/i18n/uk.json | 3 +- frontend/app/src/i18n/vi.json | 3 +- frontend/app/src/utils/sns.ts | 3 ++ tsBindings/registry/RegistryPayment.ts | 4 ++ tsBindings/registry/RegistryTokenDetails.ts | 3 +- 19 files changed, 75 insertions(+), 33 deletions(-) create mode 100644 tsBindings/registry/RegistryPayment.ts diff --git a/backend/canisters/registry/api/src/updates/add_token.rs b/backend/canisters/registry/api/src/updates/add_token.rs index 1056bb9ae8..8452e476ed 100644 --- a/backend/canisters/registry/api/src/updates/add_token.rs +++ b/backend/canisters/registry/api/src/updates/add_token.rs @@ -1,5 +1,5 @@ use crate::TokenStandard; -use candid::CandidType; +use candid::{CandidType, Principal}; use human_readable::{HumanReadablePrincipal, ToHumanReadable}; use serde::{Deserialize, Serialize}; use types::{CanisterId, UserId}; @@ -27,7 +27,7 @@ pub enum Response { #[derive(Serialize)] pub struct HumanReadableArgs { ledger_canister_id: HumanReadablePrincipal, - payer: Option, + payer: Option, token_standard: String, info_url: String, how_to_buy_url: String, @@ -41,7 +41,7 @@ impl ToHumanReadable for Args { fn to_human_readable(&self) -> Self::Target { HumanReadableArgs { ledger_canister_id: self.ledger_canister_id.into(), - payer: self.payer.map(|user_id| user_id.to_string()), + payer: self.payer.map(|user_id| Principal::from(user_id).into()), token_standard: self.token_standard.to_string(), info_url: self.info_url.clone(), how_to_buy_url: self.how_to_buy_url.clone(), diff --git a/frontend/app/src/components/home/MakeProposalModal.svelte b/frontend/app/src/components/home/MakeProposalModal.svelte index 224b97c939..6aaf182a0f 100644 --- a/frontend/app/src/components/home/MakeProposalModal.svelte +++ b/frontend/app/src/components/home/MakeProposalModal.svelte @@ -50,6 +50,7 @@ const MIN_AWARDS = 200; const CHAT_FEE_PER_CHIT_AWARD: bigint = 20_000n; // 1/5000th of a CHAT const ONE_MONTH = 1000 * 60 * 60 * 24 * 7 * 4; + const TOKEN_LISTING_FEE: bigint = 50_000_100_000n; // 500 CHAT + transfer fee const client = getContext("client"); const dispatch = createEventDispatcher(); @@ -103,12 +104,14 @@ $: achievementChatCost = BigInt(chitReward * maxAwards) * CHAT_FEE_PER_CHIT_AWARD + tokenDetails.transferFee; $: insufficientFunds = cryptoBalance < requiredFunds; - $: insufficientFundsForAchievement = + $: insufficientFundsForPayment = cryptoBalance < requiredFunds + - (selectedProposalType === "register_external_acievement" && step == 2 + (selectedProposalType === "register_external_acievement" ? achievementChatCost - : BigInt(0)); + : selectedProposalType === "add_token" + ? TOKEN_LISTING_FEE + : BigInt(0)); $: padding = $mobileWidth ? 16 : 24; // yes this is horrible $: left = step * (actualWidth - padding); $: token = treasury === "SNS" ? symbol : "ICP"; @@ -134,7 +137,7 @@ $: awardingAchievementCanisterId = ""; $: valid = !insufficientFunds && - !insufficientFundsForAchievement && + !insufficientFundsForPayment && titleValid && urlValid && summaryValid && @@ -199,8 +202,19 @@ busy = true; - if (selectedProposalType === "register_external_acievement") { - if (!(await approveExternalAchievementPayment())) { + if ( + selectedProposalType === "register_external_acievement" || + selectedProposalType === "add_token" + ) { + let spender = + selectedProposalType === "add_token" + ? process.env.REGISTRY_CANISTER! + : process.env.USER_INDEX_CANISTER!; + + let amount = + selectedProposalType === "add_token" ? TOKEN_LISTING_FEE : achievementChatCost; + + if (!(await approvePayment(spender, amount))) { busy = false; return; } @@ -250,6 +264,7 @@ functionId: BigInt(7000), payload: createAddTokenPayload( addOrUpdateTokenLedgerCanisterId, + $user.userId, addOrUpdateTokenInfoUrl, addOrUpdateTokenHowToBuyUrl, addOrUpdateTokenTransactionUrlFormat, @@ -292,12 +307,12 @@ } } - async function approveExternalAchievementPayment(): Promise { + async function approvePayment(spender_canister_id: string, amount: bigint): Promise { return client .approveTransfer( - process.env.USER_INDEX_CANISTER!, + spender_canister_id, tokenDetails.ledger, - achievementChatCost, + amount, BigInt(Date.now() + 1000 * 60 * 60 * 24 * 5), // allow 5 days for proposal ) .then((resp) => { @@ -679,13 +694,18 @@ - {#if selectedProposalType === "register_external_acievement" && step === 2} -

+ {#if (selectedProposalType === "register_external_acievement" || selectedProposalType === "add_token") && step === 2} +

+ resourceKey={i18nKey( + "proposal.maker." + selectedProposalType === "add_token" + ? "addTokenChatCost" + : "achievementChatCost", + { + cost: client.formatTokens(achievementChatCost, 8), + chat: "CHAT", + }, + )} />

{/if} {#if fundingMessage !== undefined} diff --git a/frontend/app/src/i18n/cn.json b/frontend/app/src/i18n/cn.json index 0dc3371856..29f568a6d8 100644 --- a/frontend/app/src/i18n/cn.json +++ b/frontend/app/src/i18n/cn.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "集团指数行动", "makeProposal": "提案", "maker": { - "achievementChatCost": "需要支付 {cost} {token} 代币才能提供所请求的 CHIT。成就到期后,所有未使用的 CHAT 都将退还。", + "achievementChatCost": "需要支付 {cost} {chat} 代币才能提供所请求的 CHIT。成就到期后,所有未使用的 CHAT 都将退还。", "achievementExpiry": "到期", "achievementLogo": "成就标志", "achievementName": "成就名称", "achievementUrl": "成就网址", + "addTokenChatCost": "需要支付 {cost} {chat} 个代币才能在 OpenChat 上列出新代币。", "amount": "数量", "amountRules": "至少 1 个 {token} 令牌", "approvalError": "无法批准 CHAT 转移", diff --git a/frontend/app/src/i18n/de.json b/frontend/app/src/i18n/de.json index 4d0210874c..9a4ec77786 100644 --- a/frontend/app/src/i18n/de.json +++ b/frontend/app/src/i18n/de.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Gruppenindexaktionen", "makeProposal": "Machen Sie einen Vorschlag", "maker": { - "achievementChatCost": "Zur Bereitstellung des angeforderten CHIT ist eine Zahlung von {cost} {token}-Tokens erforderlich. Nicht ausgegebene CHATs werden nach Ablauf der Errungenschaft zurückerstattet.", + "achievementChatCost": "Zur Bereitstellung des angeforderten CHIT ist eine Zahlung von {cost} {chat}-Tokens erforderlich. Nicht ausgegebene CHATs werden nach Ablauf der Errungenschaft zurückerstattet.", "achievementExpiry": "Ablauf", "achievementLogo": "Leistungslogo", "achievementName": "Name der Leistung", "achievementUrl": "Erfolgs-URL", + "addTokenChatCost": "Um ein neues Token auf OpenChat aufzulisten, ist eine Zahlung von {cost} {chat}-Token erforderlich.", "amount": "Menge", "amountRules": "mindestens 1 {token}-Token", "approvalError": "Die Genehmigung der CHAT-Übertragung ist fehlgeschlagen", diff --git a/frontend/app/src/i18n/en.json b/frontend/app/src/i18n/en.json index 91a54dba0c..69cf33188b 100644 --- a/frontend/app/src/i18n/en.json +++ b/frontend/app/src/i18n/en.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Group Index Actions", "makeProposal": "Make proposal", "maker": { - "achievementChatCost": "A payment of {cost} {token} tokens is required to provision the requested CHIT. Any unspent CHAT will be refunded when the achievement expires.", + "achievementChatCost": "A payment of {cost} {chat} tokens is required to provision the requested CHIT. Any unspent CHAT will be refunded when the achievement expires.", "achievementExpiry": "Expiry", "achievementLogo": "Achievement Logo", "achievementName": "Achievement name", "achievementUrl": "Achievement URL", + "addTokenChatCost": "A payment of {cost} {chat} tokens is required to list a new token on OpenChat.", "amount": "Amount", "amountRules": "at least 1 {token} token", "approvalError": "Failed to approve the CHAT transfer", diff --git a/frontend/app/src/i18n/es.json b/frontend/app/src/i18n/es.json index 46a0ccc9f8..848512972a 100644 --- a/frontend/app/src/i18n/es.json +++ b/frontend/app/src/i18n/es.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Acciones de índice de grupo", "makeProposal": "hacer propuesta", "maker": { - "achievementChatCost": "Se requiere un pago de tokens {cost} {token} para obtener el CHIT solicitado. Cualquier CHAT no utilizado se reembolsará cuando caduque el logro.", + "achievementChatCost": "Se requiere un pago de tokens {cost} {chat} para obtener el CHIT solicitado. Cualquier CHAT no utilizado se reembolsará cuando caduque el logro.", "achievementExpiry": "Expiración", "achievementLogo": "Logotipo de logros", "achievementName": "Nombre del logro", "achievementUrl": "URL del logro", + "addTokenChatCost": "Se requiere un pago de tokens {cost} {chat} para incluir un nuevo token en OpenChat.", "amount": "Cantidad", "amountRules": "al menos 1 token {token}", "approvalError": "No se pudo aprobar la transferencia de CHAT", diff --git a/frontend/app/src/i18n/fa.json b/frontend/app/src/i18n/fa.json index 3255375faa..421501222c 100644 --- a/frontend/app/src/i18n/fa.json +++ b/frontend/app/src/i18n/fa.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "اقدامات فهرست گروهی", "makeProposal": "پیشنهاد بدهید", "maker": { - "achievementChatCost": "برای ارائه CHIT درخواستی، پرداخت {cost} {token} توکن مورد نیاز است. هر چت خرج نشده پس از انقضای جایزه بازپرداخت خواهد شد.", + "achievementChatCost": "برای ارائه CHIT درخواستی، پرداخت {cost} {chat} توکن مورد نیاز است. هر چت خرج نشده پس از منقضی شدن جایزه بازپرداخت می شود.", "achievementExpiry": "انقضا", "achievementLogo": "لوگوی دستاورد", "achievementName": "نام دستاورد", "achievementUrl": "URL دستاورد", + "addTokenChatCost": "برای فهرست کردن یک نشانه جدید در OpenChat، پرداخت {cost} {chat} توکن لازم است.", "amount": "میزان", "amountRules": "حداقل 1 نشانه {token}", "approvalError": "تایید انتقال CHAT انجام نشد", diff --git a/frontend/app/src/i18n/fr.json b/frontend/app/src/i18n/fr.json index 25be1f2307..2232efbb6f 100644 --- a/frontend/app/src/i18n/fr.json +++ b/frontend/app/src/i18n/fr.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Actions d'index de groupe", "makeProposal": "Faire une proposition", "maker": { - "achievementChatCost": "Un paiement de {cost} {token} jetons est requis pour provisionner le CHIT demandé. Tout CHAT non dépensé sera remboursé à l'expiration de la réussite.", + "achievementChatCost": "Un paiement de {cost} {chat} jetons est requis pour provisionner le CHIT demandé. Tout CHAT non dépensé sera remboursé à l'expiration de la réussite.", "achievementExpiry": "Expiration", "achievementLogo": "Logo de réussite", "achievementName": "Nom de la réalisation", "achievementUrl": "URL de réussite", + "addTokenChatCost": "Un paiement de {cost} {chat} jetons est requis pour répertorier un nouveau jeton sur OpenChat.", "amount": "Montant", "amountRules": "au moins 1 jeton {token}", "approvalError": "Impossible d'approuver le transfert CHAT", diff --git a/frontend/app/src/i18n/hi.json b/frontend/app/src/i18n/hi.json index 71385be822..551b17799b 100644 --- a/frontend/app/src/i18n/hi.json +++ b/frontend/app/src/i18n/hi.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "समूह सूचकांक क्रियाएँ", "makeProposal": "प्रस्ताव बनाएं", "maker": { - "achievementChatCost": "अनुरोधित CHIT का प्रावधान करने के लिए {cost} {token} टोकन का भुगतान आवश्यक है। उपलब्धि समाप्त होने पर कोई भी अप्रयुक्त CHAT वापस कर दी जाएगी।", + "achievementChatCost": "अनुरोधित CHIT का प्रावधान करने के लिए {cost} {chat} टोकन का भुगतान आवश्यक है। उपलब्धि समाप्त होने पर कोई भी अप्रयुक्त CHAT वापस कर दी जाएगी।", "achievementExpiry": "समाप्ति", "achievementLogo": "उपलब्धि लोगो", "achievementName": "उपलब्धि का नाम", "achievementUrl": "उपलब्धि यूआरएल", + "addTokenChatCost": "ओपनचैट पर नया टोकन सूचीबद्ध करने के लिए {cost} {chat} टोकन का भुगतान आवश्यक है।", "amount": "मात्रा", "amountRules": "कम से कम 1 {token} टोकन", "approvalError": "CHAT स्थानांतरण स्वीकृत करने में विफल", diff --git a/frontend/app/src/i18n/it.json b/frontend/app/src/i18n/it.json index fb651130cc..51e40b012c 100644 --- a/frontend/app/src/i18n/it.json +++ b/frontend/app/src/i18n/it.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Azioni indice di gruppo", "makeProposal": "Fai una proposta", "maker": { - "achievementChatCost": "È richiesto un pagamento di {cost} {token} token per fornire il CHIT richiesto. Qualsiasi CHAT non speso verrà rimborsato alla scadenza dell'obiettivo.", + "achievementChatCost": "È richiesto un pagamento di {cost} {chat} token per fornire il CHIT richiesto. Qualsiasi CHAT non speso verrà rimborsato alla scadenza dell'obiettivo.", "achievementExpiry": "Scadenza", "achievementLogo": "Logo del risultato", "achievementName": "Nome del risultato", "achievementUrl": "URL del risultato", + "addTokenChatCost": "Per elencare un nuovo token su OpenChat è richiesto il pagamento di {cost} {chat} token.", "amount": "Quantità", "amountRules": "almeno 1 token {token}", "approvalError": "Impossibile approvare il trasferimento CHAT", diff --git a/frontend/app/src/i18n/iw.json b/frontend/app/src/i18n/iw.json index b46820dfa0..e776ff4222 100644 --- a/frontend/app/src/i18n/iw.json +++ b/frontend/app/src/i18n/iw.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "פעולות אינדקס קבוצתיות", "makeProposal": "תציע הצעה", "maker": { - "achievementChatCost": "נדרש תשלום של {cost} {token} אסימונים כדי לספק את ה-CHIT המבוקש. כל צ'אט שלא הוצא יוחזר כאשר ההישג יפוג.", + "achievementChatCost": "נדרש תשלום של {cost} {chat} אסימונים כדי לספק את ה-CHIT המבוקש. כל CHAT שלא הוצא יוחזר כאשר יפוג ההישג.", "achievementExpiry": "תְפוּגָה", "achievementLogo": "לוגו הישג", "achievementName": "שם הישג", "achievementUrl": "כתובת אתר של הישג", + "addTokenChatCost": "נדרש תשלום של {cost} {chat} אסימונים כדי לרשום אסימון חדש ב-OpenChat.", "amount": "כמות", "amountRules": "לפחות אסימון {token} אחד", "approvalError": "אישור העברת ה-CHAT נכשל", diff --git a/frontend/app/src/i18n/jp.json b/frontend/app/src/i18n/jp.json index 96c48ba174..8b2a3554f6 100644 --- a/frontend/app/src/i18n/jp.json +++ b/frontend/app/src/i18n/jp.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "グループ インデックス アクション", "makeProposal": "提案する", "maker": { - "achievementChatCost": "要求された CHIT をプロビジョニングするには、{cost} {token} トークンの支払いが必要です。未使用の CHAT は、実績の有効期限が切れると返金されます。", + "achievementChatCost": "要求された CHIT をプロビジョニングするには、{cost} {chat} トークンの支払いが必要です。未使用の CHAT は、実績の有効期限が切れると返金されます。", "achievementExpiry": "有効期限", "achievementLogo": "達成ロゴ", "achievementName": "実績名", "achievementUrl": "実績URL", + "addTokenChatCost": "OpenChatに新しいトークンを掲載するには、{cost} {chat}トークンの支払いが必要です。", "amount": "額", "amountRules": "少なくとも 1 つの {token} トークン", "approvalError": "CHAT 転送の承認に失敗しました", diff --git a/frontend/app/src/i18n/pl.json b/frontend/app/src/i18n/pl.json index 6aac14f711..1edcf07c92 100644 --- a/frontend/app/src/i18n/pl.json +++ b/frontend/app/src/i18n/pl.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Akcje indeksu grupowego", "makeProposal": "Złóż propozycję", "maker": { - "achievementChatCost": "Wymagana jest płatność {cost} {token} tokenów, aby zapewnić żądany CHIT. Wszelkie niewydane CHAT zostaną zwrócone po wygaśnięciu osiągnięcia.", + "achievementChatCost": "Wymagana jest płatność {cost} {chat} tokenów, aby zapewnić żądany CHIT. Wszelkie niewydane CHAT zostaną zwrócone po wygaśnięciu osiągnięcia.", "achievementExpiry": "Wygaśnięcie", "achievementLogo": "Logo osiągnięć", "achievementName": "Nazwa osiągnięcia", "achievementUrl": "Adres URL osiągnięcia", + "addTokenChatCost": "Aby dodać nowy token na OpenChat, wymagana jest zapłata {cost} {chat} tokenów.", "amount": "Kwota", "amountRules": "co najmniej 1 token {token}", "approvalError": "Nie udało się zatwierdzić transferu CHAT", diff --git a/frontend/app/src/i18n/ru.json b/frontend/app/src/i18n/ru.json index dd720d1c50..84f5dd3bcb 100644 --- a/frontend/app/src/i18n/ru.json +++ b/frontend/app/src/i18n/ru.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Действия группового индекса", "makeProposal": "Сделать предложение", "maker": { - "achievementChatCost": "Для предоставления запрошенного CHIT требуется оплата {cost} {token} токенов. Любой неизрасходованный CHAT будет возвращен, когда достижение истечет.", + "achievementChatCost": "Для предоставления запрошенного CHIT требуется оплата {cost} {chat} токенов. Любой неизрасходованный CHAT будет возвращен, когда достижение истечет.", "achievementExpiry": "Истечение срока действия", "achievementLogo": "Логотип достижения", "achievementName": "Название достижения", "achievementUrl": "URL-адрес достижения", + "addTokenChatCost": "Для добавления нового токена на OpenChat требуется оплата токенов {cost} {chat}.", "amount": "Количество", "amountRules": "хотя бы 1 токен {token}", "approvalError": "Не удалось одобрить передачу ЧАТ", diff --git a/frontend/app/src/i18n/uk.json b/frontend/app/src/i18n/uk.json index a84d658def..92c24dd6bd 100644 --- a/frontend/app/src/i18n/uk.json +++ b/frontend/app/src/i18n/uk.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Дії групового індексу", "makeProposal": "Зробіть пропозицію", "maker": { - "achievementChatCost": "Для надання запитуваного CHIT потрібен платіж у розмірі {cost} {token} токенів. Будь-який невитрачений ЧАТ буде відшкодовано, коли закінчиться термін дії досягнення.", + "achievementChatCost": "Для надання запитуваного CHIT потрібен платіж у розмірі {cost} {chat} токенів. Будь-який невитрачений ЧАТ буде відшкодовано, коли закінчиться термін дії досягнення.", "achievementExpiry": "Термін дії", "achievementLogo": "Логотип досягнення", "achievementName": "Назва досягнення", "achievementUrl": "URL-адреса досягнення", + "addTokenChatCost": "Для розміщення нового маркера в OpenChat потрібен платіж у розмірі {cost} {chat} токенів.", "amount": "Сума", "amountRules": "принаймні 1 маркер {token}", "approvalError": "Не вдалося схвалити передачу CHAT", diff --git a/frontend/app/src/i18n/vi.json b/frontend/app/src/i18n/vi.json index bab59c20a8..94d58e040f 100644 --- a/frontend/app/src/i18n/vi.json +++ b/frontend/app/src/i18n/vi.json @@ -1094,11 +1094,12 @@ "groupIndexAction": "Hành động chỉ mục nhóm", "makeProposal": "Đưa ra đề xuất", "maker": { - "achievementChatCost": "Cần phải thanh toán {cost} {token} token để cung cấp CHIT theo yêu cầu. Bất kỳ CHAT nào chưa sử dụng sẽ được hoàn lại khi thành tích hết hạn.", + "achievementChatCost": "Cần phải thanh toán {cost} {chat} token để cung cấp CHIT theo yêu cầu. Bất kỳ CHAT nào chưa sử dụng sẽ được hoàn lại khi thành tích hết hạn.", "achievementExpiry": "Hết hạn", "achievementLogo": "Logo thành tích", "achievementName": "Tên thành tích", "achievementUrl": "URL thành tích", + "addTokenChatCost": "Cần phải thanh toán {cost} {chat} token để niêm yết một token mới trên OpenChat.", "amount": "Số lượng", "amountRules": "ít nhất 1 mã thông báo {token}", "approvalError": "Không thể chấp thuận chuyển CHAT", diff --git a/frontend/app/src/utils/sns.ts b/frontend/app/src/utils/sns.ts index c188171c51..19cfb3c460 100644 --- a/frontend/app/src/utils/sns.ts +++ b/frontend/app/src/utils/sns.ts @@ -5,6 +5,7 @@ export const OC_GOVERNANCE_CANISTER_ID = "2jvtu-yqaaa-aaaaq-aaama-cai"; export function createAddTokenPayload( ledgerCanisterId: string, + userId: string, infoUrl: string, howToBuyUrl: string, transactionUrlFormat: string, @@ -17,6 +18,7 @@ export function createAddTokenPayload( how_to_buy_url: IDL.Text, info_url: IDL.Text, logo: IDL.Opt(IDL.Text), + payer: IDL.Opt(IDL.Principal), token_standard: IDL.Variant({ icrc1: IDL.Null }), ledger_canister_id: IDL.Principal, transaction_url_format: IDL.Text, @@ -27,6 +29,7 @@ export function createAddTokenPayload( how_to_buy_url: howToBuyUrl, info_url: infoUrl, logo: optionalStringToCandid(logo), + payer: [Principal.fromText(userId)], token_standard: { icrc1: null }, ledger_canister_id: Principal.fromText(ledgerCanisterId), transaction_url_format: transactionUrlFormat, diff --git a/tsBindings/registry/RegistryPayment.ts b/tsBindings/registry/RegistryPayment.ts new file mode 100644 index 0000000000..15a1530b74 --- /dev/null +++ b/tsBindings/registry/RegistryPayment.ts @@ -0,0 +1,4 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { UserId } from "../shared/UserId"; + +export type RegistryPayment = { amount: bigint, block_index: bigint, timestamp: bigint, user_id: UserId, }; diff --git a/tsBindings/registry/RegistryTokenDetails.ts b/tsBindings/registry/RegistryTokenDetails.ts index aa529d6d4e..c5f6c50ad7 100644 --- a/tsBindings/registry/RegistryTokenDetails.ts +++ b/tsBindings/registry/RegistryTokenDetails.ts @@ -1,4 +1,5 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { RegistryPayment } from "./RegistryPayment"; import type { TSBytes } from "../shared/TSBytes"; -export type RegistryTokenDetails = { ledger_canister_id: TSBytes, name: string, symbol: string, decimals: number, fee: bigint, logo: string, logo_id?: bigint | undefined, info_url: string, how_to_buy_url: string, transaction_url_format: string, supported_standards: Array, added: bigint, enabled: boolean, last_updated: bigint, }; +export type RegistryTokenDetails = { ledger_canister_id: TSBytes, name: string, symbol: string, decimals: number, fee: bigint, logo: string, logo_id?: bigint | undefined, info_url: string, how_to_buy_url: string, transaction_url_format: string, supported_standards: Array, added: bigint, enabled: boolean, last_updated: bigint, payments: Array, };