Skip to content

Commit

Permalink
apply unlimited weight to precompile calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Dec 28, 2023
1 parent aa0f847 commit 7b7a0a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"editor.formatOnSaveMode": "file",
"typescript.preferences.importModuleSpecifier": "relative",
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
}
}
8 changes: 4 additions & 4 deletions packages/builder/src/contract/contracts/Xtokens/Xtokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import { decodeAddress } from '@polkadot/util-crypto';
import { ContractConfigBuilder } from '../../ContractBuilder.interfaces';
import { ContractConfig } from '../../ContractConfig';

const U_64_MAX = 18446744073709551615n;

export function Xtokens() {
return {
transfer: (weight = 4_000_000_000): ContractConfigBuilder => ({
transfer: (weight = U_64_MAX): ContractConfigBuilder => ({
build: ({ address, amount, asset, destination }) =>
new ContractConfig({
args: [
Expand All @@ -21,9 +23,7 @@ export function Xtokens() {
module: 'Xtokens',
}),
}),
transferMultiCurrencies: (
weight = 4_000_000_000,
): ContractConfigBuilder => ({
transferMultiCurrencies: (weight = U_64_MAX): ContractConfigBuilder => ({
build: ({ address, amount, asset, destination, fee, feeAsset }) =>
new ContractConfig({
args: [
Expand Down
4 changes: 2 additions & 2 deletions packages/config/src/configs/moonbaseAlpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const moonbaseAlphaConfig = new ChainConfig({
contract: ContractBuilder().Xtokens().transfer(),
destination: pendulumAlphanet,
destinationFee: {
amount: 0.0000001, // TODO
amount: 0.0000001,
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
},
Expand Down Expand Up @@ -123,7 +123,7 @@ export const moonbaseAlphaConfig = new ChainConfig({
contract: ContractBuilder().Xtokens().transfer(),
destination: pendulumAlphanet,
destinationFee: {
amount: 0.1, // TODO
amount: 0.001,
asset: ampe,
balance: BalanceBuilder().substrate().assets().account(),
},
Expand Down

0 comments on commit 7b7a0a8

Please sign in to comment.