setAccessList method

void setAccessList(
  1. List<AccessListEntry>? accessListEntry
)

Sets the access list for the Ethereum transaction.

If the transaction type is legacy and the access list is not empty, the type is changed to EIP-2930.

Implementation

void setAccessList(List<AccessListEntry>? accessListEntry) {
  _accessList = accessListEntry;
  if (_type == ETHTransactionType.legacy) {
    if (accessList?.isNotEmpty ?? false) {
      _type = ETHTransactionType.eip2930;
    }
  }
  _replaceTr();
}