Skip to content

Commit

Permalink
Merge pull request #242 from arda-org/dev
Browse files Browse the repository at this point in the history
dev into main
  • Loading branch information
lcswillems authored Dec 14, 2024
2 parents 8120244 + 2228482 commit 425d2e1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
10 changes: 7 additions & 3 deletions website/app/data-converter/pageClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ const DataConverter = () => {
queryKey: ["proxyUrl", proxyUrl, "address", address],
queryFn: () => new Proxy(proxyUrl).getSerializableAccount(address),
});
const addressMainnetState = JSON.stringify(query.data, null, 2);
const addressMainnetState = query.data
? JSON.stringify(query.data, null, 2)
: undefined;

return (
<Box maxW="breakpoint-2xl" mx="auto" px="4">
Expand Down Expand Up @@ -102,8 +104,10 @@ const DataConverter = () => {
</Clipboard.Trigger>
</Clipboard.Root>
<Box mb="8" />
<Box as="pre" overflow="auto">
{addressMainnetState}
<Box>
{addressMainnetState !== undefined
? `Chars: ${addressMainnetState.length}`
: undefined}
</Box>
<Box mb="8" />
</Box>
Expand Down
2 changes: 1 addition & 1 deletion xsuite-fullsimulnet/build-binary.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ if (process.env.CI) {
]);
}

await $`GOBIN="$(pwd)" go install -ldflags ${argv.ldflags} github.com/multiversx/mx-chain-simulator-go/cmd/chainsimulator@v1.8.4-fix1`;
await $`GOBIN="$(pwd)" go install -ldflags ${argv.ldflags} github.com/multiversx/mx-chain-simulator-go/cmd/chainsimulator@v1.8.6`;
await $`mv ./chainsimulator ../xsuite-fullsimulnet-${argv.os}-${argv.arch}/bin/fsproxy`;
1 change: 1 addition & 0 deletions xsuite-fullsimulnet/config/nodeOverride.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
OverridableConfigTomlValues = [
{ File = "config.toml", Path = "VirtualMachine.Execution.WasmVMVersions", Value = [{ StartEpoch = 0, Version = "v1.5" }] },
{ File = "config.toml", Path = "VirtualMachine.Querying.WasmVMVersions", Value = [{ StartEpoch = 0, Version = "v1.5" }] },
{ File = "economics.toml", Path = "FeeSettings.MinGasPrice", Value = "0"},
{ File = "enableEpochs.toml", Path = "EnableEpochs.SCDeployEnableEpoch", Value = 0 },
{ File = "enableEpochs.toml", Path = "EnableEpochs.BuiltInFunctionsEnableEpoch", Value = 0 },
{ File = "enableEpochs.toml", Path = "EnableEpochs.RelayedTransactionsEnableEpoch", Value = 0 },
Expand Down
19 changes: 17 additions & 2 deletions xsuite/src/world/fsworld.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ test.concurrent("FSWorld.start - epoch, round, nonce", async () => {
});
});

test.concurrent("FSWorld.start - gasPrice 0", async () => {
using world = await FSWorld.start({ gasPrice: 0 });
const wallet = await world.createWallet({
balance: 10n ** 18n,
});
await wallet.transfer({
receiver: wallet,
value: 1,
gasLimit: 50_000,
});
assertAccount(await wallet.getAccount(), {
balance: 10n ** 18n,
});
});

test.concurrent("FSWorld.proxy.blockNonce", async () => {
using world = await FSWorld.start();
const wallet = await world.createWallet({
Expand All @@ -52,11 +67,11 @@ test.concurrent("FSWorld.proxy.blockNonce", async () => {
balance: 2n * 10n ** 18n,
});
world.proxy.blockNonce = 2;
assertAccount(await world.getAccount(wallet), {
assertAccount(await wallet.getAccount(), {
balance: 10n ** 18n,
});
world.proxy.blockNonce = undefined;
assertAccount(await world.getAccount(wallet), {
assertAccount(await wallet.getAccount(), {
balance: 2n * 10n ** 18n,
});
});
Expand Down

0 comments on commit 425d2e1

Please sign in to comment.