Skip to content

Commit

Permalink
[#131] Add back some FA1.2 metadata
Browse files Browse the repository at this point in the history
Adds back some FA1.2 metadata that was previously disable due to storage
constraints. We can add it back since we are storing metadata in
external contract.
  • Loading branch information
sras committed Dec 25, 2020
1 parent ef7f88a commit 093e8f4
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions haskell/src/Lorentz/Contracts/StablecoinFA1_2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module Lorentz.Contracts.StablecoinFA1_2
import Data.FileEmbed (embedStringFile)
import Fmt (pretty)

import Data.Version (showVersion)
import Lorentz as L
import qualified Lorentz.Contracts.Spec.ApprovableLedgerInterface as AL
import Lorentz.Contracts.Spec.TZIP16Interface
Expand All @@ -26,6 +27,7 @@ import Morley.Metadata (mkMichelsonStorageView)
import qualified Lorentz.Contracts.Spec.TZIP16Interface as TZ
import qualified Lorentz.Contracts.Stablecoin as S
import Lorentz.Contracts.StablecoinPath (stablecoinFA1_2Path)
import Paths_stablecoin (version)

data Storage = Storage
{ sDefaultExpiry :: S.Expiry
Expand Down Expand Up @@ -107,22 +109,11 @@ metadataJSON =
[ getDefaultExpiryView
, getCounterView
] <>
-- NOTE: Because we're storing the metadata in the contract's storage,
-- the storage may now exceed the storage size limit.
-- See: https://buildkite.com/serokell/stablecoin/builds/1150#eb990412-157b-4a96-92d8-3fd39d954369/65-261
--
-- As a temporary measure, we're removing the "homepage" and "source"
-- info to make the storage a little bit smaller, just enough to make it
-- possible to originate the contract.
--
-- TODO: once we move the metadata to its own contract, we can
-- add this info back to the metadata.
TZ.source (TZ.Source "" []) <>
TZ.homepage ""
-- , mSource = Just Source
-- { sLocation = "https://github.com/tqtezos/stablecoin/tree/v" <> toText (showVersion version) <> "/ligo/stablecoin/fa1.2"
-- , sTools = [ "ligo " ]
-- }
TZ.source
(TZ.Source
("https://github.com/tqtezos/stablecoin/tree/v" <> toText (showVersion version) <> "/ligo/stablecoin/fa1.2")
[ "ligo " ]) <>
TZ.homepage "https://github.com/tqtezos/stablecoin/"

getDefaultExpiryView :: TZ.View (ToT Storage)
getDefaultExpiryView =
Expand Down

0 comments on commit 093e8f4

Please sign in to comment.