In order to develop and test the application, you need to have some prerequisites:
Start Archethic Node in the devnet environnment (ie local environnment)
If you want to fill Pool and Factory chains with faucet, you can ,before start the node, update the Archethic.Bootstrap.NetworkInit
section in config/dev.exs
Node's file
# Master Chain (pools' management): 000023ca0313eb76617060ae119b48e98e689f2b2ef030e6df063d426dc0b00f4428
# Pool UCO: 0000f53a34560bfe06b01689e585d53c07671f6eaa1b31e62659d8f7d5292f066941
# Faucet: 00001259AE51A6E63A1E04E308C5E769E0E9D15BFFE4E7880266C8FA10C3ADD7B7A2
config :archethic, Archethic.Bootstrap.NetworkInit,
genesis_pools: [
%{
address:
"000023ca0313eb76617060ae119b48e98e689f2b2ef030e6df063d426dc0b00f4428"
|> Base.decode16!(case: :mixed),
amount: 1_000_000_000_000_000
},
%{
address:
"0000f53a34560bfe06b01689e585d53c07671f6eaa1b31e62659d8f7d5292f066941"
|> Base.decode16!(case: :mixed),
amount: 1_000_000_000_000_000
},
%{
address:
"00001259AE51A6E63A1E04E308C5E769E0E9D15BFFE4E7880266C8FA10C3ADD7B7A2"
|> Base.decode16!(case: :mixed),
amount: 1_000_000_000_000_000
}
]
Launch the Archethic Wallet in desktop version (Linux, Windows, MacOS)
Create a new account in the devnet environnment
cd contracts/archethic;npm install;node bridge init_keychain;node bridge deploy_factory;node bridge deploy_pool --token UCO;node bridge deploy_pool --token aeETH;cd -
Execute the following commands to install EVM contracts management's dependencies and to start a local node:
cd contracts/evm;npm install;npx hardhat node;cd -;
Execute the following commands in another terminal to deploy the contracts and fill the pools with tokens:
cd contracts/evm;npm run deploy;npm run fill-eth; npm run fill-erc;cd -;
Execute the following command at the project's root to launch the app with Chrome extension availability:
flutter run -d web-server
Copy/Paste the app URL (ex: http://localhost:49316/) into Chrome NB: The port number could be different
If you want to debug the Flutter app, you should enable chrome extensions:
flutter\bin\cache
and remove a file named: flutter_tools.stamp
flutter\packages\flutter_tools\lib\src\web
and open the file chrome.dart
.--disable-extensions
and --disable-popup-blocking
and comment these lines
Ref: https://stackoverflow.com/questions/67958169/how-chrome-extensions-be-enabled-when-flutter-web-debugging/71747975#71747975*** This Application is currently in active development so it might fail to build. Please refer to issues or create new issues if you find any. Contributions are welcomed.
To get more details on the contracts, please take a look at the bridge's contract repository