Skip to content

Instantly share code, notes, and snippets.

View e00dan's full-sized avatar

e00dan

View GitHub Profile
center_id = 0
machine_id = 0
need_sync = false
sync_insert_batch = 5
rpc_thread_num = 3
node_mode = 'readonly'
[[backends]]
validator_path = '/scripts/godwoken-scripts/meta-contract-validator'
generator_path = '/scripts/godwoken-scripts/meta-contract-generator'
validator_script_type_hash = '0xd6d4b52ed2882cb0b2e1f802817c0ab05bd27da89a41ceddb25e0e347689ce69'
[[backends]]
validator_path = '/scripts/godwoken-scripts/sudt-validator'
generator_path = '/scripts/godwoken-scripts/sudt-generator'
```
yarn:ganache # (to start Ganache)
DEPLOYMENT_ENV=ganache DEPLOYER_PRIVATE_KEY=0xd9066ff9f753a1898709b568119055660a77d9aae4d7a4ad677b8fb3d2a571e5 yarn deploy
DEPLOYMENT_ENV=ganache DEPLOYER_PRIVATE_KEY=0xd9066ff9f753a1898709b568119055660a77d9aae4d7a4ad677b8fb3d2a571e5 yarn test
```
Result:
```
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: BEGIN parse_message()
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: args_len => 56
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: [call_kind] => 0
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: [gas_limit] => 12500000
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: [gas_price] => 0
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: [value] 0x0000000000000000000000000000000000000000000000000000000000000000
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: [input_size] => 4
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: [input_data] 0x5075770f
godwoken_1 | [2021-08-05T22:21:48Z DEBUG gw_generator::syscalls] [contract debug]: END parse_message()
➜ hadouken-contract git:(intergration/godwoken) ✗ yarn ts-node scripts-godwoken/deploy.ts
yarn run v1.22.10
$ /home/kuzi/projects/hadouken-contract/node_modules/.bin/ts-node scripts-godwoken/deploy.ts
Deploy Polyjuice Address Translator
Deploy Address Translator Factory
Deploy Address Translator Factory {
gasPrice: 0,
gasLimit: 6000000,
data: '0x61004356600436101561000d57610039565b600035601c52600051341561002157600080fd5b63cab6f8fa811415610037573360005260206000f35b505b60006000fd5b61000461004303610004600039610004610043036000f3'
@e00dan
e00dan / gist:0c8ce7879fbbd16bdf421eca9a4c4b43
Created July 19, 2021 18:43
f6a63cdf31d7dd850665ddc0f32e6556a8196142e11d57ba7bab85d8df0a3548-mock-tx.json
This file has been truncated, but you can view the full file.
{
"mock_info": {
"inputs": [
{
"input": {
"since": "0x4000000060f5c3f0",
"previous_output": {
"tx_hash": "0xdad4865610d1b9baaa1333661246ed23387f4bbf45e1729c715878be32994151",
"index": "0x0"
}
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: [handle_message] output size => 24295
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: [handle_message] gas left => 5954131
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: [handle_message] status_code => 0
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: [handle_message] END handle_message
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: gas limit => 6000000
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: gas left => 5954131
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: gas price => 0
godwoken_1 | [2021-07-19T18:27:41Z DEBUG gw_generator::syscalls] [contract debug]: fee => 0
godwoken_1 | [2021-07-19T18:27:41Z DEBUG g
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::generator] load_backend for script_hash: 2cccc03c32d405ad93b3a809c286ffe734964e42ece45ac7243637832cd3389f
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::generator] load_backend by code_hash: c2da4c0bbc4a60f04ee49e99221a650a185cda500192f4f88d5c2cdff99016dd
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::syscalls] [contract debug]: BEGIN parse_message()
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::syscalls] [contract debug]: args_len => 29112
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::syscalls] [contract debug]: [call_kind] => 3
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::syscalls] [contract debug]: [gas_limit] => 6000000
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::syscalls] [contract debug]: [gas_price] => 0
godwoken_1 | [2021-07-19T12:01:20Z DEBUG gw_generator::syscalls] [contract debug]: [value] 0x0000
source gw_util.sh && generateSubmodulesEnvFile
make install
make[1]: Entering directory '/home/kuzi/projects/godwoken-kicker'
source ./gw_util.sh && init_submodule_if_empty
if [ "true" = true ] ; then \
docker run --rm -v `pwd`/godwoken-polyman:/app -w=/app $DOCKER_JS_PREBUILD_IMAGE_NAME:$DOCKER_JS_PREBUILD_IMAGE_TAG yarn ; \
fi
yarn install v1.22.5
[1/4] Resolving packages...
success Already up-to-date.
➜ docker git:(prepare-mainnet-rc) ✗ docker-compose logs -f polyjuice
Attaching to docker_polyjuice_1
polyjuice_1 | + PROJECT_DIR=/code
polyjuice_1 | + GODWOKEN_RPC_URL=http://godwoken:8119
polyjuice_1 | + source /code/gw_util.sh
polyjuice_1 | ++ LEGACY_PREBUILD_IMAGE_VERSION=0.2.4
polyjuice_1 | + '[' true = true ']'
polyjuice_1 | + echo 'manual mode..'
polyjuice_1 | + cd /code/godwoken-polyman
polyjuice_1 | manual mode..