-
Notifications
You must be signed in to change notification settings - Fork 3
Shaloo/ar 9113 fuel #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Shaloo/ar 9113 fuel #171
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0ebda5a
Fix: #AR-9113 fuel update
shaloo e8a4248
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo d53dcc4
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo b29ff62
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo 9328f75
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo 90e53f8
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo fbb8cff
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo fe090d0
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo 5b8b609
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo b6626ca
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo e0b7438
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo 155e3ee
Merge branch 'main' into shaloo/AR-9113-fuel
shaloo 225b6ef
Update Fuel chain ID
shaloo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
=== "EVM only" | ||
|
||
```ts | ||
import { CA } from '@arcana/ca-sdk'; | ||
const provider = window.ethereum; | ||
const ca = new CA(); | ||
//Set the EVM provider | ||
ca.setEVMProvider(provider); | ||
|
||
//Initialize ca | ||
await ca.init(); | ||
|
||
//Get CA enabled provider | ||
const providerWithCA = ca.getEVMProviderWithCA(); | ||
|
||
//Use providerWithCA to issue chain enabled transactions | ||
await providerWithCA.request({ | ||
method: "eth_sendTransaction", | ||
params: [ | ||
{ | ||
to: "0xEa46Fb4b4Dc7755BA29D09Ef2a57C67bab383A2f", | ||
from: "0x7f521A827Ce5e93f0C6D773525c0282a21466f8d", | ||
value: "0x001", | ||
}, | ||
], | ||
}); | ||
``` | ||
|
||
=== "EVM + Fuel" | ||
|
||
```ts | ||
import { CA } from '@arcana/ca-sdk'; | ||
const provider = window.ethereum; | ||
const ca = new CA(); | ||
//Set the EVM provider | ||
ca.setEVMProvider(provider); | ||
|
||
//Initialize ca | ||
await ca.init(); | ||
|
||
//connector refers to https://github.com/FuelLabs/fuel-connectors/wiki | ||
await ca.setFuelConnector(connector); | ||
const { provider, connector: CAconnector } = await ca.getFuelWithCA(); | ||
|
||
const address = CAconnector.currentAccount()!; | ||
const account = new Account(address, provider, CAconnector); | ||
|
||
//chain abstraction enabled transfer | ||
await account.transfer( | ||
"0xE78655DfAd552fc3658c01bfb427b9EAb0c628F54e60b54fDA16c95aaAdE797A", | ||
1000000, | ||
"0xa0265fb5c32f6e8db3197af3c7eb05c48ae373605b8165b6f4a51c5b0ba4812e", | ||
); | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,4 @@ | |
</WagmiProvider> | ||
</StrictMode> | ||
); | ||
|
||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.