Skip to content

Commit

Permalink
new testnet image
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick95550 committed Aug 22, 2024
1 parent eafef0f commit 3780ee2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions deployments/genesis.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const LocalTestnetParameters: ContractParameters = {
FuturepassRegistrar: '',

ProtocolTimeManager: {
cycleDuration: 1000,
periodDuration: 100,
cycleDuration: 100000,
periodDuration: 10000,
},

Registries: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"solhint": "solhint 'contracts/**/*.sol'",
"package-abi": "npx ts-node scripts/parse_artifacts.ts && npx ts-node scripts/package_abis.ts",
"publish": "npm run package-abi && npm publish",
"docker-localhost": "DOCKER_BUILDKIT=1 docker buildx build --progress=plain --platform linux/amd64 . -f docker/localhost-with-protocol/Dockerfile -t dn3010/sylo-ethereum-testnet:localhost"
"docker-localhost": "DOCKER_BUILDKIT=1 docker buildx build --progress=plain --platform linux/amd64 . -f docker/localhost-with-protocol/Dockerfile -t dn3010/sylo-ethereum-testnet:bootstrap-update"
},
"author": "Sylo",
"license": "ISC",
Expand Down
15 changes: 11 additions & 4 deletions scripts/init_local_network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export async function main() {
}

// forward time to start protocol
await provider.send('evm_increaseTime', [101]);
await provider.send('evm_increaseTime', [10001]);
await provider.send('evm_mine', []);

// ensure each node can redeem a ticket from incentivising
Expand Down Expand Up @@ -124,9 +124,16 @@ export async function main() {
);
}

// progress to start next cycle
await provider.send('evm_increaseTime', [1500]);
await provider.send('evm_mine', []);
const time = await contracts.protocolTimeManager.getTime();
const cycleId = time[0][0];
const periodId = time[1][0];

console.log('cycle id ', cycleId);
console.log('period id ', periodId);
console.log('cycle duration ', time[0][2]);
console.log('period duration ', time[1][2]);

console.log('finished');
}

async function createNode(
Expand Down

0 comments on commit 3780ee2

Please sign in to comment.