-
Notifications
You must be signed in to change notification settings - Fork 108
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
Api for moonbeam integration #1367
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with these changes. Great work. However maybe we can support this transfer with a simple Ethers.js abi interface instead of a separate package.
https://docs.ethers.org/v6/getting-started/#starting-contracts
abi = [
"function decimals() view returns (string)",
"function symbol() view returns (string)",
"function balanceOf(address addr) view returns (uint)"
]
// Create a contract
contract = new Contract("dai.tokens.ethers.eth", abi, provider)
This means that moonbeam can just be a module in the existing API package.
Does that imply you prefer to add another high-level precompile on top of the original one into Moombeam's code base? |
Can we simply use untyped bindings like so? let abi = [
"transferAssetsUsingTypeAndThenAddress((uint8,bytes[]),(address,uint256)[],uint8,uint8,uint8,bytes)",
]
const xcmInterfacePrecompile = "0x000000000000000000000000000000000000081A"
let contract = new Contract(xcmInterfacePrecompile, abi, provider)
const tx = await contract[
"transferAssetsUsingTypeAndThenAddress((uint8,bytes[]),(address,uint256)[],uint8,uint8,uint8,bytes)"
](dest, assets, assetTransferType, remoteFeesIdIndex, feesTransferType, customXcmOnDest) |
@alistair-singh Move the api into the existing API package in |
7253bb0
to
9cbcf5e
Compare
Resolves: https://linear.app/snowfork/issue/SNO-1265
Just a thin wrapper on top of Moonbeam's xcm precompile