Skip to main content

FuturePass

Calls

create

Create a futurepass account for the delegator that is able to make calls on behalf of futurepass.

The dispatch origin for this call must be Signed.

Parameters:

  • account: The delegated account for the futurepass.

Namespace

api.tx.futurepass.create

Type

function create(
  account: SeedPrimitivesSignatureAccountId20
)

migrateEvmFuturepass

This extrinsic migrates EVM-based FuturePass assets to the Substrate-based FuturePass (native).

Parameters:

  • owner - The account ID of the owner of the EVM-based FuturePass.

  • evm_futurepass - The account ID of the EVM-based FuturePass.

  • asset_ids - A vector of asset IDs representing the assets to be migrated.

  • collection_ids - A vector of collection IDs representing the NFTs collections to be migrated.

Namespace

api.tx.futurepass.migrateEvmFuturepass

Type

function migrateEvmFuturepass(
  owner: SeedPrimitivesSignatureAccountId20,
  evm_futurepass: SeedPrimitivesSignatureAccountId20,
  asset_ids: Vec<u32>,
  collection_ids: Vec<u32>
)

proxyExtrinsic

Dispatch the given call through FuturePass account. Transaction fees will be paid by the FuturePass. The dispatch origin for this call must be Signed

Parameters:

  • futurepass: The FuturePass account though which the call is dispatched

  • call: The Call that needs to be dispatched through the FuturePass account

Namespace

api.tx.futurepass.proxyExtrinsic

Type

function proxyExtrinsic(
  futurepass: SeedPrimitivesSignatureAccountId20,
  call: Call
)

registerDelegateWithSignature

Register a delegator to an existing futurepass account given message parameters for a respective signature. Note: Only futurepass owner account can add more delegates. Note: The signer is recovered from signature given the message parameters (which is used to reconstruct the message).

  • You can assume the message is constructed like so:

--- solidity bytes32 message = keccak256(abi.encodePacked(futurepass, delegate, proxyType, deadline)); ethSignedMessage = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", message));


The dispatch origin for this call must be Signed.

Parameters:

  • futurepass: FuturePass account to register the account as delegate; 20 bytes.

  • delegate: The delegated account for the futurepass; 20 bytes.

  • proxy_type: Delegate permission level; 1 byte.

  • deadline: Deadline for the signature; 4 bytes.

  • signature: Signature of the message parameters.

Namespace

api.tx.futurepass.registerDelegateWithSignature

Type

function registerDelegateWithSignature(
  futurepass: SeedPrimitivesSignatureAccountId20,
  delegate: SeedPrimitivesSignatureAccountId20,
  proxy_type: SeedRuntimeImplsProxyType,
  deadline: u32,
  signature: [u8;65]
)

setFuturepassMigrator

Update futurepass native assets migrator admin account.

The dispatch origin for this call must be sudo/root origin.

Parameters:

  • migrator: The new account that will become the futurepass asset migrator.

Namespace

api.tx.futurepass.setFuturepassMigrator

Type

function setFuturepassMigrator(
  migrator: SeedPrimitivesSignatureAccountId20
)

transferFuturepass

Transfer ownership of a futurepass to a new account. The new owner must not already own a futurepass. This removes all delegates from the futurepass. The new owner will be the only delegate; they can add more delegates.

The dispatch origin for this call must be Signed and must be the current owner of the futurepass.

Parameters:

  • current_owner: The current owner of the futurepass.

  • new_owner: The new account that will become the owner of the futurepass.

Namespace

api.tx.futurepass.transferFuturepass

Type

function transferFuturepass(
  current_owner: SeedPrimitivesSignatureAccountId20,
  new_owner: Option<SeedPrimitivesSignatureAccountId20>
)

unregisterDelegate

Unregister a delegate from a futurepass account.

The dispatch origin for this call must be Signed.

Parameters:

  • futurepass: FuturePass account to unregister the delegate from.

  • delegate: The delegated account for the futurepass. Note: if caller is futurepass holder onwer, they can remove any delegate (including themselves); otherwise the caller must be the delegate (can only remove themself).

Namespace

api.tx.futurepass.unregisterDelegate

Type

function unregisterDelegate(
  futurepass: SeedPrimitivesSignatureAccountId20,
  delegate: SeedPrimitivesSignatureAccountId20
)

Storage

defaultProxy

Accounts which have set futurepass as default proxied on-chain account (delegate -> futurepass)

Namespace

api.query.futurepass.defaultProxy

Type

function defaultProxy(
  SeedPrimitivesSignatureAccountId20
): Option<SeedPrimitivesSignatureAccountId20>

holders

FuturePass holders (account -> futurepass)

