From 49055cf5d470b9c5a4e1d814a906507261dcd9a1 Mon Sep 17 00:00:00 2001 From: Fabio Kenji Date: Wed, 28 Aug 2024 18:48:38 -0400 Subject: [PATCH] fix var / entitlements --- lib/go/templates/internal/assets/assets.go | 6 +++--- transactions/marketV3/create_start_sale.cdc | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/go/templates/internal/assets/assets.go b/lib/go/templates/internal/assets/assets.go index 5f7be48..af6179d 100644 --- a/lib/go/templates/internal/assets/assets.go +++ b/lib/go/templates/internal/assets/assets.go @@ -53,7 +53,7 @@ // ../../../transactions/marketV3/change_price.cdc (799B) // ../../../transactions/marketV3/change_receiver.cdc (477B) // ../../../transactions/marketV3/create_sale.cdc (1.85kB) -// ../../../transactions/marketV3/create_start_sale.cdc (2.936kB) +// ../../../transactions/marketV3/create_start_sale.cdc (3.418kB) // ../../../transactions/marketV3/mint_and_purchase.cdc (1.396kB) // ../../../transactions/marketV3/purchase_both_markets.cdc (2.368kB) // ../../../transactions/marketV3/purchase_group_of_moments.cdc (4.519kB) @@ -1247,7 +1247,7 @@ func TransactionsMarketv3Create_saleCdc() (*asset, error) { return a, nil } -var _TransactionsMarketv3Create_start_saleCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\x5b\x6f\xe2\x38\x14\x7e\xe7\x57\x9c\x99\x87\x2a\x91\x98\x64\xab\xae\xf6\x21\xa2\x53\x75\xdb\xb2\x5b\xcd\xf6\xa2\x42\xbb\xcf\xc6\x1c\x88\xd5\x60\x47\xce\x09\x14\x8d\xf8\xef\xab\x38\x17\x62\x27\x2c\x23\x15\x5e\x4a\xcd\xe7\x73\xfb\x3e\x9f\x73\xc4\x2a\x55\x9a\x60\x9c\xcb\xa5\x98\x25\x38\x55\xef\x28\x61\xa1\xd5\x0a\x7e\xfb\x18\xbf\x3e\xfe\x75\xff\xe7\x3f\x77\xd3\xa7\x1f\x77\x8f\xd7\xb7\xb7\x2f\x77\x93\xc9\xa0\xba\x30\x55\xe9\x24\x56\xf4\xc0\xf4\x3b\xd2\xdb\x45\x7d\xe5\xe1\xfa\xe5\xc7\xdd\xf4\xed\xa2\x1f\x5d\xa3\xa6\x4f\xcf\x93\xbf\x9f\xa6\x0e\xa8\xb4\x65\x5b\x72\x20\x8f\x4a\xf6\x46\xfa\x38\x6e\x90\x03\xd2\x4c\x66\x8c\x93\x50\xd2\xa3\x02\xf4\x82\x1c\xc5\x1a\xf5\x33\xa3\x38\x82\xe7\x7c\x96\x08\x5e\x7c\x1f\xc2\x0c\x25\x2e\x04\x17\x4c\x6f\xaf\x39\x57\xb9\xa4\x08\xae\xe7\x73\x8d\x59\x36\x04\x9e\xd3\x33\x6a\x8e\x92\xd8\x12\x23\x78\x1d\x8b\x8f\x3f\x7e\x1f\xc2\x4a\xad\x50\xd2\xfd\x6d\x04\xaf\xf7\x92\x8a\x93\x54\x0b\xde\x00\x7c\xf8\x39\x18\x00\x00\xa4\x1a\x53\xa6\xd1\x63\x9c\x53\x04\x2c\xa7\xd8\x9b\x90\xd2\x6c\x89\x43\xb8\x61\x29\x9b\x89\x44\x90\xc0\xcc\x87\xb3\xca\x77\x71\x15\xaa\x4f\x18\x02\x8f\x91\xbf\x03\x29\xc8\x10\x41\x2c\x80\xc1\xfa\x02\x32\x96\x20\x70\x95\x24\x68\x12\x04\x96\x68\x64\xf3\x2d\xe0\x87\xc8\x28\x6b\xae\x17\x70\xce\x29\xc8\x4a\x8f\xc1\x4c\x69\xad\x36\xa3\x33\x87\xb5\x60\xc2\x12\xbc\x69\xac\x7d\xf7\x8a\x72\x46\x2e\xb7\xc1\xca\x7c\xa9\xa2\x2f\x2a\xe7\xc3\xe5\x25\x48\x91\xb4\x02\xae\x82\x5e\x22\x01\xc5\x08\x8b\x8a\x25\x30\x0c\x00\x6f\x25\x0c\x0b\xa5\x0d\x46\x6d\x24\x6a\x60\x72\xde\xe6\xc1\x32\x98\x20\x95\xa8\xa6\x60\x5b\xb8\x2c\x33\x6b\x5b\x0c\x96\x48\xa3\xb3\x9f\x96\x32\x82\x9a\xf5\xdd\xf7\xae\x0a\xfc\x2f\x1d\x37\xad\x10\x2c\x67\x4b\xa4\x8a\x1e\xaf\xab\x16\xff\xd3\x61\x1c\x48\x77\x4f\x70\x5f\xba\x35\xab\x22\xcb\x72\x1c\x19\x69\xb9\x0f\x23\xf8\x57\x50\x3c\xd7\x6c\xe3\x43\x4d\x7a\xd0\x26\x3a\xac\x6c\x84\x0f\x46\xce\xfb\x9f\xfc\x41\x1f\xa5\x6c\xcf\xe0\xb6\xe1\x6f\x7d\xde\x52\xa2\x75\x6b\xcd\x34\xac\xcf\x6d\x71\x45\x7b\xd5\x6f\x8f\xc7\x5c\x6a\xcf\xd5\xe7\x15\x18\xd9\x59\xbe\x0e\x49\xbd\xdf\x42\xa5\xf0\x26\x7d\x52\x69\x16\x2b\xb2\x51\x3e\x7c\xe9\x93\xb7\xc9\xcc\xc9\xea\x14\xfc\x1c\x88\xf4\x48\x8c\x56\x68\xbb\x0e\x6b\x5c\x23\x23\x04\x06\x12\x37\x6e\xd7\xe8\x88\xae\xd7\x03\x8c\xbe\x75\x3a\x41\x69\xd5\xc6\x79\x8e\x64\x23\x57\xc3\xc3\x4e\x15\x3f\xf5\x71\x1a\x42\xe4\x1e\x9c\xd8\x5d\x6f\x63\x88\xfa\x8f\x4f\xec\xda\x99\x40\xd6\xbf\x27\x76\x55\xb6\xf8\xb7\xf3\x76\x8a\xae\xd6\x6d\xc9\xb9\x82\xcb\xd8\x1a\x41\x90\x19\x58\xa5\x70\x2d\x84\xf5\x46\x0b\xac\x37\xfa\xd6\x2b\xbb\x21\x90\xfa\x95\x11\x34\x38\x14\x48\xa3\xfc\xd4\x4c\x7a\x48\x84\x34\x63\xb4\x68\x59\xff\xf3\x10\xba\xcf\xd8\xdc\xcf\x62\xaf\x53\xe9\x63\x2f\xfe\xe8\x98\x3d\x9e\x5d\x97\x5e\x46\x87\xaa\xb2\xdf\x68\xac\x4b\xfb\x0a\xb5\xba\x43\x18\x42\xd9\x20\x81\x81\xc6\x05\x6a\x94\x1c\xdb\xd5\x69\x90\x87\xfb\xc2\x65\x6f\xc3\x35\x6d\xce\x0d\xf0\xc6\x70\xb1\x9f\x41\x9f\x5e\x3c\xac\x0c\xaf\xae\x20\x65\x52\x70\xef\xeb\x8d\xca\x93\x39\x48\x45\x75\x76\x66\x2f\x34\x6c\x0b\x59\xeb\xf1\x6b\x8f\x66\xc2\x10\xd2\xbc\x5c\x59\xca\xc5\x0e\xf2\xd4\x0c\x38\xab\x16\xbd\x75\x08\x12\x91\xd1\x58\xe9\xe2\xb4\x9c\xed\xc5\x52\x58\xaf\x87\xcd\x5a\x68\xfe\x38\x9e\x77\x83\xdd\x7f\x01\x00\x00\xff\xff\xa2\xa6\x36\xd8\x78\x0b\x00\x00" +var _TransactionsMarketv3Create_start_saleCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x57\xdf\x6f\xe2\x38\x10\x7e\xe7\xaf\x98\xdb\x87\x2a\x48\x6c\xb8\xaa\xa7\x7b\x88\x60\x57\x3d\x5a\xee\xaa\xbd\xfe\x50\xa1\xbd\x67\x63\x06\xb0\x1a\xec\xc8\x99\xd0\xa2\x55\xff\xf7\x53\x9c\x9f\xb6\x43\xdb\x55\xc9\x0b\x89\x35\xf6\xcc\x37\xf3\xcd\xf8\x43\x6c\x13\xa5\x09\xa6\x99\x5c\x8b\x45\x8c\x73\xf5\x84\x12\x56\x5a\x6d\xe1\xf7\x97\xe9\xc3\xcd\xdf\x57\x7f\xfd\x7b\x39\xbf\xfd\x71\x79\x73\x7e\x71\x71\x7f\x39\x9b\xf5\xca\x0d\x73\x95\xcc\x36\x8a\xae\x99\x7e\x42\x7a\x3c\xab\xb6\x5c\x9f\xdf\xff\xb8\x9c\x3f\x9e\x75\x5b\x57\x56\xf3\xdb\xbb\xd9\x3f\xb7\x73\xc7\xa8\x38\xcb\x3e\xc9\x31\xb9\x51\xb2\x33\xd2\x9b\x69\x6d\xd9\x23\xcd\x64\xca\x38\x09\x25\x03\xca\x8d\xee\x91\xa3\xd8\xa1\xbe\x63\xb4\x89\xe0\x2e\x5b\xc4\x82\xe7\xef\x03\x58\xa0\xc4\x95\xe0\x82\xe9\xfd\x39\xe7\x2a\x93\x14\xc1\xf9\x72\xa9\x31\x4d\x07\xc0\x33\xba\x43\xcd\x51\x12\x5b\x63\x04\x0f\x53\xf1\xf2\xe7\x1f\x03\xd8\xaa\x2d\x4a\xba\xba\x88\xe0\xe1\x4a\x52\xbe\x92\x68\xc1\x6b\x83\x3e\xfc\xec\xf5\x00\x00\x12\x8d\x09\xd3\x18\x30\xce\x29\x02\x96\xd1\x26\x98\x91\xd2\x6c\x8d\x03\x98\xb0\x84\x2d\x44\x2c\x48\x60\xda\x87\x93\xd2\x77\xbe\x15\xca\x67\x38\x04\xbe\x41\xfe\x04\xa4\x20\x45\x04\xb1\x02\x06\xbb\x33\x48\x59\x8c\xc0\x55\x1c\xa3\x01\x08\x2c\xd6\xc8\x96\x7b\xc0\x17\x91\x52\x5a\x6f\xcf\xcd\x39\xa7\x30\x2d\x3c\x86\x0b\xa5\xb5\x7a\x1e\x9d\x38\x55\x0b\x67\x2c\xc6\x49\x7d\xda\xb7\x20\x4f\x67\xe4\xd6\x36\xdc\x9a\x97\x32\xfa\x3c\x73\x7d\x18\x8f\x41\x8a\xb8\x15\x70\x19\xf4\x1a\x09\x68\x83\xb0\x2a\xab\x04\xa6\x02\xc0\x5b\x80\x61\xa5\xb4\xb1\x51\xcf\x12\x35\x30\xb9\x6c\xd7\xc1\x3a\x30\x46\x2a\xac\xea\x84\xed\x61\x5c\x20\x6b\x9f\x18\xae\x91\x46\x27\x3f\x2d\x66\x84\x55\xd5\x5f\xbf\xf9\x2c\xe8\xff\xe6\xb9\x69\x85\x60\x39\x5b\x23\x95\xe5\x09\x7c\xb6\xf4\x3f\x1d\x86\x15\xc7\x8e\xe9\x12\x6e\x53\xe0\xb1\x5d\x48\xae\x92\xfd\xa8\x09\x70\x64\x78\xe5\x76\x45\xf8\x9f\xa0\xcd\x52\xb3\xe7\x81\xd7\x30\xe1\x43\xb2\x64\x84\x7d\xa8\xa8\x10\xb6\xca\x5f\xd5\x7f\x58\x7a\x1b\x5e\x1b\xae\x37\x16\x13\x96\xf4\xad\x88\xc5\xca\x0f\xb8\x8b\x19\xf9\x73\x00\x99\x95\xc1\x0a\xa6\x48\xd3\x0c\x8f\x0b\x2e\x38\x88\xaa\xef\x85\x6a\xa5\x3c\x65\x3b\x0c\x9c\xe0\x07\x40\xea\x57\xf2\xf4\xda\xeb\x6a\x14\xd6\xf4\xc5\xbe\xee\x8a\xdd\x69\xab\xbf\x3d\x7a\xec\x4e\xed\x96\xfd\x10\x3f\x8a\x46\x0e\x27\x1a\x19\x61\x47\xda\x9a\x8c\x96\x96\x75\x1e\xcb\x6f\x67\x4c\x78\x3c\x21\x95\xa4\x1b\x45\xb6\x59\x17\x59\xfc\xf0\x0f\xb1\xe5\x10\xd0\xf7\xe8\x72\x6c\xac\xc1\xdb\x20\x3f\xc2\x1d\x17\x8a\x43\x9e\x8f\x25\xcf\x67\x10\x37\x10\x81\x81\xc4\x67\xf7\x5e\xf0\xc6\x5b\xa7\x13\x18\x7d\xf5\x66\x7d\x71\xaa\x6d\xe7\xb2\x3f\x72\x7b\x79\xe0\x65\xe1\x53\x8f\x33\xf2\x23\x77\xe1\xc8\xee\x3a\x47\x7f\xd4\xbd\x7c\x64\xd7\x8e\xc6\xb0\x3e\x8f\xec\xaa\xb8\xc4\x1f\x4f\xdb\x10\x5d\x66\xda\x94\x73\x09\x97\x93\x19\x04\x19\x49\x52\x70\xd7\xb2\xf0\x89\x3f\xfa\xda\x49\xbb\x82\xff\xef\x8b\x8c\xde\xa1\x40\x6a\xe6\x27\x46\xcb\x41\x2c\xa4\x11\x4a\xf9\xf8\x7c\xa3\x11\xfc\xf9\x61\xf6\xa7\x9b\xa0\xbb\x89\xdf\x18\x35\xef\x0a\xa9\xf7\xd1\xf9\xe5\x65\x74\x28\x2b\x8d\x66\xb5\x36\x35\x19\x6a\x4d\x87\xe1\x10\x0a\xb5\x07\x0c\x34\xae\x50\xa3\xe4\xd8\xce\x4e\x6d\x79\x78\x2e\x8c\x3b\xd5\xa3\x99\xaf\x6e\x80\xc5\xa0\x6d\xae\xdc\x4f\x4b\x4b\x0b\xe1\xf7\xef\x90\x30\x29\x78\xf0\x65\xa2\xb2\x78\x09\x52\x51\x85\xce\x28\x7f\x53\x6d\x21\x2b\x3e\x7e\xe9\xe0\xcc\x70\x08\x49\x56\x88\xd2\x42\xba\x43\x96\x98\xcb\xd6\xca\x45\x67\x1e\xc2\x58\xa4\x34\x55\x3a\x5f\x2d\xd4\x5b\x2e\xfb\xab\x3f\x00\xb5\xf0\x37\x3f\x8e\xe7\xd7\xde\xeb\xff\x01\x00\x00\xff\xff\xb6\xae\xd4\x20\x5a\x0d\x00\x00" func TransactionsMarketv3Create_start_saleCdcBytes() ([]byte, error) { return bindataRead( @@ -1263,7 +1263,7 @@ func TransactionsMarketv3Create_start_saleCdc() (*asset, error) { } info := bindataFileInfo{name: "../../../transactions/marketV3/create_start_sale.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xeb, 0x27, 0xb0, 0xdf, 0xfe, 0xb0, 0xd, 0x9b, 0x98, 0x22, 0x34, 0xf8, 0xdd, 0x83, 0x5a, 0xa, 0x4, 0x1d, 0x5c, 0x4, 0x16, 0x77, 0xcb, 0x38, 0xa9, 0x27, 0x2a, 0xad, 0x63, 0xee, 0xa5, 0x27}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xca, 0xb5, 0xd3, 0x63, 0xe8, 0x76, 0x1, 0x43, 0xb1, 0x0, 0x93, 0x16, 0x7e, 0x35, 0xfc, 0x74, 0xc6, 0x14, 0x9e, 0xd5, 0x28, 0x61, 0xb, 0x84, 0xb1, 0xc0, 0xa1, 0x44, 0xa8, 0x6a, 0x9a, 0xb3}} return a, nil } diff --git a/transactions/marketV3/create_start_sale.cdc b/transactions/marketV3/create_start_sale.cdc index 9acef1c..e42fb0f 100644 --- a/transactions/marketV3/create_start_sale.cdc +++ b/transactions/marketV3/create_start_sale.cdc @@ -13,19 +13,19 @@ transaction(tokenReceiverPath: PublicPath, beneficiaryAccount: Address, cutPerce let ownerCapability = acct.capabilities.get<&{FungibleToken.Receiver}>(tokenReceiverPath)! let beneficiaryCapability = getAccount(beneficiaryAccount).capabilities.get<&{FungibleToken.Receiver}>(tokenReceiverPath)! - let ownerCollection = acct.storage.copy>(/storage/MomentCollectionCap) + var ownerCollection = acct.storage.copy>(from: /storage/MomentCollectionCap) if ownerCollection == nil { ownerCollection = acct.capabilities.storage.issue(/storage/MomentCollection) acct.storage.save(ownerCollection, to: /storage/MomentCollectionCap) } // get a capability for the v1 collection - var v1SaleCollection = acct.storage.copy>(/storage/topshotSaleCollectionCap) + var v1SaleCollection = acct.storage.copy>(from: /storage/topshotSaleCollectionCap) if v1SaleCollection == nil { - v1SaleCollection = acct.capabilities.storage.issue(/storage/topshotSaleCollection) + v1SaleCollection = acct.capabilities.storage.issue(/storage/topshotSaleCollection) acct.storage.save(v1SaleCollection, to: /storage/topshotSaleCollectionCap) - } - + } + // create a new sale collection let topshotSaleCollection <- TopShotMarketV3.createSaleCollection(ownerCollection: ownerCollection, ownerCapability: ownerCapability,