V1 → V2 migration

Registry V2 brings two key new features: batch delegation and subdelegations, all while reducing gas costs by 30-60%. Batch delegation lets users create multiple delegations in a single transaction. Subdelegation lets users split up the rights associated with a single token, for example pointing airdrop claiming to wallet B and governance rights to wallet C.

These are expansions on the core featureset of V1; if you simply wish to continue using V1-esque features then a direct migration table is provided below.

Migration

Delegating your wallet

v1

delegateForAll(delegate, value)

v2

delegateAll(delegate, "", value)

We've added the ability to use subdelegations which is what "" is for.

Delegating a contract

v1

delegateForContract(delegate, contract_, value)

v2

delegateContract(delegate, contract_, "", value)

We've added the ability to use sub-delegations which is what "" is for.

Delegating Tokens

v1

delegateForToken(delegate, contract_, tokenId, value)

v2

In v2, we've added support for fungible tokens and split up the token calls into 3 seperate functions.

v2 - ERC721

delegateERC721(delegate, contract_, tokenId, "", value)

v2 - Fungibles

delegateERC20(delegate, contract_, "", amount)
delegateERC1155(delegate, contract_, tokenId, "", amount)

Users can now specify an amount when delegating fungible tokens

Revoke Calls

v1

revokeAllDelegates()
revokeDelegate(delegate)
revokeSelf(vault)

v2

These functions are removed in favor of using the delegate functions and providing false as the value.

Fetching Incoming Delegations

v1

getDelegationsByDelegate(delegate)

v2

getIncomingDelegations(delegate)

All enumeration methods now return the same struct, no matter the delegation type

Fetching Outgoing Delegations

v1

getDelegatesForAll()
getDelegatesForContract()
getDelegatesForToken()
getContractLevelDelegations()
getTokenLevelDelegations()

v2

getOutgoingDelegations(vault)

These methods have all been rolled into one single enumeration that returns a list of all delegations a vault has issued

Checking Wallet Delegations

v1

checkDelegateForAll(delegate, vault)

v2

checkDelegateForAll(delegate, vault, "")

Checking Contract Delegations

v1

checkDelegateForContract(delegate, vault, contract_)

v2

checkDelegateForContract(delegate, vault, contract_, "")

Checking Token Delegations

v1

checkDelegateForToken(delegate, vault, contract_, tokenId, "")

v2

v2 - ERC721

checkDelegateForERC721(delegate, vault, contract_, tokenId, "")

v2 - Fungibles

checkDelegateForERC20(delegate, vault, contract_, "")
checkDelegateForERC1155(delegate, vault, contract_, tokenId, "")

Fungible token queries return a uint256 instead of a boolean representing the amount delegated

Last updated