# _strategy · FT4 Rell API · Chromia Docs (concept)

> Represents a single strategy which can be used to register accounts. It is composed of three
parts: an operation, used to represent the usage of this strat

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts.strategies/_strategy/

STRUCT

# \_strategy

Represents a single strategy which can be used to register accounts. It is composed of three
parts:

* an operation, used to represent the usage of this strategy
* a function that extracts `account_details` from the operation arguments
* a function that performs any action required by the strategy, given the account and the
  operation arguments

The transaction that will actually perform the registration will be composed of:

* optionally, `evm_signers`
* the operation defined here
* `register_account`

`evm_signers` must contain the signatures of all the EVM participants to the account that
will be registered. If the account will be registered with two auth descriptors, all EVM
signers of both auth descriptors must add their signatures there. The message to sign can
be retrieved by `get_register_account_message`.
FT signers must simply sign the whole transaction instead. If all signers are FT signers,
`evm_signers` must be omitted.

The operation will contain some parameters which will be used by `account_details` and
`action`. It should not run any code, except checking requirements to call the operation.
One common requirement is that it is being used to register an account, and it can be
checked with `require_register_account_next_operation`. Most other requirements should be
checked in the `action` function. The mount name of the operation must be the name of the
strategy in the map returned by `strategy`.

The `register_account` operation will take the name of the previous operation, find out
the `_strategy` it represents, use the parameters in conjunction with
`_strategy.account_details` to extract information about the account it needs to create,
and call the `_strategy.action` function to run the code for the strategy.

**See Also**

* `external.auth.evm_signers` — for info on how to get EVM signatures for account registration

```signature
struct _strategy {
 op: meta;
 account_details: (gtv) -> account_details;
 action: (account, gtv) -> unit;
 required_signers: (gtv) -> list<byte_array>;
}
```

`op: meta;`
:   The operation that this strategy uses. It must have the same mount name as the strategy
    name itself, as registered through extensions of `strategy`

`account_details: (gtv) -> account_details;`
:   Used to extract details for the account that will be registered.
    If this function throws, the registration will be reverted.

`action: (account, gtv) -> unit;`
:   Allows custom logic to be executed after the account is created.
    If this function throws, the registration will be reverted.

`required_signers: (gtv) -> list<byte_array>;`
:   The required signers for a transfer using the strategies fee, open or subscription.

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/accounts/strategies/module.rell#lines-104)

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.accounts.strategies/_strategy/index.html)Generated API reference, mirrored from the live docs
