> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# token: EVM (ERC-20) target

> EVM (ERC-20) target: the declaration and description of each of the 4 exports of @eco-incorp/sauce.

The `token` namespace emits SauceScript for token operations: ERC-20 on an EVM compile target, SPL Token on `svm`. It is TypeScript that writes SauceScript for a host program; a SauceScript program imports the [`@sauce/token`](https://docs.eco.com/sauce-libraries/token) library instead. `token.Token.transfer({ token, to, amount }).toSauceScript("evm")` returns an object whose `source` is a program `routes.compileSauceProgram` compiles. `token.Token` is also the root export `Token`.

```typescript theme={null}
import { token } from "@eco-incorp/sauce";
```

Generated from the type declarations of `@eco-incorp/sauce`.

### `token.evmTransferStatements`

*Function* · `@eco-incorp/sauce`

`transfer`, with OpenZeppelin `SafeERC20` semantics - see `token/safe.ts` for why this is not
`IERC20.at(t).transfer(...)`. `balanceOf` keeps that binding: a `uint256` return is always there.

```typescript theme={null}
export declare function evmTransferStatements(spec: TokenTransferSpec, prefix?: string): readonly string[];
```

### `token.evmApproveStatements`

*Function* · `@eco-incorp/sauce`

`approve`, with `SafeERC20` semantics plus `forceApprove`'s reset of a non-zero allowance.

```typescript theme={null}
export declare function evmApproveStatements(spec: TokenApproveSpec, prefix?: string): readonly string[];
```

### `token.evmBalanceExpression`

*Function* · `@eco-incorp/sauce`

```typescript theme={null}
export declare function evmBalanceExpression(spec: TokenBalanceSpec): string;
```

### `token.ERC20_IMPORT_LINE`

*Variable* · `@eco-incorp/sauce`

```typescript theme={null}
ERC20_IMPORT_LINE = "import { IERC20 } from \"./artifacts/IERC20.json\";"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.