Pārlūkot izejas kodu

Core - fix some issues (#273)

* fix create asset in collection example

* fix package name

* typo

* remove incorrect authority
MarkSackerberg 11 mēneši atpakaļ
vecāks
revīzija
18000bab9e

+ 2 - 2
src/pages/core/create-asset.md

@@ -245,11 +245,11 @@ await createCollection(umi, {
 }).sendAndConfirm(umi)
 
 // fetch the collection
-const collection = fetchCollection(umi, collection.publicKey)
+const collection = await fetchCollection(umi, collectionSigner.publicKey)
 
 
 // generate assetSigner and then create the asset.
-const asset = generateSigner(umi)
+const assetSigner = generateSigner(umi)
 
 await create(umi, {
   asset: assetSigner,

+ 1 - 1
src/pages/core/external-plugins/adding-external-plugins.md

@@ -197,7 +197,7 @@ addPlugin(umi, {
 
 ```ts
 import { generateSigner, publicKey } from '@metaplex-foundation/umi'
-import { createCollection, CheckResult } from '@metaplex-foundation/core'
+import { createCollection, CheckResult } from '@metaplex-foundation/mpl-core'
 
 const collectionSigner = generateSigner(umi)
 const oracleAccount = publicKey('22222222222222222222222222222222')

+ 4 - 7
src/pages/core/external-plugins/oracle.md

@@ -256,7 +256,7 @@ import { generateSigner, publicKey } from '@metaplex-foundation/umi'
 import {
   create,
   CheckResult
-} from '@metaplex-foundation/core'
+} from '@metaplex-foundation/mpl-core'
 
 const collectionSigner = generateSigner(umi)
 
@@ -271,14 +271,11 @@ const asset = await create(umi, {
           type: 'Anchor',
         },
         baseAddress: oracleAccount,
-        authority: {
-          type: 'UpdateAuthority',
-        },
         lifecycleChecks: {
           update: [CheckResult.CAN_REJECT],
         },
         baseAddressConfig: undefined,
-      },,
+      },
     ],
   });.sendAndConfirm(umi)
 ```
@@ -562,7 +559,7 @@ import { generateSigner, publicKey } from '@metaplex-foundation/umi'
 import {
   create,
   CheckResult
-  } from '@metaplex-foundation/core'
+  } from '@metaplex-foundation/mpl-core'
 
 const collectionSigner = generateSigner(umi)
 const oracleAccount = publicKey('11111111111111111111111111111111')
@@ -580,7 +577,7 @@ const collection = await createCollection(umi, {
           update: [CheckResult.CAN_REJECT],
         },
         baseAddressConfig: undefined,
-      },,
+      },
     ],
   });.sendAndConfirm(umi)
 ```

+ 2 - 2
src/pages/core/external-plugins/removing-external-plugins.md

@@ -13,7 +13,7 @@ To remove the External Plugin Adapter from an Asset you'll need to use the `remo
 
 ```ts
 import {publicKey } from '@metaplex-foundation/umi'
-import { removePlugin, CheckResult } from '@metaplex-foundation/core'
+import { removePlugin, CheckResult } from '@metaplex-foundation/mpl-core'
 
 const asset = publicKey('1111111111111111111111111111111')
 const oracleAccount = publicKey('2222222222222222222222222222222')
@@ -85,7 +85,7 @@ To remove the External Plugin Adapter from a Collection you'll need to use the `
 
 ```ts
 import { publicKey } from '@metaplex-foundation/umi'
-import { removeCollectionPlugin, CheckResult } from '@metaplex-foundation/core'
+import { removeCollectionPlugin, CheckResult } from '@metaplex-foundation/mpl-core'
 
 const collection = publicKey('1111111111111111111111111111111')
 const oracleAccount = publicKey('2222222222222222222222222222222')