# To Wei

WEI is often used when interacting with smart contracts.

{% hint style="danger" %}
Avoid doing the WEI calculation directly in the input fields, doing so may result in errors because of big numbers. Use To Wei or From Wei action instead.
{% endhint %}

## &#x20;<mark style="background-color:blue;">Parameters</mark>&#x20;

<table><thead><tr><th width="178.33333333333331">Parameter name</th><th width="105">Type</th><th width="470.6666666666667">Description</th></tr></thead><tbody><tr><td>Number</td><td>Number</td><td>The amount to be converted</td></tr><tr><td>Decimals</td><td>Number</td><td>Optional.<br>Token decimals. Useful for correct calculation when the token has different decimals than the standard 18</td></tr></tbody></table>

## &#x20;<mark style="background-color:blue;">States (result)</mark>&#x20;

<table><thead><tr><th width="147.33333333333331">State name</th><th width="89">Type</th><th>Description</th></tr></thead><tbody><tr><td>To WEI result</td><td>Text</td><td>Result of the conversion. Note that the result isn't instantly available, so when using the result in the same workflow where the action is run, add a small pause (200 ms) between this action and the next one where the result is used </td></tr></tbody></table>

Demo for how to use To Wei and From Wei features:\
<https://web3-demo.bubbleapps.io/version-test/wei>
