From 0912138b41865308ae82ec7c3d4ca1128bb01bfd Mon Sep 17 00:00:00 2001
From: arnaud kaderi <arnay07@gmail.com>
Date: Wed, 3 Apr 2024 01:12:37 +0200
Subject: [PATCH] refactor code

---
 README.md           | 2 +-
 deploy/deploy.ts    | 4 +---
 src/contract.jsligo | 4 ++--
 src/type.jsligo     | 2 +-
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 472dc8a..3b22657 100644
--- a/README.md
+++ b/README.md
@@ -13,4 +13,4 @@ Pour compiler le projet: `make compile`
 
 Pour le déployer: `make deploy`
 
-Lien de déploiement du smart contract:`KT18ohWSbRJsE9hKWzFCfPbskDa3ipjJfoih`
+Lien de déploiement du smart contract:`KT1T2uYvmNmWv69ZmnVLM749LoYFt1AgqzF1`
diff --git a/deploy/deploy.ts b/deploy/deploy.ts
index 66d994f..e9a135d 100644
--- a/deploy/deploy.ts
+++ b/deploy/deploy.ts
@@ -1,11 +1,9 @@
 import { InMemorySigner } from "@taquito/signer";
-import { MichelsonMap, TezosToolkit } from "@taquito/taquito";
-import { buf2hex } from "@taquito/utils";
+import { TezosToolkit } from "@taquito/taquito";
 import chalk from "chalk";
 import { Spinner } from "cli-spinner";
 import dotenv from "dotenv";
 import multisig from "../compiled/Multisig.json";
-import metadata from "./metadata.json";
 
 dotenv.config();
 
diff --git a/src/contract.jsligo b/src/contract.jsligo
index cd06c12..e70bc2c 100644
--- a/src/contract.jsligo
+++ b/src/contract.jsligo
@@ -27,7 +27,7 @@ namespace Preamble {
 };
 
 // ===============================================================================================
-export type result = [list<operation>, Storage.Utils.storage];
+export type result = Storage.Utils.result;
 
 @entry
 export const create_proposal = (
@@ -42,7 +42,7 @@ export const create_proposal = (
     }
     const transfer: Types.transfer =
         list([{ from_: Tezos.get_sender(), txs: list([buyer_trans]) }]);
-    const tokenOperation = FA2.send(transfer, storage.token_address); 
+    const tokenOperation = FA2.send(transfer, storage.token_address);
     const final_storage = Storage.Utils.register_proposal(proposal, storage);
     return [list([tokenOperation]), final_storage];
 };
diff --git a/src/type.jsligo b/src/type.jsligo
index 4cf7e8a..2d9fb6e 100644
--- a/src/type.jsligo
+++ b/src/type.jsligo
@@ -22,7 +22,7 @@ export type dao = {
 
 export type atomic_trans =
   @layout("comb")
-  { amount: nat; token_id: nat, to_: address; }
+  { to_: address; token_id: nat; amount: nat; }
 
 export type transfer_from = { from_: address; txs: list<atomic_trans> };
 
-- 
GitLab