This guide will help you set up the Bloxchain Workflow Analyzer for your own development environment.
git clone https://github.com/your-org/bloxchain-protocol.git
cd bloxchain
npm installCopy the example environment file and configure it for your setup:
cp env.example .envEdit .env with your configuration:
# Network Configuration
BLOXCHAIN_NETWORK=development
# Development Network Configuration
# Leave REMOTE_HOST unset for local development (localhost)
# Set REMOTE_HOST to use remote development environment
REMOTE_HOST=your-remote-host.com
REMOTE_PORT=8545
REMOTE_NETWORK_ID=1337
REMOTE_GAS=8000000
REMOTE_GAS_PRICE=20000000000
REMOTE_FROM=0x1234567890123456789012345678901234567890
# Definition Library Addresses (update after deployment)
MULTIPHASE_DEFINITIONS_ADDRESS=0x...
SECURE_OWNABLE_DEFINITIONS_ADDRESS=0x...
DYNAMIC_RBAC_DEFINITIONS_ADDRESS=0x...Deploy to your development network:
npm run deploy:developmentAfter deployment, update the contract addresses in your .env file:
# Contract Addresses (update after deployment)
SECUREBLOX_ADDRESS=0x...
ROLEBLOX_ADDRESS=0x...
SIMPLE_VAULT_ADDRESS=0x...
SIMPLE_RWA20_ADDRESS=0x...Run the dynamic analysis:
npm run analyze:contractFor local development with Ganache:
# .env
BLOXCHAIN_NETWORK=development
# REMOTE_HOST not set - defaults to localhost
REMOTE_PORT=8545
REMOTE_NETWORK_ID=1337For remote development (recommended for open source):
# .env
BLOXCHAIN_NETWORK=development
REMOTE_HOST=your-remote-host.com
REMOTE_PORT=8545
REMOTE_NETWORK_ID=1337For custom networks:
# .env
GUARDIAN_NETWORK=custom
CUSTOM_RPC_URL=https://your-custom-rpc:8545
CUSTOM_NETWORK_ID=9999
CUSTOM_NETWORK_NAME=custom_network| Variable | Description | Default | Required |
|---|---|---|---|
BLOXCHAIN_NETWORK |
Network name (localhost, remote_development, custom) | remote_development | No |
REMOTE_HOST |
Remote host address | 127.0.0.1 | No |
REMOTE_PORT |
Remote port | 8545 | No |
REMOTE_NETWORK_ID |
Network ID | 1337 | No |
REMOTE_GAS |
Gas limit for transactions | 8000000 | No |
REMOTE_GAS_PRICE |
Gas price for transactions | 20000000000 | No |
REMOTE_FROM |
Default from address | - | No |
| Variable | Description | Required |
|---|---|---|
MULTIPHASE_DEFINITIONS_ADDRESS |
StateAbstractionDefinitions address | Yes |
SECURE_OWNABLE_DEFINITIONS_ADDRESS |
SecureOwnableDefinitions address | Yes |
DYNAMIC_RBAC_DEFINITIONS_ADDRESS |
DynamicRBACDefinitions address | Yes |
| Variable | Description | Required |
|---|---|---|
GUARDIAN_ADDRESS |
Guardian address | No |
GUARDIAN_WITH_ROLES_ADDRESS |
GuardianWithRoles address | No |
SIMPLE_VAULT_ADDRESS |
SimpleVault address | No |
SIMPLE_RWA20_ADDRESS |
SimpleRWA20 address | No |
# Deploy to development network (local or remote based on .env)
npm run deploy:development
# Deploy to specific network
npx truffle migrate --network development# Run dynamic contract analysis
npm run analyze:contract
# Run specific analysis
node scripts/analyze-contract-simple.js# Run all tests
npm test
# Run analyzer tests
npm run test:analyzer
# Run integration tests
npm run test:analyzer:integration-
Network Connection Failed
- Check your
REMOTE_HOSTandREMOTE_PORTsettings - Ensure your remote node is running and accessible
- Check your
-
Contract Not Found
- Verify contract addresses in
.envfile - Ensure contracts are deployed to the correct network
- Verify contract addresses in
-
Definition Library Errors
- Check definition library addresses
- Ensure libraries are deployed and accessible
- Check the README.md for general information
- Review the SDK Documentation for detailed API usage
- Open an issue on GitHub for bugs or feature requests
- Fork the repository
- Create a feature branch
- Set up your development environment using this guide
- Make your changes
- Test thoroughly
- Submit a pull request
MPL-2.0