Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to new Update instruction #1058

Merged
merged 45 commits into from
May 1, 2023
Merged

Changes to new Update instruction #1058

merged 45 commits into from
May 1, 2023

Commits on Apr 4, 2023

  1. Additional Metadata Delegates

    * Add support in Delegate and Revoke for Authority, Data,
    CollectionItem, and ProgrammableConfigItem Metadata
    delegates.
    * Remove Update Metadata delegate.
    danenbm committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    5f7b7aa View commit details
    Browse the repository at this point in the history
  2. Changes to Update to support new and changed delegates

    * Modify authority check to separate out item and
    collection-level delegates.
    * Add V2 Update args struct to allow user to specify token
    standard.
    * Check that new delegates are only changing metadata
    for which they are meant to have access.
    * Modify Update handler to update metadata fields based
    on the delegate type.
    danenbm committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    12ce7d7 View commit details
    Browse the repository at this point in the history
  3. Update tests to support new version of UpdateArgs

    * Also add macro to help destructure UpdateArgs fields.
    danenbm committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    8d3e5f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7fcadd8 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. Put enums back in original order

    * Update is still changed to Data but order is preserved.
    * Also remove unnecessary Option for token_record in Update.
    * Add some comments clarifying authority types in Unverify.
    danenbm committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    ce19636 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5789cfb View commit details
    Browse the repository at this point in the history
  3. Fix JS Update test

    danenbm committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    23cfe43 View commit details
    Browse the repository at this point in the history
  4. Modify DA test util object to return delegate or token record

    * Return the value derived in the delegate method.
    * Also add a test for Authority delegate.
    danenbm committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    71db91a View commit details
    Browse the repository at this point in the history
  5. Add collection delegate test

    danenbm committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    8cf0e57 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2920b21 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dc4852c View commit details
    Browse the repository at this point in the history
  8. Regenerate JS API

    danenbm committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    5fd48e7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ff4d372 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2023

  1. Configuration menu
    Copy the full SHA
    cd49af1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7a6e884 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. Allow collection delegates to use update arg val for permission

    * If the collection toggle value passed in by a collection-level
    delegate contains a new collection value, that is used when
    determining authority.
    * This allows for setting a collection using a collection delegate
    when previously there was no collection in the metadata.
    * Also add tests for delegates on collection parent: collection
    delegate can update members of collection but collection item
    delegate cannot.
    * Also add test to fail updating to a verified collection.
    danenbm committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    ee4219d View commit details
    Browse the repository at this point in the history
  2. Test that collection programmable config delegate cannot update colle…

    …ction
    
    This is important because the passed in collection is also used for
    permissions.  If we allowed the collection-level programmable config
    delegate to pass in a new collection, it would also use that value
    in `get_authority_type`.
    danenbm committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    2bda353 View commit details
    Browse the repository at this point in the history
  3. Move dependencies up

    danenbm committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    7e2e360 View commit details
    Browse the repository at this point in the history
  4. Update deps in Cargo.lock and add test using old TM lib

    * Added a test that uses old token-metadata lib to build the
    instructions and interact with the data.
    * As part of this needed to run `cargo update -p mpl-token-metadata@1.9.1`
    which resulted in the following updates to lateset versions:
        Updating crates.io index
        Updating git repository `https://github.com/metaplex-foundation/rooster`
        Updating mpl-token-metadata v1.8.0 -> v1.9.1
        Updating mpl-utils v0.0.6 -> v0.1.0
        Updating rooster v0.1.0 (https://github.com/metaplex-foundation/rooster#6923ee3b) -> #ca1221c9
    danenbm committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    61f863e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c1612a1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    882084f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2facf40 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2023

  1. Configuration menu
    Copy the full SHA
    7759e41 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. Configuration menu
    Copy the full SHA
    1aea4e4 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2023

  1. Make Data delegate collection-level and add DataItem delegate

    Modify tests as well
    danenbm committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    2e61c77 View commit details
    Browse the repository at this point in the history
  2. Regenerate IDL and SDK

    danenbm committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    fe489a6 View commit details
    Browse the repository at this point in the history
  3. Use different UpdateArg types for different delegates (#1066)

    * Use different UpdateArg types for different delegates
    
    * Change new UpdateArg types to V2
    
    Also use a Default method to cleanup InternalUpdateArgs
    danenbm authored Apr 19, 2023
    Configuration menu
    Copy the full SHA
    308efec View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. Configuration menu
    Copy the full SHA
    84e333a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7670848 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3afec31 View commit details
    Browse the repository at this point in the history
  4. Update tests for new UpdateArgs variants

    - Adding authorization data to all UpdateArgs variants.
    - Add helper functions to create default versions for each
    UpdateArgs variant.
    - Add back in legacy support for ProgrammableConfig delegate
    so that it can use V1 UpdateArgs.
    - Update tests to use new UpdateArgs.
    - Add more tests for ProgrammableConfig delegate.
    - Update "old lib" test to test ProgrammableConfig delegate.
    danenbm committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    a075afd View commit details
    Browse the repository at this point in the history
  5. Regenerate IDL and JS lib

    danenbm committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    7acf16c View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2023

  1. Make delegate_record, token, and edition readonly

    Make consistent in instruction builder and shank annotation.
    danenbm committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    1fcb165 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Configuration menu
    Copy the full SHA
    8f066c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5241144 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Configuration menu
    Copy the full SHA
    0cc7129 View commit details
    Browse the repository at this point in the history
  2. Regenerate IDL and SDK

    danenbm committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    be50b1e View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Configuration menu
    Copy the full SHA
    f96b81a View commit details
    Browse the repository at this point in the history
  2. Space savings

    * Remove InternalUpdateArgs struct and `From` trait
    implementation.
    * Deconstruct `UpdateArgs` where used.
    * Remove redundant authority type and metadata delegate
    role checks from `Metadata::update_v1` because `validate_update`
    already checks that the authority is allowed to perform an update,
    and the `UpdateArgs` enforces that the authority is only changing
    fields for which it is authorized.
    danenbm committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    b284445 View commit details
    Browse the repository at this point in the history
  3. Allow passing in current token standard

    Also make match statements in validate_update
    more concise.
    danenbm committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    540c093 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8cf70af View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d131663 View commit details
    Browse the repository at this point in the history
  6. Minor comment update

    danenbm committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    08ff9d8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    27bf163 View commit details
    Browse the repository at this point in the history
  8. Add more BPF tests

    * Holder authority test.
    * Pass with same token standard being passed in.
    * Token doesn't match mint test.
    * Metadata doesn't match mint test.
    * Wrong edition test.
    * Some failure cases around collection-level delegates.
    danenbm committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    e586ea0 View commit details
    Browse the repository at this point in the history