-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
141 additions
and
32 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,5 @@ | ||
VUE_APP_NETWORK_NAME=Local network | ||
VUE_APP_NODE_URL=http://localhost:3013 | ||
VUE_APP_MIDDLEWARE_URL=http://localhost:4000 | ||
VUE_APP_EXPLORER_URL=http://localhost:3070 | ||
VUE_APP_BACKEND_URL=http://localhost:3079 |
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
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
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,13 +1,32 @@ | ||
version: '3' | ||
services: | ||
middleware: | ||
# TODO: use upstream after merging https://github.com/aeternity/ae_mdw/issues/1758 | ||
image: davidyuk/temp:mdw-devmode | ||
ports: [4000:4000, 4001:4001, 3013:3013, 3313:3313] | ||
volumes: | ||
- ./docker-compose/aeternity.yaml:/home/aeternity/aeternity.yaml | ||
stop_grace_period: 0s | ||
|
||
explorer: | ||
# TODO: use upstream after merging https://github.com/aeternity/aescan/pull/774 | ||
image: davidyuk/temp:explorer | ||
ports: [3070:80] | ||
environment: | ||
- NUXT_PUBLIC_NETWORK_NAME=Local network | ||
- NUXT_PUBLIC_NODE_URL=http://host.docker.internal:3013 | ||
- NUXT_PUBLIC_MIDDLEWARE_URL=http://host.docker.internal:4000 | ||
- NUXT_PUBLIC_WEBSOCKET_URL=ws://host.docker.internal:4001/v2/websocket | ||
|
||
frontend: | ||
image: aepp-base | ||
build: | ||
context: . | ||
ports: ["3080:80"] | ||
build: . | ||
ports: [3080:80] | ||
environment: | ||
- VUE_APP_NETWORK_NAME=Local network | ||
- VUE_APP_NODE_URL=http://localhost:3013 | ||
- VUE_APP_MIDDLEWARE_URL=http://localhost:4000 | ||
- VUE_APP_EXPLORER_URL=http://localhost:3070 | ||
- VUE_APP_BACKEND_URL=http://localhost:3079 | ||
|
||
backend: | ||
image: aepp-base-backend | ||
build: backend | ||
ports: ["3079:80"] | ||
ports: [3079:80] |
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,25 @@ | ||
# 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: 10000000000000000000000 | ||
|
||
# TODO: remove after solving https://github.com/aeternity/ae_mdw/issues/1760 | ||
fork_management: | ||
network_id: ae_dev | ||
|
||
# TODO remove after solving https://github.com/aeternity/ae_mdw/issues/1760#issuecomment-2102872638 | ||
mining: | ||
beneficiary: ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E |
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,42 @@ | ||
#!/usr/bin/env node | ||
|
||
import { execSync } from 'child_process'; | ||
import { | ||
Node, AeSdk, MemoryAccount, generateSaveHDWalletFromSeed, getSaveHDWalletAccounts, | ||
} from '@aeternity/aepp-sdk-next'; | ||
import { mnemonicToSeed } from '@aeternity/bip39'; | ||
|
||
// 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 aeSdk = new AeSdk({ | ||
nodes: [{ name: 'testnet', instance: new Node('http://localhost:3013') }], | ||
accounts: [ | ||
new MemoryAccount('9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200'), | ||
], | ||
}); | ||
|
||
const seed = mnemonicToSeed('cross cat upper state flame wire inner betray almost party agree endorse'); | ||
const wallet = generateSaveHDWalletFromSeed(seed, ''); | ||
const [{ publicKey, secretKey }] = getSaveHDWalletAccounts(wallet, '', 1); | ||
|
||
await aeSdk.spend(1e20, publicKey); | ||
|
||
await (async function prepareTransactionHistory() { | ||
const onAccount = new MemoryAccount(secretKey); | ||
for (let i = 0; i < 15; i += 1) { | ||
await aeSdk.spend(1e14, aeSdk.address, { onAccount }); | ||
} | ||
})(); |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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