Wrap ETH
Wrap native ETH (or MATIC, BNB, AVAX) to WETH (or WMATIC, WBNB, WAVAX). Deposits native tokens to receive equal amount of wrapped ERC20 token. Ideal for: Railgun shielding prep, DEX operations, protocol compatibility.
Catalog action EVM Onchain wallet Gas swap
Wrap native ETH (or MATIC, BNB, AVAX) to WETH (or WMATIC, WBNB, WAVAX). Deposits native tokens to receive equal amount of wrapped ERC20 token. Ideal for: Railgun shielding prep, DEX operations, protocol compatibility.
This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.
At a Glance
| Field | Value |
|---|---|
| Action ID | wrap-eth |
| Category | EVM Onchain |
| Connector | wallet |
| Requires gas | Yes |
| Funds movement | swap |
| Tags | blockchain, evm, wrap, weth, wmatic, defi, railgun |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount of ETH to wrap in wei as string (e.g., "1000000000000000000" for 1 ETH). Must be a positive integer. |
chainId | number | Yes | Chain ID (1=Ethereum, 42161=Arbitrum, 137=Polygon, 8453=Base, etc.) |
gasLimit | string | No | Optional gas limit override |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | - |
transactionHash | string | Yes | - |
blockNumber | number | No | Block number where the transaction was confirmed |
wethAddress | string | No | The WETH contract address used |
amountWrapped | string | No | Amount of ETH wrapped in wei |
Examples
json{ "type": "wrap-eth", "payload": { "amount": "1000000", "chainId": 8453 }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/wrap-eth/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "amount": "1000000", "chainId": 8453 }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
