-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove test button in balance Signed-off-by: Ruben <rubdeivis@gmail.com> * add moonbeam config Signed-off-by: Ruben <rubdeivis@gmail.com> * add moonriver xcm config Signed-off-by: Ruben <rubdeivis@gmail.com> * default assets for moonbeam and moonriver Signed-off-by: Ruben <rubdeivis@gmail.com> * map xcm selectable assets on send Signed-off-by: Ruben <rubdeivis@gmail.com> --------- Signed-off-by: Ruben <rubdeivis@gmail.com>
- Loading branch information
Showing
12 changed files
with
621 additions
and
133 deletions.
There are no files selected for viewing
This file contains 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,312 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "currencyAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "destination", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "weight", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "transfer", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "location", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
} | ||
], | ||
"internalType": "struct Xtokens.MultiAsset[]", | ||
"name": "assets", | ||
"type": "tuple[]" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "feeItem", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "destination", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "weight", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "transferMultiAssets", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "address", | ||
"name": "currencyAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Currency[]", | ||
"name": "currencies", | ||
"type": "tuple[]" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "feeItem", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "destination", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "weight", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "transferMultiCurrencies", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "asset", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "destination", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "weight", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "transferMultiasset", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "asset", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "fee", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "destination", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "weight", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "transferMultiassetWithFee", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "currencyAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "fee", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "parents", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "interior", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct Xtokens.Multilocation", | ||
"name": "destination", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "weight", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "transferWithFee", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] |
This file contains 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 |
---|---|---|
@@ -1,8 +1,37 @@ | ||
import { BN } from "bn.js"; | ||
import { BigNumber } from "ethers"; | ||
import { PARACHAINS } from "./chains"; | ||
|
||
export const REF_TIME = new BN("1000000000000"); | ||
export const PROOF_SIZE = new BN("1000000000000"); | ||
|
||
export const BigNumber0 = BigNumber.from(0); | ||
export const BN0 = new BN("0"); | ||
|
||
export const defaultAssetConfig = { | ||
[PARACHAINS.MOONBEAM]: [ | ||
{ | ||
address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", | ||
symbol: "xcDOT", | ||
decimals: 10, | ||
}, | ||
{ | ||
address: "0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf", | ||
symbol: "xcASTR", | ||
decimals: 18, | ||
}, | ||
], | ||
|
||
[PARACHAINS.MOONRIVER]: [ | ||
{ | ||
address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", | ||
symbol: "xcKSM", | ||
decimals: 12, | ||
}, | ||
{ | ||
address: "0xFFFfffFF0Ca324C842330521525E7De111F38972", | ||
symbol: "xcSDN", | ||
decimals: 18, | ||
}, | ||
], | ||
}; |
Oops, something went wrong.