Namespace

api.query.futurepass.holders

Type

function holders(
  SeedPrimitivesSignatureAccountId20
): Option<SeedPrimitivesSignatureAccountId20>

migrationAdmin

Migration data for user (root) and collections they can migrate

Namespace

api.query.futurepass.migrationAdmin

Type

function migrationAdmin(

): Option<SeedPrimitivesSignatureAccountId20>

nextFuturepassId

The next available incrementing futurepass id

Namespace

api.query.futurepass.nextFuturepassId

Type

function nextFuturepassId(

): u128

Events

DefaultFuturepassSet

FuturePass set as default proxy

Namespace

api.events.futurepass.DefaultFuturepassSet

Type

type DefaultFuturepassSet = {
  delegate: SeedPrimitivesSignatureAccountId20,
  futurepass: Option<SeedPrimitivesSignatureAccountId20>
}

DelegateRegistered

Delegate registration to FuturePass account

Namespace

api.events.futurepass.DelegateRegistered

Type

type DelegateRegistered = {
  futurepass: SeedPrimitivesSignatureAccountId20,
  delegate: SeedPrimitivesSignatureAccountId20,
  proxy_type: SeedRuntimeImplsProxyType
}

DelegateUnregistered

Delegate unregistration from FuturePass account

Namespace

api.events.futurepass.DelegateUnregistered

Type

type DelegateUnregistered = {
  futurepass: SeedPrimitivesSignatureAccountId20,
  delegate: SeedPrimitivesSignatureAccountId20
}

FuturepassAssetsMigrated

Migration of FuturePass assets

Namespace

api.events.futurepass.FuturepassAssetsMigrated

Type

type FuturepassAssetsMigrated = {
  evm_futurepass: SeedPrimitivesSignatureAccountId20,
  futurepass: SeedPrimitivesSignatureAccountId20,
  assets: Vec<u32>,
  collections: Vec<u32>
}

FuturepassCreated

FuturePass creation

Namespace

api.events.futurepass.FuturepassCreated

Type

type FuturepassCreated = {
  futurepass: SeedPrimitivesSignatureAccountId20,
  delegate: SeedPrimitivesSignatureAccountId20
}

FuturepassMigratorSet

Updating FuturePass migrator account

Namespace

api.events.futurepass.FuturepassMigratorSet

Type

type FuturepassMigratorSet = {
  migrator: SeedPrimitivesSignatureAccountId20
}

FuturepassTransferred

FuturePass transfer

Namespace

api.events.futurepass.FuturepassTransferred

Type

type FuturepassTransferred = {
  old_owner: SeedPrimitivesSignatureAccountId20,
  new_owner: Option<SeedPrimitivesSignatureAccountId20>,
  futurepass: SeedPrimitivesSignatureAccountId20
}

ProxyExecuted

A proxy call was executed with the given call

Namespace

api.events.futurepass.ProxyExecuted

Type

type ProxyExecuted = {
  delegate: SeedPrimitivesSignatureAccountId20,
  result: Result<Null, SpRuntimeDispatchError>
}

Errors

AccountAlreadyRegistered

Account is already futurepass holder

Namespace

api.errors.futurepass.AccountAlreadyRegistered

AccountParsingFailure

AccountParsingFailure

Namespace

api.errors.futurepass.AccountParsingFailure

DelegateAlreadyExists

Account already exists as a delegate

Namespace

api.errors.futurepass.DelegateAlreadyExists

DelegateNotRegistered

Account is not futurepass delegate

Namespace

api.errors.futurepass.DelegateNotRegistered

ExpiredDeadline

ExpiredDeadline

Namespace

api.errors.futurepass.ExpiredDeadline

InvalidDeadline

Invalid deadline

Namespace

api.errors.futurepass.InvalidDeadline

InvalidProxyType

Invalid proxy type

Namespace

api.errors.futurepass.InvalidProxyType

InvalidSignature

Invalid signature

Namespace

api.errors.futurepass.InvalidSignature

MigratorNotSet

FuturePass migrator admin account is not set

Namespace

api.errors.futurepass.MigratorNotSet

NotFuturepassOwner

Account is not futurepass owner

Namespace

api.errors.futurepass.NotFuturepassOwner

OwnerCannotUnregister

FuturePass owner cannot remove themselves

Namespace

api.errors.futurepass.OwnerCannotUnregister

PermissionDenied

Account does not have permission to call this function

Namespace

api.errors.futurepass.PermissionDenied

RegisterDelegateSignerMismatch

RegisterDelegateSignerMismatch

Namespace

api.errors.futurepass.RegisterDelegateSignerMismatch

undefined