Skip to content

Commit

Permalink
Exposed EosioAction from utils and added more logging to the startup …
Browse files Browse the repository at this point in the history
…script.
  • Loading branch information
dallasjohnson committed Mar 16, 2020
1 parent 695ccc0 commit 09e90f8
Show file tree
Hide file tree
Showing 16 changed files with 566 additions and 7 deletions.
8 changes: 1 addition & 7 deletions src/accounts/updateAuth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EOSManager } from '../eosManager';
import { Account } from './account';
import { EosioAction } from './utils';

export namespace UpdateAuth {
export interface PermissionLevel {
Expand Down Expand Up @@ -135,10 +136,3 @@ export namespace UpdateAuth {
await EOSManager.transact({ actions });
}
}

export type EosioAction = {
account: string;
name: string;
authorization: { actor: string; permission: string }[];
data: any;
};
7 changes: 7 additions & 0 deletions src/accounts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ export const hashToEOSName = (data: string) =>
.substring(0, 11)
.replace(digitPattern, match => digitMapping[match])
.toLowerCase()}`;

export type EosioAction = {
account: string;
name: string;
authorization: { actor: string; permission: string }[];
data: any;
};
348 changes: 348 additions & 0 deletions src/eosio-config/config.ini

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions src/eosio-config/logging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"includes": [],
"appenders": [
{
"name": "stderr",
"type": "console",
"args": {
"stream": "std_error",
"level_colors": [
{
"level": "debug",
"color": "green"
},
{
"level": "warn",
"color": "brown"
},
{
"level": "error",
"color": "red"
}
]
},
"enabled": true
},
{
"name": "stdout",
"type": "console",
"args": {
"stream": "std_out",
"level_colors": [
{
"level": "debug",
"color": "green"
},
{
"level": "warn",
"color": "brown"
},
{
"level": "error",
"color": "red"
}
]
},
"enabled": true
}
],
"loggers": [
{
"name": "default",
"level": "all",
"enabled": true,
"additivity": false,
"appenders": ["stdout"]
},
{
"name": "net_plugin_impl",
"level": "all",
"enabled": true,
"additivity": false,
"appenders": ["stdout"]
},
{
"name": "http_plugin",
"level": "all",
"enabled": true,
"additivity": false,
"appenders": ["stdout"]
},
{
"name": "producer_plugin",
"level": "all",
"enabled": true,
"additivity": false,
"appenders": ["stdout"]
},
{
"name": "transaction_tracing",
"level": "all",
"enabled": true,
"additivity": false,
"appenders": ["stdout"]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "2853617cec3eabd41881eb48882e6fc5e81a0db917d375057864b3befbe29acd",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "DISALLOW_EMPTY_PRODUCER_SCHEDULE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "a98241c83511dc86c857221b9372b4aa7cea3aaebc567a48604e1d3db3557050",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "FIX_LINKAUTH_RESTRICTION"
}
11 changes: 11 additions & 0 deletions src/eosio-config/protocol_features/BUILTIN-FORWARD_SETCODE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "898082c59f921d0042e581f00a59d5ceb8be6f1d9c7a45b6f07c0e26eaee0222",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "FORWARD_SETCODE"
}
11 changes: 11 additions & 0 deletions src/eosio-config/protocol_features/BUILTIN-GET_SENDER.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "1eab748b95a2e6f4d7cb42065bdee5566af8efddf01a55a0a8d831b823f8828a",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "GET_SENDER"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"protocol_feature_type": "builtin",
"dependencies": [
"ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99"
],
"description_digest": "45967387ee92da70171efd9fefd1ca8061b5efe6f124d269cd2468b47f1575a0",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "NO_DUPLICATE_DEFERRED_ID"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "2f1f13e291c79da5a2bbad259ed7c1f2d34f697ea460b14b565ac33b063b73e2",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "ONLY_BILL_FIRST_AUTHORIZER"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "f3c3d91c4603cde2397268bfed4e662465293aab10cd9416db0d442b8cec2949",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "ONLY_LINK_TO_EXISTING_PERMISSION"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "64fe7df32e9b86be2b296b3f81dfd527f84e82b98e363bc97e40bc7a83733310",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": false,
"enabled": true
},
"builtin_feature_codename": "PREACTIVATE_FEATURE"
}
11 changes: 11 additions & 0 deletions src/eosio-config/protocol_features/BUILTIN-RAM_RESTRICTIONS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "1812fdb5096fd854a4958eb9d53b43219d114de0e858ce00255bd46569ad2c68",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "RAM_RESTRICTIONS"
}
11 changes: 11 additions & 0 deletions src/eosio-config/protocol_features/BUILTIN-REPLACE_DEFERRED.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "9908b3f8413c8474ab2a6be149d3f4f6d0421d37886033f27d4759c47a26d944",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "REPLACE_DEFERRED"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"protocol_feature_type": "builtin",
"dependencies": [],
"description_digest": "e71b6712188391994c78d8c722c1d42c477cf091e5601b5cf1befd05721a57f3",
"subjective_restrictions": {
"earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
"preactivation_required": true,
"enabled": true
},
"builtin_feature_codename": "RESTRICT_ACTION_TO_SELF"
}
1 change: 1 addition & 0 deletions src/scripts/init_blockchain.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# set -o errexit
set -x

echo "=== lamington: setup blockchain accounts and smart contract ==="

Expand Down

0 comments on commit 09e90f8

Please sign in to comment.