@@ -12,11 +12,8 @@ and cost management strategies.
1212
1313## Payment Methods Overview
1414
15- iExec supports multiple payment methods for executing iApp:
16-
17- 1 . ** RLC Tokens** : Direct payment using RLC tokens
18- 2 . ** Vouchers** : Pre-funded vouchers for simplified payment
19- 3 . ** Mixed Payment** : Combination of RLC and vouchers
15+ iExec uses RLC tokens for executing iApp. You need to have RLC in your wallet to
16+ pay for executions.
2017
2118## Paying with RLC Tokens
2219
@@ -58,138 +55,6 @@ guide on
5855[ running iApp with ProtectedData] ( /guides/use-iapp/run-iapp-with-ProtectedData.md )
5956for detailed execution steps.
6057
61- ## Paying with Vouchers <ChainNotSupportedBadge />
62-
63- Vouchers are pre-funded payment instruments that simplify the payment process
64- and can be shared with others. They are ERC-20 tokens that represent pre-funded
65- computation credits on the iExec network and offer several advantages:
66- simplified payment (no need to manage RLC transfers), sharing capabilities (can
67- be shared with team members or users), budget control (set spending limits), and
68- automated top-up (can be configured to automatically refill).
69-
70- ### Step 1: Obtain a Voucher
71-
72- - ** Acquire Vouchers** : Obtain vouchers through the
73- [ iExec Builder Dashboard] ( https://builder.iex.ec/ ) . Note that the number of
74- Web3Mail executions and the expiration time of each voucher is restricted
75- based on its validity period. Refer to
76- [ pricing documentation] ( https://www.iex.ec/voucher ) for more information.
77- - ** Support** : For specific limitations related to your voucher, please contact
78- iExec Support.
79-
80- ### Step 2: Use the Builder Dashboard
81-
82- <ImageViewer
83- : image-url-dark ="builderDashboardImage"
84- image-alt="Builder Dashboard Overview"
85- link-url="https://builder.iex.ec/ "
86- caption="Access the Builder Dashboard"
87- />
88-
89- The iExec Builder Dashboard manages vouchers and resources with an intuitive
90- interface for:
91-
92- - ** Claiming Vouchers** : Builders can claim vouchers during the BUILD and EARN
93- stages.
94- - ** Top-Up Vouchers** : Future updates will allow direct top-ups via the
95- dashboard. Currently, builders are redirected to Discord.
96- - ** Checking Voucher Balance** : Track your voucher balance and usage history.
97-
98- ### Step 3: Grant Allowance (If Necessary)
99-
100- Use [ iExec SDK] ( /references/sdk.md ) with ` iexec.account.approve(voucherAddress) `
101- to authorize the voucher smart contract to debit your account if the voucher
102- balance is insufficient. This ensures that if the voucher alone doesn't cover
103- the execution cost, the remaining balance is automatically deducted from your
104- account.
105-
106- For additional information on using RLC for fallback payment in Web3Mail, refer
107- to the ** Using RLC with Web3Mail** section.
108-
109- ### Step 4: Use Voucher
110-
111- ::: code-group
112-
113- ``` ts twoslash [Web3Mail]
114- import { IExecWeb3mail , getWeb3Provider } from ' @iexec/web3mail' ;
115-
116- const web3Provider = getWeb3Provider (' PRIVATE_KEY' );
117- const web3mail = new IExecWeb3mail (web3Provider );
118- // ---cut---
119- const sendEmail = await web3mail .sendEmail ({
120- protectedData: ' 0x123abc...' ,
121- emailSubject: ' My email subject' ,
122- emailContent: ' My email content' ,
123- useVoucher: true , // [!code focus]
124- });
125- ```
126-
127- ``` ts twoslash [Web3Telegram]
128- import { IExecWeb3telegram , getWeb3Provider } from ' @iexec/web3telegram' ;
129-
130- const web3Provider = getWeb3Provider (' PRIVATE_KEY' );
131- const web3telegram = new IExecWeb3telegram (web3Provider );
132- // ---cut---
133-
134- const sendTelegram = await web3telegram .sendTelegram ({
135- protectedData: ' 0x123abc...' ,
136- telegramContent: ' My telegram message content' ,
137- senderName: ' Awesome project team' ,
138- label: ' some-custom-id' ,
139- dataMaxPrice: 42 ,
140- appMaxPrice: 42 ,
141- workerpoolMaxPrice: 42 ,
142- useVoucher: true , // [!code focus]
143- });
144- ```
145-
146- ``` ts twoslash [Any iApp]
147- import { IExecDataProtectorCore , getWeb3Provider } from ' @iexec/dataprotector' ;
148-
149- const web3Provider = getWeb3Provider (' PRIVATE_KEY' );
150- const dataProtectorCore = new IExecDataProtectorCore (web3Provider );
151- // ---cut---
152- const result = await dataProtectorCore .processProtectedData ({
153- protectedData: ' 0x123abc...' ,
154- app: ' 0x456def...' ,
155- useVoucher: true , // [!code focus]
156- });
157- ```
158-
159- :::
160-
161- ::: tip
162-
163- If your voucher doesn't have enough RLC to cover the deal, the SDK will
164- automatically get the required amount to your iExec account. Ensure that your
165- voucher is authorized to access your iExec account and that your account has
166- sufficient funds for this transfer to proceed.
167-
168- :::
169-
170- ### Step 4: Use Someone Else Voucher
171-
172- ``` ts twoslash [Any iApp]
173- import { IExecDataProtectorCore , getWeb3Provider } from ' @iexec/dataprotector' ;
174-
175- const web3Provider = getWeb3Provider (' PRIVATE_KEY' );
176- const dataProtectorCore = new IExecDataProtectorCore (web3Provider );
177- // ---cut---
178- const result = await dataProtectorCore .processProtectedData ({
179- protectedData: ' 0x123abc...' ,
180- app: ' 0x456def...' ,
181- useVoucher: true , // [!code focus]
182- voucherOwner: ' 0x5714eB...' , // [!code focus]
183- });
184- ```
185-
186- ::: warning
187-
188- Make sure the voucher's owner has authorized you to use it. This parameter must
189- be used in combination with ` useVoucher: true ` .
190-
191- :::
192-
19358## Understanding Pricing
19459
19560### Cost components
@@ -235,11 +100,3 @@ Now that you understand payment methods:
235100 [ Run iApp with ProtectedData] ( /guides/use-iapp/run-iapp-with-ProtectedData )
236101- Learn about
237102 [ Run iApp without ProtectedData] ( /guides/use-iapp/run-iapp-without-ProtectedData )
238-
239- <script setup >
240- import ChainNotSupportedBadge from ' @/components/ChainNotSupportedBadge.vue'
241- import ImageViewer from ' @/components/ImageViewer.vue' ;
242-
243- // Assets
244- import builderDashboardImage from ' @/assets/tooling-&-explorers/builder-dashboard/builder-dashboard.png' ;
245- </script >
0 commit comments