RAILGUN Reloaded
    Preparing search index...

    Type Alias BuildShieldBaseTokenParams

    BuildShieldBaseTokenParams: BuildShieldBaseParams & {
        tokenType: "BaseToken";
        amount: bigint;
        ephemeralSigner: Ephemeral7702Signer;
        authorizationNonce: number;
        executeNonce: bigint;
        tokenAddress?: never;
        tokenSubID?: never;
    }

    Inputs for shielding the native coin in one transaction. The token is the deployment's wrappedNativeAddress. The shield is a type-4 transaction through RelayAdapt7702, and the deployment must have a relayAdapt7702Address.

    Type Declaration

    • tokenType: "BaseToken"

      Token standard being shielded.

    • amount: bigint

      Amount of the native coin to shield, in wei. Must be positive.

    • ephemeralSigner: Ephemeral7702Signer

      Signer of a never-used ephemeral index. Allocate the index with allocateEphemeralIndex and derive the signer with deriveEphemeral7702Signer. The signer carries no chain ID, so the caller must derive it for the chain of the network argument. The builder cannot check this.

    • authorizationNonce: number

      Account nonce of the ephemeral address. A wrong value makes the chain skip the authorization. The transaction can then succeed with no shield, and the amount stays in the ephemeral account.

    • executeNonce: bigint

      Execute nonce of the ephemeral account: zero when it has no code, otherwise the nonce() of the delegated contract. A wrong value makes the chain reject the execute signature.

    • OptionaltokenAddress?: never

      Not applicable to the native coin: the deployment names the wrapped token.

    • OptionaltokenSubID?: never

      Not applicable to the native coin: fungible balances carry no token identifier.