Skip to content

Commit

Permalink
docs: Updated Irys migration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobinstein committed Sep 5, 2024
1 parent 97a13b2 commit c5c1f07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/src/docs/turbo/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Other flags may be used as normal
All uploads to Arweave through Turbo are paid for using Turbo Credits. Turbo Credits can be purchased through the `fund` method in the Irys SDK when the Irys instance is set to use Turbo. Currently, Turbo supports purchasing Turbo Credits with Arweave tokens (AR), Eth, and Sol.

```typescript
const irys = async () => {
const getIrys = async () => {
const token = "ethereum";

const irys = new Irys({
Expand All @@ -75,6 +75,7 @@ const irys = async () => {
};

try {
const irys = getIrys()
const fundTx = await irys.fund(irys.utils.toAtomic(0.05)); // converts 0.05 ETH to its equivalent in Wei
console.log(`Successfully funded ${irys.utils.fromAtomic(fundTx.quantity)} ${irys.token}`);
} catch (e) {
Expand Down

0 comments on commit c5c1f07

Please sign in to comment.