|
@@ -225,18 +225,6 @@ await freezeAsset(umi, {
|
|
|
{% /dialect %}
|
|
{% /dialect %}
|
|
|
|
|
|
|
|
{% dialect title="Rust CPI" id="rust_cpi" %}
|
|
{% dialect title="Rust CPI" id="rust_cpi" %}
|
|
|
-```rust
|
|
|
|
|
-UpdatePluginV1CpiBuilder::new(&ctx.accounts.core_program.to_account_info())
|
|
|
|
|
- .asset(&ctx.accounts.asset.to_account_info())
|
|
|
|
|
- .collection(Some(&ctx.accounts.collection.to_account_info()))
|
|
|
|
|
- .payer(&ctx.accounts.payer.to_account_info())
|
|
|
|
|
- .authority(Some(&ctx.accounts.update_authority.to_account_info()))
|
|
|
|
|
- .system_program(&ctx.accounts.system_program.to_account_info())
|
|
|
|
|
- //set the FreezeDelegete plugin to `frozen: true`
|
|
|
|
|
- .plugin(Plugin::FreezeDelegate( FreezeDelegate{ frozen: true } ))
|
|
|
|
|
- .invoke()?;
|
|
|
|
|
-```
|
|
|
|
|
-{% /dialect %}
|
|
|
|
|
|
|
|
|
|
{% dialect title="Rust" id="rust" %}
|
|
{% dialect title="Rust" id="rust" %}
|
|
|
```rust
|
|
```rust
|
|
@@ -346,9 +334,9 @@ pub async fn thaw_freeze_delegate_plugin() {
|
|
|
let thaw_freeze_delegate_plugin_ix = UpdatePluginV1Builder::new()
|
|
let thaw_freeze_delegate_plugin_ix = UpdatePluginV1Builder::new()
|
|
|
.asset(asset)
|
|
.asset(asset)
|
|
|
// Pass in Collection if Asset is part of collection.
|
|
// Pass in Collection if Asset is part of collection.
|
|
|
- .collection()
|
|
|
|
|
|
|
+ .collection(Some(collection))
|
|
|
.payer(authority.pubkey())
|
|
.payer(authority.pubkey())
|
|
|
- // Set the `froze: false`
|
|
|
|
|
|
|
+ // Set the `frozen: false`
|
|
|
.plugin(Plugin::FreezeDelegate(FreezeDelegate {frozen: false}))
|
|
.plugin(Plugin::FreezeDelegate(FreezeDelegate {frozen: false}))
|
|
|
.instruction();
|
|
.instruction();
|
|
|
|
|
|