ghooey custom widgets examples


Withdraw supplied assets

To withdraw assets from a supply position, use the `aaveWithdrawAsset` data slice. This can be used to build a credit widget.

Repay debt

To repay debt, use the `aaveRepayDebt` data slice. This can be used to build a credit widget.

Repay debt

Repay using wallet balance (DAI)



Repay using wallet balance (GHO)

Borrow asset

To borrow an asset, we use the `aaveBorrowReserveAsset` data slice. This can be used to build a credit widget.

Supply/lend asset

To lend an asset, we use the `aaveSupply` data slice. This can be used to build a lending widget.

Lend DAI

Transfer asset

To transfer asset, we use the `erc20Transfer` data slice, which exposes the `transferToken()` function. This can be used to build peer-to-peer UIs, checkout button, donation button...

Pay with GHO

Asset

An asset, accessed via magic property

Connnect wallet

Global store that exposes the wallet that's currently connected.

Wallet summary (given address)

Provides a summary of a given Ethereum address' positions, borrowing power.

Wallet summary (current user)

Provides a summary of current user's positions, borrowing power.

Wallet holdings (current user)

Provides a summary of current user's holdings.

Wallet holdings (current user)

Provides a summary of current user's holdings.