Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,11 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['docker/init-state.ts'],
rules: {
'no-console': 'off',
},
},
],
};
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
middleware:
# TODO: use upstream after solving https://github.com/aeternity/ae_mdw/issues/1758
image: davidyuk/temp:mdw-dev-mode-1.104.5-pr-2167
ports:
- '4000:4000'
- '4001:4001'
- '3013:3013'
- '3313:3313'
volumes:
- ./docker/aeternity.yaml:/home/aeternity/.aeternity/aeternity/aeternity.yaml
stop_grace_period: 0s

explorer:
image: aeternity/aescan:0.24.2
ports:
- '3070:8080'
environment:
- NUXT_PUBLIC_NETWORK_NAME=Local network
- NUXT_PUBLIC_NODE_URL=http://host.docker.internal:3013/v3
- NUXT_PUBLIC_MIDDLEWARE_URL=http://host.docker.internal:4000/v3
- NUXT_PUBLIC_WEBSOCKET_URL=ws://host.docker.internal:4001/v2/websocket
extra_hosts:
- 'host.docker.internal:host-gateway'
21 changes: 21 additions & 0 deletions docker/aeternity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# yaml-language-server: $schema=https://github.com/aeternity/aeternity/raw/master/apps/aeutils/priv/aeternity_config_schema.json

system:
dev_mode: true
plugins:
- name: aeplugin_dev_mode

dev_mode:
auto_emit_microblocks: true

chain:
persist: false
hard_forks:
'1': 0
'6': 1
genesis_accounts:
ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E: 1000000000000000000000000

# TODO remove after solving https://github.com/aeternity/ae_mdw/issues/2165
mining:
beneficiary: ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E
42 changes: 42 additions & 0 deletions docker/init-state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env node

import { execSync } from 'child_process';
import {
Node,
AeSdk,
MemoryAccount,
AccountMnemonicFactory,
} from '@aeternity/aepp-sdk';

// TODO: remove after merging https://github.com/aeternity/ae_mdw/issues/1758
try {
execSync(
'docker compose exec middleware ./bin/ae_mdw rpc ":aeplugin_dev_mode_app.start_unlink()"',
{ stdio: 'pipe' },
);
} catch (error) {
if (!error.message.includes('{:error, {:already_started')) throw error;
}

await (async function rollbackToFirstBlock() {
const { status } = await fetch('http://localhost:3313/rollback?height=1');
if (status !== 200) throw new Error(`Unexpected status code: ${status}`);
}());

const onNode = new Node('http://localhost:3013');
const aeSdk = new AeSdk({
nodes: [{ name: 'testnet', instance: onNode }],
accounts: [new MemoryAccount('sk_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf')],
});

const factory = new AccountMnemonicFactory(
'cross cat upper state flame wire inner betray almost party agree endorse',
);
const account1 = await factory.initialize(0);
const account2 = await factory.initialize(1);

await aeSdk.spend(200e18, account1.address);
await aeSdk.spend(100e18, account2.address);
console.log('Wallet ready');

// TODO: deploy contracts
23 changes: 0 additions & 23 deletions docker/nginx.conf

This file was deleted.

15 changes: 0 additions & 15 deletions docker/override-env.sh

This file was deleted.

1 change: 1 addition & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Public client-side identifiers used at build/runtime.
# Tell Netlify's secret scanner to ignore this env var so builds don't fail.
SECRETS_SCAN_OMIT_KEYS = "VITE_WALLET_CONNECT_PROJECT_ID,VITE_X_OAUTH_CLIENT_ID,VITE_PROFILE_REGISTRY_CONTRACT_ADDRESS"
SECRETS_SCAN_SMART_DETECTION_OMIT_VALUES = "sk_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf"

[[redirects]]
from = "/*"
Expand Down
Loading
Loading