Ecoer Logo
VOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS32.55%
Net Worth
0.264USD
STEEM
0.001STEEM
SBD
0.474SBD
Effective Power
5.007SP
├── Own SP
0.630SP
└── Incoming Deleg
+4.377SP

Detailed Balance

STEEM
balance
0.001STEEM
market_balance
0.000STEEM
savings_balance
0.000STEEM
reward_steem_balance
0.000STEEM
STEEM POWER
Own SP
0.630SP
Delegated Out
0.000SP
Delegation In
4.377SP
Effective Power
5.007SP
Reward SP (pending)
0.151SP
SBD
sbd_balance
0.000SBD
sbd_conversions
0.000SBD
sbd_market_balance
0.000SBD
savings_sbd_balance
0.000SBD
reward_sbd_balance
0.474SBD
{
  "balance": "0.001 STEEM",
  "savings_balance": "0.000 STEEM",
  "reward_steem_balance": "0.000 STEEM",
  "vesting_shares": "1024.210531 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "7119.449275 VESTS",
  "sbd_balance": "0.000 SBD",
  "savings_sbd_balance": "0.000 SBD",
  "reward_sbd_balance": "0.474 SBD",
  "conversions": []
}

Account Info

namez0yo
id579894
rank712,342
reputation3905906106
created2018-01-08T12:38:18
recovery_accountsteem
proxyNone
post_count21
comment_count0
lifetime_vote_count0
witnesses_voted_for0
last_post2018-08-22T07:14:42
last_root_post2018-03-04T15:54:12
last_vote_time2018-08-22T07:14:48
proxied_vsf_votes0, 0, 0, 0
can_vote1
voting_power0
delayed_votes0
balance0.001 STEEM
savings_balance0.000 STEEM
sbd_balance0.000 SBD
savings_sbd_balance0.000 SBD
vesting_shares1024.210531 VESTS
delegated_vesting_shares0.000000 VESTS
received_vesting_shares7119.449275 VESTS
reward_vesting_balance308.455050 VESTS
vesting_balance0.000 STEEM
vesting_withdraw_rate0.000000 VESTS
next_vesting_withdrawal1969-12-31T23:59:59
withdrawn0
to_withdraw0
withdraw_routes0
savings_withdraw_requests0
last_account_recovery1970-01-01T00:00:00
reset_accountnull
last_owner_update1970-01-01T00:00:00
last_account_update2018-02-08T02:30:39
minedNo
sbd_seconds0
sbd_last_interest_payment1970-01-01T00:00:00
savings_sbd_last_interest_payment1970-01-01T00:00:00
{
  "active": {
    "account_auths": [],
    "key_auths": [
      [
        "STM6CJ6zn18p1ARcZvyhHraWJqgEeEPsGG9fSa18aTbwYELZUaAox",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "balance": "0.001 STEEM",
  "can_vote": true,
  "comment_count": 0,
  "created": "2018-01-08T12:38:18",
  "curation_rewards": 0,
  "delegated_vesting_shares": "0.000000 VESTS",
  "downvote_manabar": {
    "current_mana": 2035914951,
    "last_update_time": 1779093252
  },
  "guest_bloggers": [],
  "id": 579894,
  "json_metadata": "{\"profile\":{\"name\":\"Nick Fujita\",\"profile_image\":\"https://i.imgur.com/u8lh19n.jpg\"}}",
  "last_account_recovery": "1970-01-01T00:00:00",
  "last_account_update": "2018-02-08T02:30:39",
  "last_owner_update": "1970-01-01T00:00:00",
  "last_post": "2018-08-22T07:14:42",
  "last_root_post": "2018-03-04T15:54:12",
  "last_vote_time": "2018-08-22T07:14:48",
  "lifetime_vote_count": 0,
  "market_history": [],
  "memo_key": "STM6BbccdpZ5texPMT5GsRRyffMPnQa2Uufni7u3UBeKCuXauYRpL",
  "mined": false,
  "name": "z0yo",
  "next_vesting_withdrawal": "1969-12-31T23:59:59",
  "other_history": [],
  "owner": {
    "account_auths": [],
    "key_auths": [
      [
        "STM6ZmLBPNwZSNFuudHxeo4nXGntuR563FFo25qSzcAGV6pnMCDyM",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "pending_claimed_accounts": 0,
  "post_bandwidth": 0,
  "post_count": 21,
  "post_history": [],
  "posting": {
    "account_auths": [
      [
        "dtube.app",
        1
      ]
    ],
    "key_auths": [
      [
        "STM8KqbX1RA3szc7KqtLNGwwcYN6YXUmZMccA7hCwvBw8ZcwFAVSY",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "posting_json_metadata": "{\"profile\":{\"name\":\"Nick Fujita\",\"profile_image\":\"https://i.imgur.com/u8lh19n.jpg\"}}",
  "posting_rewards": 301,
  "proxied_vsf_votes": [
    0,
    0,
    0,
    0
  ],
  "proxy": "",
  "received_vesting_shares": "7119.449275 VESTS",
  "recovery_account": "steem",
  "reputation": 3905906106,
  "reset_account": "null",
  "reward_sbd_balance": "0.474 SBD",
  "reward_steem_balance": "0.000 STEEM",
  "reward_vesting_balance": "308.455050 VESTS",
  "reward_vesting_steem": "0.151 STEEM",
  "savings_balance": "0.000 STEEM",
  "savings_sbd_balance": "0.000 SBD",
  "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_sbd_seconds": "0",
  "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
  "savings_withdraw_requests": 0,
  "sbd_balance": "0.000 SBD",
  "sbd_last_interest_payment": "1970-01-01T00:00:00",
  "sbd_seconds": "0",
  "sbd_seconds_last_update": "1970-01-01T00:00:00",
  "tags_usage": [],
  "to_withdraw": 0,
  "transfer_history": [],
  "vesting_balance": "0.000 STEEM",
  "vesting_shares": "1024.210531 VESTS",
  "vesting_withdraw_rate": "0.000000 VESTS",
  "vote_history": [],
  "voting_manabar": {
    "current_mana": "8143659806",
    "last_update_time": 1779093252
  },
  "voting_power": 0,
  "withdraw_routes": 0,
  "withdrawn": 0,
  "witness_votes": [],
  "witnesses_voted_for": 0,
  "rank": 712342
}

Withdraw Routes

IncomingOutgoing
Empty
Empty
{
  "incoming": [],
  "outgoing": []
}
From Date
To Date
steemdelegated 4.377 SP to @z0yo
2026/05/18 08:34:12
delegateez0yo
delegatorsteem
vesting shares7119.449275 VESTS
Transaction InfoBlock #106153388/Trx 23139acccd2c555ecec6eb2903470dcb683763e7
View Raw JSON Data
{
  "block": 106153388,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "7119.449275 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-05-18T08:34:12",
  "trx_id": "23139acccd2c555ecec6eb2903470dcb683763e7",
  "trx_in_block": 0,
  "virtual_op": 0
}
steemdelegated 2.709 SP to @z0yo
2026/05/13 14:37:12
delegateez0yo
delegatorsteem
vesting shares4406.515905 VESTS
Transaction InfoBlock #106017354/Trx a9fc7d98f90fae0185134e7b671cd1b74769144f
View Raw JSON Data
{
  "block": 106017354,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "4406.515905 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-05-13T14:37:12",
  "trx_id": "a9fc7d98f90fae0185134e7b671cd1b74769144f",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 4.385 SP to @z0yo
2026/04/26 07:42:36
delegateez0yo
delegatorsteem
vesting shares7131.965031 VESTS
Transaction InfoBlock #105520807/Trx 17796809a798fef83b7a24a72899d3da42bcf4c5
View Raw JSON Data
{
  "block": 105520807,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "7131.965031 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-04-26T07:42:36",
  "trx_id": "17796809a798fef83b7a24a72899d3da42bcf4c5",
  "trx_in_block": 3,
  "virtual_op": 0
}
steemdelegated 2.735 SP to @z0yo
2026/01/24 06:10:54
delegateez0yo
delegatorsteem
vesting shares4448.785689 VESTS
Transaction InfoBlock #102878611/Trx 2a59f9525b3ff703b792106bc11a0cfbf6d9f23e
View Raw JSON Data
{
  "block": 102878611,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "4448.785689 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2026-01-24T06:10:54",
  "trx_id": "2a59f9525b3ff703b792106bc11a0cfbf6d9f23e",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 2.836 SP to @z0yo
2024/12/18 01:19:30
delegateez0yo
delegatorsteem
vesting shares4613.004886 VESTS
Transaction InfoBlock #91324801/Trx f1d35bdf1e3bf2f3687cefaa055391975f622816
View Raw JSON Data
{
  "block": 91324801,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "4613.004886 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2024-12-18T01:19:30",
  "trx_id": "f1d35bdf1e3bf2f3687cefaa055391975f622816",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 2.940 SP to @z0yo
2023/11/14 16:58:54
delegateez0yo
delegatorsteem
vesting shares4782.138418 VESTS
Transaction InfoBlock #79878904/Trx ae08519e46ca9612042df5495847eb7150b1be7a
View Raw JSON Data
{
  "block": 79878904,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "4782.138418 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2023-11-14T16:58:54",
  "trx_id": "ae08519e46ca9612042df5495847eb7150b1be7a",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 4.746 SP to @z0yo
2023/09/22 13:06:09
delegateez0yo
delegatorsteem
vesting shares7719.047204 VESTS
Transaction InfoBlock #78366109/Trx 2c14c29e350eb71942955a184ed111cb9dee15ee
View Raw JSON Data
{
  "block": 78366109,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "7719.047204 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2023-09-22T13:06:09",
  "trx_id": "2c14c29e350eb71942955a184ed111cb9dee15ee",
  "trx_in_block": 5,
  "virtual_op": 0
}
steemdelegated 4.882 SP to @z0yo
2022/11/03 20:12:27
delegateez0yo
delegatorsteem
vesting shares7941.098642 VESTS
Transaction InfoBlock #69123420/Trx 94d15229442345b138014b5ac9549af1d3370e6d
View Raw JSON Data
{
  "block": 69123420,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "7941.098642 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2022-11-03T20:12:27",
  "trx_id": "94d15229442345b138014b5ac9549af1d3370e6d",
  "trx_in_block": 1,
  "virtual_op": 0
}
steemdelegated 5.017 SP to @z0yo
2022/01/18 01:10:48
delegateez0yo
delegatorsteem
vesting shares8161.206243 VESTS
Transaction InfoBlock #60826398/Trx 889fe50ac9ff02a061f28a11e8c2e2b131f9d10f
View Raw JSON Data
{
  "block": 60826398,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "8161.206243 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2022-01-18T01:10:48",
  "trx_id": "889fe50ac9ff02a061f28a11e8c2e2b131f9d10f",
  "trx_in_block": 25,
  "virtual_op": 0
}
steemdelegated 5.131 SP to @z0yo
2021/06/14 08:16:06
delegateez0yo
delegatorsteem
vesting shares8345.400531 VESTS
Transaction InfoBlock #54616602/Trx 4942dd17f58ae6bd4f99a1e47c656b5c03def894
View Raw JSON Data
{
  "block": 54616602,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "8345.400531 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2021-06-14T08:16:06",
  "trx_id": "4942dd17f58ae6bd4f99a1e47c656b5c03def894",
  "trx_in_block": 0,
  "virtual_op": 0
}
steemdelegated 5.246 SP to @z0yo
2020/12/11 18:26:00
delegateez0yo
delegatorsteem
vesting shares8532.822505 VESTS
Transaction InfoBlock #49363790/Trx ad20026a38ae6f69b34f45bd10c354091c733c1c
View Raw JSON Data
{
  "block": 49363790,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "8532.822505 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-12-11T18:26:00",
  "trx_id": "ad20026a38ae6f69b34f45bd10c354091c733c1c",
  "trx_in_block": 5,
  "virtual_op": 0
}
steemdelegated 1.176 SP to @z0yo
2020/12/06 12:00:51
delegateez0yo
delegatorsteem
vesting shares1912.543513 VESTS
Transaction InfoBlock #49215300/Trx d70fb0eba61c2263b9465b8c2439cc2d3cfc2d65
View Raw JSON Data
{
  "block": 49215300,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "1912.543513 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-12-06T12:00:51",
  "trx_id": "d70fb0eba61c2263b9465b8c2439cc2d3cfc2d65",
  "trx_in_block": 6,
  "virtual_op": 0
}
steemdelegated 5.256 SP to @z0yo
2020/11/26 05:41:45
delegateez0yo
delegatorsteem
vesting shares8549.949122 VESTS
Transaction InfoBlock #48924138/Trx 86a020f45854db72240fe9e77db6f18827cc07a5
View Raw JSON Data
{
  "block": 48924138,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "8549.949122 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-11-26T05:41:45",
  "trx_id": "86a020f45854db72240fe9e77db6f18827cc07a5",
  "trx_in_block": 3,
  "virtual_op": 0
}
steemdelegated 5.374 SP to @z0yo
2020/05/09 13:06:06
delegateez0yo
delegatorsteem
vesting shares8741.835718 VESTS
Transaction InfoBlock #43225664/Trx aac58730d8e1de8d6b20e775abae2fdbd85f88e7
View Raw JSON Data
{
  "block": 43225664,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "8741.835718 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-05-09T13:06:06",
  "trx_id": "aac58730d8e1de8d6b20e775abae2fdbd85f88e7",
  "trx_in_block": 0,
  "virtual_op": 0
}
steemdelegated 1.201 SP to @z0yo
2020/05/08 17:48:48
delegateez0yo
delegatorsteem
vesting shares1953.311140 VESTS
Transaction InfoBlock #43203058/Trx 5f7b95867a90bc9372ec3c558aa984e35b494f28
View Raw JSON Data
{
  "block": 43203058,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "1953.311140 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-05-08T17:48:48",
  "trx_id": "5f7b95867a90bc9372ec3c558aa984e35b494f28",
  "trx_in_block": 6,
  "virtual_op": 0
}
2020/01/08 13:10:09
authorsteemitboard
bodyCongratulations @z0yo! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@z0yo/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@z0yo) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=z0yo)_</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
json metadata{"image":["https://steemitboard.com/img/notify.png"]}
parent authorz0yo
parent permlinkneo-smart-contracts-invocation-triggers
permlinksteemitboard-notify-z0yo-20200108t131009000z
title
Transaction InfoBlock #39749326/Trx a6a6f6eb49204381fd40e4da9b489e96e296c430
View Raw JSON Data
{
  "block": 39749326,
  "op": [
    "comment",
    {
      "author": "steemitboard",
      "body": "Congratulations @z0yo! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@z0yo/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>\n\n<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@z0yo) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=z0yo)_</sub>\n\n\n###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!",
      "json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}",
      "parent_author": "z0yo",
      "parent_permlink": "neo-smart-contracts-invocation-triggers",
      "permlink": "steemitboard-notify-z0yo-20200108t131009000z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-01-08T13:10:09",
  "trx_id": "a6a6f6eb49204381fd40e4da9b489e96e296c430",
  "trx_in_block": 14,
  "virtual_op": 0
}
angrezireplied to @z0yo / q0jfk5
2019/11/06 08:00:06
authorangrezi
bodyAll you need to know about NEO: https://wissen.fun/en/neo-2/
json metadata{"links":["https://wissen.fun/en/neo-2/"],"app":"steemit/0.1"}
parent authorz0yo
parent permlinkneo-smart-contracts-tutorial-helloworld
permlinkq0jfk5
title
Transaction InfoBlock #37932107/Trx 9cf2de941cd589805c41a93ca35e95a9aea5f218
View Raw JSON Data
{
  "block": 37932107,
  "op": [
    "comment",
    {
      "author": "angrezi",
      "body": "All you need to know about NEO: https://wissen.fun/en/neo-2/",
      "json_metadata": "{\"links\":[\"https://wissen.fun/en/neo-2/\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "z0yo",
      "parent_permlink": "neo-smart-contracts-tutorial-helloworld",
      "permlink": "q0jfk5",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2019-11-06T08:00:06",
  "trx_id": "9cf2de941cd589805c41a93ca35e95a9aea5f218",
  "trx_in_block": 17,
  "virtual_op": 0
}
steemdelegated 5.440 SP to @z0yo
2019/11/01 10:09:33
delegateez0yo
delegatorsteem
vesting shares8848.234801 VESTS
Transaction InfoBlock #37790968/Trx 66edc5556bbffbd3442276c26dfd0c86ef5aa877
View Raw JSON Data
{
  "block": 37790968,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "8848.234801 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2019-11-01T10:09:33",
  "trx_id": "66edc5556bbffbd3442276c26dfd0c86ef5aa877",
  "trx_in_block": 41,
  "virtual_op": 0
}
dtubesent 0.001 STEEM to @z0yo- "Time is running out, claim your DTube account now before anyone else can! Login at https://d.tube"
2019/08/22 17:34:30
amount0.001 STEEM
fromdtube
memoTime is running out, claim your DTube account now before anyone else can! Login at https://d.tube
toz0yo
Transaction InfoBlock #35781098/Trx 40b59b6dadf4df436254a01410b7abf45bf171fe
View Raw JSON Data
{
  "block": 35781098,
  "op": [
    "transfer",
    {
      "amount": "0.001 STEEM",
      "from": "dtube",
      "memo": "Time is running out, claim your DTube account now before anyone else can! Login at https://d.tube",
      "to": "z0yo"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2019-08-22T17:34:30",
  "trx_id": "40b59b6dadf4df436254a01410b7abf45bf171fe",
  "trx_in_block": 20,
  "virtual_op": 0
}
2019/01/08 13:47:24
authorsteemitboard
bodyCongratulations @z0yo! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@z0yo/birthday1.png</td><td>1 Year on Steemit</td></tr></table> <sub>_[Click here to view your Board](https://steemitboard.com/@z0yo)_</sub> **Do not miss the last post from @steemitboard:** <table><tr><td><a href="https://steemit.com/steem/@steemitboard/steemwhales-has-officially-moved-to-steemitboard-ranking"><img src="https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png"></a></td><td><a href="https://steemit.com/steem/@steemitboard/steemwhales-has-officially-moved-to-steemitboard-ranking">SteemWhales has officially moved to SteemitBoard Ranking</a></td></tr><tr><td><a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-witness-update-2019-01-07"><img src="https://steemitimages.com/64x128/http://i.cubeupload.com/7CiQEO.png"></a></td><td><a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-witness-update-2019-01-07">SteemitBoard - Witness Update</a></td></tr></table> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
json metadata{"image":["https://steemitboard.com/img/notify.png"]}
parent authorz0yo
parent permlinkneo-smart-contracts-invocation-triggers
permlinksteemitboard-notify-z0yo-20190108t134723000z
title
Transaction InfoBlock #29277081/Trx 2fe757c77f664e2c69c79b654f7d775cfe4397b9
View Raw JSON Data
{
  "block": 29277081,
  "op": [
    "comment",
    {
      "author": "steemitboard",
      "body": "Congratulations @z0yo! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@z0yo/birthday1.png</td><td>1 Year on Steemit</td></tr></table>\n\n<sub>_[Click here to view your Board](https://steemitboard.com/@z0yo)_</sub>\n\n\n**Do not miss the last post from @steemitboard:**\n<table><tr><td><a href=\"https://steemit.com/steem/@steemitboard/steemwhales-has-officially-moved-to-steemitboard-ranking\"><img src=\"https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png\"></a></td><td><a href=\"https://steemit.com/steem/@steemitboard/steemwhales-has-officially-moved-to-steemitboard-ranking\">SteemWhales has officially moved to SteemitBoard Ranking</a></td></tr><tr><td><a href=\"https://steemit.com/steemitboard/@steemitboard/steemitboard-witness-update-2019-01-07\"><img src=\"https://steemitimages.com/64x128/http://i.cubeupload.com/7CiQEO.png\"></a></td><td><a href=\"https://steemit.com/steemitboard/@steemitboard/steemitboard-witness-update-2019-01-07\">SteemitBoard - Witness Update</a></td></tr></table>\n\n> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!",
      "json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}",
      "parent_author": "z0yo",
      "parent_permlink": "neo-smart-contracts-invocation-triggers",
      "permlink": "steemitboard-notify-z0yo-20190108t134723000z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2019-01-08T13:47:24",
  "trx_id": "2fe757c77f664e2c69c79b654f7d775cfe4397b9",
  "trx_in_block": 8,
  "virtual_op": 0
}
steemdelegated 5.561 SP to @z0yo
2018/11/26 20:07:27
delegateez0yo
delegatorsteem
vesting shares9045.710178 VESTS
Transaction InfoBlock #28047089/Trx 27a85f9deaffcb39686002535b1b41f0587264a4
View Raw JSON Data
{
  "block": 28047089,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "9045.710178 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-11-26T20:07:27",
  "trx_id": "27a85f9deaffcb39686002535b1b41f0587264a4",
  "trx_in_block": 7,
  "virtual_op": 0
}
steemdelegated 18.039 SP to @z0yo
2018/08/22 07:55:51
delegateez0yo
delegatorsteem
vesting shares29342.123778 VESTS
Transaction InfoBlock #25285167/Trx f8649885906b8cd71bc47beba61c4e38ae6a9190
View Raw JSON Data
{
  "block": 25285167,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "29342.123778 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-08-22T07:55:51",
  "trx_id": "f8649885906b8cd71bc47beba61c4e38ae6a9190",
  "trx_in_block": 25,
  "virtual_op": 0
}
2018/08/22 07:14:48
authorkern.pro
permlinkneo-basic-tutorial-part-1
voterz0yo
weight10000 (100.00%)
Transaction InfoBlock #25284347/Trx d0e833e9c4914debcd9a233100bc636db679f22e
View Raw JSON Data
{
  "block": 25284347,
  "op": [
    "vote",
    {
      "author": "kern.pro",
      "permlink": "neo-basic-tutorial-part-1",
      "voter": "z0yo",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-08-22T07:14:48",
  "trx_id": "d0e833e9c4914debcd9a233100bc636db679f22e",
  "trx_in_block": 55,
  "virtual_op": 0
}
2018/08/22 07:14:42
authorz0yo
bodyGreat post! :)
json metadata{"tags":["neo"],"app":"steemit/0.1"}
parent authorkern.pro
parent permlinkneo-basic-tutorial-part-1
permlinkre-kernpro-neo-basic-tutorial-part-1-20180822t071443970z
title
Transaction InfoBlock #25284345/Trx 23075f5900a29109c93d109741ca26ceecdb67ae
View Raw JSON Data
{
  "block": 25284345,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "Great post! :)",
      "json_metadata": "{\"tags\":[\"neo\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "kern.pro",
      "parent_permlink": "neo-basic-tutorial-part-1",
      "permlink": "re-kernpro-neo-basic-tutorial-part-1-20180822t071443970z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-08-22T07:14:42",
  "trx_id": "23075f5900a29109c93d109741ca26ceecdb67ae",
  "trx_in_block": 43,
  "virtual_op": 0
}
2018/06/27 14:14:27
authorz0yo
permlinkneo-smart-contracts-invocation-triggers
votercorck
weight10000 (100.00%)
Transaction InfoBlock #23690960/Trx e4fbe602be23126b4528f051f2ffd684d23a69b1
View Raw JSON Data
{
  "block": 23690960,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-invocation-triggers",
      "voter": "corck",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-06-27T14:14:27",
  "trx_id": "e4fbe602be23126b4528f051f2ffd684d23a69b1",
  "trx_in_block": 16,
  "virtual_op": 0
}
2018/06/27 14:14:24
authorz0yo
permlinkneo-smart-contract-caller-validation
votercorck
weight10000 (100.00%)
Transaction InfoBlock #23690959/Trx 3f6699efaf4cba33289cd86a141be680619fb469
View Raw JSON Data
{
  "block": 23690959,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contract-caller-validation",
      "voter": "corck",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-06-27T14:14:24",
  "trx_id": "3f6699efaf4cba33289cd86a141be680619fb469",
  "trx_in_block": 73,
  "virtual_op": 0
}
steemdelegated 5.619 SP to @z0yo
2018/06/04 01:48:30
delegateez0yo
delegatorsteem
vesting shares9140.329250 VESTS
Transaction InfoBlock #23014388/Trx cdb57ae4b2c348e97a53d8806161e74d2bd154e9
View Raw JSON Data
{
  "block": 23014388,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "9140.329250 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-06-04T01:48:30",
  "trx_id": "cdb57ae4b2c348e97a53d8806161e74d2bd154e9",
  "trx_in_block": 31,
  "virtual_op": 0
}
steemdelegated 18.133 SP to @z0yo
2018/05/18 21:23:39
delegateez0yo
delegatorsteem
vesting shares29495.309394 VESTS
Transaction InfoBlock #22548764/Trx ddd2a75c64ed7fd07d4cc2e0dd464bf4d643f38c
View Raw JSON Data
{
  "block": 22548764,
  "op": [
    "delegate_vesting_shares",
    {
      "delegatee": "z0yo",
      "delegator": "steem",
      "vesting_shares": "29495.309394 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-05-18T21:23:39",
  "trx_id": "ddd2a75c64ed7fd07d4cc2e0dd464bf4d643f38c",
  "trx_in_block": 7,
  "virtual_op": 0
}
2018/05/03 09:40:12
authorz0yo
permlinkneo-smart-contracts-workflow-improvements
voterhugoscrypto
weight10000 (100.00%)
Transaction InfoBlock #22102786/Trx be2baa6f868e725b79aed221c2d690ab05f23fce
View Raw JSON Data
{
  "block": 22102786,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-workflow-improvements",
      "voter": "hugoscrypto",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-05-03T09:40:12",
  "trx_id": "be2baa6f868e725b79aed221c2d690ab05f23fce",
  "trx_in_block": 4,
  "virtual_op": 0
}
2018/05/03 09:37:12
authorz0yo
permlinkquick-setup-neo-private-net-w-gas
voterhugoscrypto
weight10000 (100.00%)
Transaction InfoBlock #22102726/Trx 41f8871e61e4a1ce64583c7a7c9ed27365379e51
View Raw JSON Data
{
  "block": 22102726,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "quick-setup-neo-private-net-w-gas",
      "voter": "hugoscrypto",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-05-03T09:37:12",
  "trx_id": "41f8871e61e4a1ce64583c7a7c9ed27365379e51",
  "trx_in_block": 7,
  "virtual_op": 0
}
2018/05/03 09:32:42
authorz0yo
permlinkneo-smart-contracts-tutorial-helloworld
voterhugoscrypto
weight10000 (100.00%)
Transaction InfoBlock #22102636/Trx 85978587c7e270fdce0bfaac0bfb6cd969d1e33d
View Raw JSON Data
{
  "block": 22102636,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-tutorial-helloworld",
      "voter": "hugoscrypto",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-05-03T09:32:42",
  "trx_id": "85978587c7e270fdce0bfaac0bfb6cd969d1e33d",
  "trx_in_block": 5,
  "virtual_op": 0
}
dzungmrfupvoted (100.00%) @z0yo / 24hke8l7
2018/03/22 07:48:36
authorz0yo
permlink24hke8l7
voterdzungmrf
weight10000 (100.00%)
Transaction InfoBlock #20892180/Trx 7417a62b2dfaf0aa595c8dc44ac8605646df86c5
View Raw JSON Data
{
  "block": 20892180,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "24hke8l7",
      "voter": "dzungmrf",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-22T07:48:36",
  "trx_id": "7417a62b2dfaf0aa595c8dc44ac8605646df86c5",
  "trx_in_block": 2,
  "virtual_op": 0
}
pexea12upvoted (100.00%) @z0yo / 24hke8l7
2018/03/16 03:21:42
authorz0yo
permlink24hke8l7
voterpexea12
weight10000 (100.00%)
Transaction InfoBlock #20714548/Trx ce3327903dcb51423082481cdd21f2494cffef85
View Raw JSON Data
{
  "block": 20714548,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "24hke8l7",
      "voter": "pexea12",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-16T03:21:42",
  "trx_id": "ce3327903dcb51423082481cdd21f2494cffef85",
  "trx_in_block": 42,
  "virtual_op": 0
}
z0yoreceived 0.052 SBD, 0.028 SP author reward for @z0yo / neo-smart-contracts-invocation-triggers
2018/03/11 15:54:12
authorz0yo
permlinkneo-smart-contracts-invocation-triggers
sbd payout0.052 SBD
steem payout0.000 STEEM
vesting payout44.921934 VESTS
Transaction InfoBlock #20585767/Virtual Operation #15
View Raw JSON Data
{
  "block": 20585767,
  "op": [
    "author_reward",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-invocation-triggers",
      "sbd_payout": "0.052 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "44.921934 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-11T15:54:12",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 15
}
z0yoreceived 0.178 SBD, 0.090 SP author reward for @z0yo / neo-smart-contract-caller-validation
2018/03/11 15:47:00
authorz0yo
permlinkneo-smart-contract-caller-validation
sbd payout0.178 SBD
steem payout0.000 STEEM
vesting payout147.017279 VESTS
Transaction InfoBlock #20585624/Virtual Operation #11
View Raw JSON Data
{
  "block": 20585624,
  "op": [
    "author_reward",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contract-caller-validation",
      "sbd_payout": "0.178 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "147.017279 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-11T15:47:00",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 11
}
2018/03/05 00:58:21
authorz0yo
body@@ -662,16 +662,24 @@ ct code. +%3C/p%3E%0A%3Cp%3E The prov
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","dapps"],"image":["https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png","https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif","https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png"],"links":["https://youtu.be/L0al2gttTEs","https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contract-caller-validation
titleNEO Smart Contract: Caller Validation
Transaction InfoBlock #20395342/Trx d3e7caf62ae5b8f4fbd3b8b573cd04765978a075
View Raw JSON Data
{
  "block": 20395342,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "@@ -662,16 +662,24 @@\n ct code.\n+%3C/p%3E%0A%3Cp%3E\n The prov\n",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"dapps\"],\"image\":[\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\",\"https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif\",\"https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png\"],\"links\":[\"https://youtu.be/L0al2gttTEs\",\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contract-caller-validation",
      "title": "NEO Smart Contract: Caller Validation"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-05T00:58:21",
  "trx_id": "d3e7caf62ae5b8f4fbd3b8b573cd04765978a075",
  "trx_in_block": 12,
  "virtual_op": 0
}
2018/03/04 16:23:12
authorz0yo
permlinkneo-smart-contract-caller-validation
voterbue
weight10000 (100.00%)
Transaction InfoBlock #20385042/Trx 9cd0dad4e1a3502968321e6b422e4210312f7f57
View Raw JSON Data
{
  "block": 20385042,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contract-caller-validation",
      "voter": "bue",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T16:23:12",
  "trx_id": "9cd0dad4e1a3502968321e6b422e4210312f7f57",
  "trx_in_block": 25,
  "virtual_op": 0
}
2018/03/04 16:17:12
authorz0yo
permlinkneo-smart-contract-caller-validation
voterhr1
weight2 (0.02%)
Transaction InfoBlock #20384922/Trx bdbef9ccd3ce1749c07600a47810a237494f91ef
View Raw JSON Data
{
  "block": 20384922,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contract-caller-validation",
      "voter": "hr1",
      "weight": 2
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T16:17:12",
  "trx_id": "bdbef9ccd3ce1749c07600a47810a237494f91ef",
  "trx_in_block": 36,
  "virtual_op": 0
}
2018/03/04 16:02:33
authorz0yo
permlinkneo-smart-contract-caller-validation
votergimperion
weight10000 (100.00%)
Transaction InfoBlock #20384629/Trx 91604480c36f6ca7745149f9213265736e210e23
View Raw JSON Data
{
  "block": 20384629,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contract-caller-validation",
      "voter": "gimperion",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T16:02:33",
  "trx_id": "91604480c36f6ca7745149f9213265736e210e23",
  "trx_in_block": 19,
  "virtual_op": 0
}
2018/03/04 15:59:30
authorz0yo
permlinkneo-smart-contracts-invocation-triggers
votergimperion
weight10000 (100.00%)
Transaction InfoBlock #20384568/Trx aefcccb84c340263379b23cc2432f8125789f12b
View Raw JSON Data
{
  "block": 20384568,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-invocation-triggers",
      "voter": "gimperion",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T15:59:30",
  "trx_id": "aefcccb84c340263379b23cc2432f8125789f12b",
  "trx_in_block": 20,
  "virtual_op": 0
}
2018/03/04 15:54:12
authorz0yo
body<html> <p><img src="https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png" width="455" height="195"/></p> <p>Did you know that direct invocation transactions are not the only scenario when your contract code will be run?</p> <p><img src="https://media.giphy.com/media/xT0xeJpnrWC4XWblEk/giphy.gif" width="350" height="233"/></p> <p>In it’s general usage you smart contract code can be invoked directly, passing in the input parameters with the types that you specified on initial import. This makes up the majority of calls made to and from contracts that hold thinks like NEP5 tokens or managed asset data in contract storage. However, when a transaction is created to transfer assets like NEO or GAS to or from the contract address, your contract code will also be invoked.</p> <p><br></p> <p>Invoking the contract code when sending or receiving assets for a contract address allows you to provide your contract with the ability to self manage it’s NEO and GAS assets. For example, if your contract allows users to exchange NEO for your NEP5 token, the NEO is deposited into the contract address. This can be done either by directly invoking the contract with the appropriate parameters and attaching the NEO to the transaction; or by executing a asset transfer of NEO to the contract address. In the latter case, you will want the contract code to be able to handle the users deposit of NEO, and processes it in a similar flow to the direct contract invocation.<br> </p> <p>Additionally, once assets have started to accumulate in the contract address, you are going to want a way to manage those funds directly. So when send transactions are executed on behalf of the contract address, we want to have the ability to approve or disapprove those withdraws on a case by case basis.In order to handle this in your contract code, neo-python provides the method:</p> <pre><code>boa.blockchain.vm.Neo.Runtime.GetTrigger</code></pre> <p><br></p> <p><em><strong>GetTrigger</strong></em> is a function that when executed returns whether the contract was invoked as an <em><strong>Application</strong></em> or for <em><strong>Verification</strong></em>. We are also provided with the following constants to aid in our validation:</p> <pre><code>boa.interop.Neo.TriggerType.Application<br> boa.interop.Neo.TriggerType.Verification</code></pre> <h4><br></h4> <h4>GetTrigger() == Application</h4> <p>The execution of the smart contract code was invoked directly, and we can expect the input arguments with the types that we specified to be present. In this case we should expect to utilize these input values to determine the resulting state of our contract, and it’s output.</p> <h4><br></h4> <h4>GetTrigger() == Verification</h4> <p>The contract code is being executed to provide a verification of whether or not a transaction involving assets owned by the contract address should be allowed to succeed. In this case we should ultimately have logic that returns a True or False value. Returning <em><strong>True</strong></em> will validate the transaction will allow it to execute successfully. Returning <em><strong>False</strong></em> will reject the transaction, and the transfer will not occur.</p> <h3><br></h3> <h3>Usage Example</h3> <p>In the following example, we will simulate a contract where we have handlers for both <em><strong>Application</strong></em> and <em><strong>Validation</strong></em> triggers. In the Verification trigger handler we will only accept transactions executed by a contract owner, and in the Application trigger we will return a special secret message if the correct input password is provided.</p> <pre><code>from boa.blockchain.vm.Neo.Runtime import GetTrigger, CheckWitness<br> from boa.blockchain.vm.Neo.TriggerType import Application, Verification<br> def Main(password):<br> &nbsp;&nbsp;trigger = GetTrigger()<br> &nbsp;&nbsp;if trigger == Verification:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return handleVerification()<br> &nbsp;&nbsp;elif trigger == Application:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return handleApplication(password)<br> &nbsp;&nbsp;return False<br> <br> def handleVerification():<br> &nbsp;&nbsp;owner = 'AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y'<br> &nbsp;&nbsp;is_owner = CheckWitness(owner)<br> &nbsp;&nbsp;if is_owner:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return True<br> &nbsp;&nbsp;return False<br> <br> def handleApplication(password):<br> &nbsp;&nbsp;if password == 'elephant':<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 'banana'<br> &nbsp;&nbsp;return False</code></pre> <h4><br></h4> <h4>handleVerification</h4> <p>In the case that we are handling a <em><strong>Verification</strong></em> trigger, we will only return True if the address that created the send or receive transaction was the owner that we have hardcoded into our contract code. All other addresses who try to send or withdraw asset to or from this account will have their transactions rejected.</p> <h4><br></h4> <h4>handleApplication</h4> <p>In the cast that we are handling an <em><strong>Application</strong></em> trigger, we will expect a password as an input. If and only if the password provided is <em><strong>elephant</strong></em>, will return the secret message <em><strong>banana</strong></em>. If the correct password is not provided, we will simply return <em><strong>False</strong></em>.</p> <p><br></p> <p>For a more in depth example please refer to the <a href="https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py">Hasty Ogre Name Service contract code</a>.</p> <p><br></p> <p>If you found this tutorial helpful, please donate at:</p> <pre><code>NEO/GAS/NEP5 tokens: AR8rRBxgWw5siKsp1dUmfTLy6QQTjcqoqB<br> ETH/ERC20 tokens: 0x575970777095575fDd12d9cD3B105b41D8DD1344<br> NANO/XRB: xrb_3rpmim57tqbrb8hhjfzm1x5uk135yhmgqoj7j7wsufpo53e3ad5k93ggy1cd<br> LTC: M8nZ7FwJXSMAkAfiGmTKjbB7MWpdwsp52d<br> BTC: 3LcA1ztxFjghexRNWPyGXA59VFU3gF4PTz<br> BCH: 1LXLiF7SjWGday6gm61hzbYHKbSAMevwXo</code></pre> </html>
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","dapps"],"image":["https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png","https://media.giphy.com/media/xT0xeJpnrWC4XWblEk/giphy.gif"],"links":["https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contracts-invocation-triggers
titleNEO Smart Contracts: Invocation Triggers
Transaction InfoBlock #20384462/Trx 957315a02fd2f329c82eb27df4e1a10bc710d007
View Raw JSON Data
{
  "block": 20384462,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "<html>\n<p><img src=\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\" width=\"455\" height=\"195\"/></p>\n<p>Did you know that direct invocation transactions are not the only scenario when your contract code will be run?</p>\n<p><img src=\"https://media.giphy.com/media/xT0xeJpnrWC4XWblEk/giphy.gif\" width=\"350\" height=\"233\"/></p>\n<p>In it’s general usage you smart contract code can be invoked directly, passing in the input parameters with the types that you specified on initial import. This makes up the majority of calls made to and from contracts that hold thinks like NEP5 tokens or managed asset data in contract storage. However, when a transaction is created to transfer assets like NEO or GAS to or from the contract address, your contract code will also be invoked.</p>\n<p><br></p>\n<p>Invoking the contract code when sending or receiving assets for a contract address allows you to provide your contract with the ability to self manage it’s NEO and GAS assets. For example, if your contract allows users to exchange NEO for your NEP5 token, the NEO is deposited into the contract address. This can be done either by directly invoking the contract with the appropriate parameters and attaching the NEO to the transaction; or by executing a asset transfer of NEO to the contract address. In the latter case, you will want the contract code to be able to handle the users deposit of NEO, and processes it in a similar flow to the direct contract invocation.<br>\n</p>\n<p>Additionally, once assets have started to accumulate in the contract address, you are going to want a way to manage those funds directly. So when send transactions are executed on behalf of the contract address, we want to have the ability to approve or disapprove those withdraws on a case by case basis.In order to handle this in your contract code, neo-python provides the method:</p>\n<pre><code>boa.blockchain.vm.Neo.Runtime.GetTrigger</code></pre>\n<p><br></p>\n<p><em><strong>GetTrigger</strong></em> is a function that when executed returns whether the contract was invoked as an <em><strong>Application</strong></em> or for <em><strong>Verification</strong></em>. We are also provided with the following constants to aid in our validation:</p>\n<pre><code>boa.interop.Neo.TriggerType.Application<br>\nboa.interop.Neo.TriggerType.Verification</code></pre>\n<h4><br></h4>\n<h4>GetTrigger() == Application</h4>\n<p>The execution of the smart contract code was invoked directly, and we can expect the input arguments with the types that we specified to be present. In this case we should expect to utilize these input values to determine the resulting state of our contract, and it’s output.</p>\n<h4><br></h4>\n<h4>GetTrigger() == Verification</h4>\n<p>The contract code is being executed to provide a verification of whether or not a transaction involving assets owned by the contract address should be allowed to succeed. In this case we should ultimately have logic that returns a True or False value. Returning <em><strong>True</strong></em> will validate the transaction will allow it to execute successfully. Returning <em><strong>False</strong></em> will reject the transaction, and the transfer will not occur.</p>\n<h3><br></h3>\n<h3>Usage Example</h3>\n<p>In the following example, we will simulate a contract where we have handlers for both <em><strong>Application</strong></em> and <em><strong>Validation</strong></em> triggers. In the Verification trigger handler we will only accept transactions executed by a contract owner, and in the Application trigger we will return a special secret message if the correct input password is provided.</p>\n<pre><code>from boa.blockchain.vm.Neo.Runtime import GetTrigger, CheckWitness<br>\nfrom boa.blockchain.vm.Neo.TriggerType import Application, Verification<br>\ndef Main(password):<br>\n &nbsp;&nbsp;trigger = GetTrigger()<br>\n &nbsp;&nbsp;if trigger == Verification:<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return handleVerification()<br>\n &nbsp;&nbsp;elif trigger == Application:<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return handleApplication(password)<br>\n &nbsp;&nbsp;return False<br>\n<br>\ndef handleVerification():<br>\n &nbsp;&nbsp;owner = 'AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y'<br>\n &nbsp;&nbsp;is_owner = CheckWitness(owner)<br>\n &nbsp;&nbsp;if is_owner:<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return True<br>\n &nbsp;&nbsp;return False<br>\n<br>\ndef handleApplication(password):<br>\n &nbsp;&nbsp;if password == 'elephant':<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 'banana'<br>\n &nbsp;&nbsp;return False</code></pre>\n<h4><br></h4>\n<h4>handleVerification</h4>\n<p>In the case that we are handling a <em><strong>Verification</strong></em> trigger, we will only return True if the address that created the send or receive transaction was the owner that we have hardcoded into our contract code. All other addresses who try to send or withdraw asset to or from this account will have their transactions rejected.</p>\n<h4><br></h4>\n<h4>handleApplication</h4>\n<p>In the cast that we are handling an <em><strong>Application</strong></em> trigger, we will expect a password as an input. If and only if the password provided is <em><strong>elephant</strong></em>, will return the secret message <em><strong>banana</strong></em>. If the correct password is not provided, we will simply return <em><strong>False</strong></em>.</p>\n<p><br></p>\n<p>For a more in depth example please refer to the <a href=\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\">Hasty Ogre Name Service contract code</a>.</p>\n<p><br></p>\n<p>If you found this tutorial helpful, please donate at:</p>\n<pre><code>NEO/GAS/NEP5 tokens: AR8rRBxgWw5siKsp1dUmfTLy6QQTjcqoqB<br>\nETH/ERC20 tokens: 0x575970777095575fDd12d9cD3B105b41D8DD1344<br>\nNANO/XRB: xrb_3rpmim57tqbrb8hhjfzm1x5uk135yhmgqoj7j7wsufpo53e3ad5k93ggy1cd<br>\nLTC: M8nZ7FwJXSMAkAfiGmTKjbB7MWpdwsp52d<br>\nBTC: 3LcA1ztxFjghexRNWPyGXA59VFU3gF4PTz<br>\nBCH: 1LXLiF7SjWGday6gm61hzbYHKbSAMevwXo</code></pre>\n</html>",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"dapps\"],\"image\":[\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\",\"https://media.giphy.com/media/xT0xeJpnrWC4XWblEk/giphy.gif\"],\"links\":[\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contracts-invocation-triggers",
      "title": "NEO Smart Contracts: Invocation Triggers"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T15:54:12",
  "trx_id": "957315a02fd2f329c82eb27df4e1a10bc710d007",
  "trx_in_block": 77,
  "virtual_op": 0
}
2018/03/04 15:50:33
authorz0yo
body@@ -850,21 +850,16 @@ xe9%3Cbr%3E%0A -%3Cbr%3E%0A AK2nJJpJ @@ -889,21 +889,16 @@ p8y%3Cbr%3E%0A -%3Cbr%3E%0A 031a6c6f @@ -1381,21 +1381,16 @@ ess%3Cbr%3E%0A -%3Cbr%3E%0A def Main @@ -1399,29 +1399,24 @@ aller):%3Cbr%3E%0A -%3Cbr%3E%0A &nbsp;&nbsp @@ -1448,29 +1448,24 @@ caller)%3Cbr%3E%0A -%3Cbr%3E%0A &nbsp;&nbsp @@ -1541,21 +1541,16 @@ rue%3Cbr%3E%0A -%3Cbr%3E%0A &nbsp;&
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","dapps"],"image":["https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png","https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif","https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png"],"links":["https://youtu.be/L0al2gttTEs","https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contract-caller-validation
titleNEO Smart Contract: Caller Validation
Transaction InfoBlock #20384389/Trx 2ac5d11dad3eb34fa288a637addbea5601943540
View Raw JSON Data
{
  "block": 20384389,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "@@ -850,21 +850,16 @@\n xe9%3Cbr%3E%0A\n-%3Cbr%3E%0A\n AK2nJJpJ\n@@ -889,21 +889,16 @@\n p8y%3Cbr%3E%0A\n-%3Cbr%3E%0A\n 031a6c6f\n@@ -1381,21 +1381,16 @@\n ess%3Cbr%3E%0A\n-%3Cbr%3E%0A\n def Main\n@@ -1399,29 +1399,24 @@\n aller):%3Cbr%3E%0A\n-%3Cbr%3E%0A\n  &nbsp;&nbsp\n@@ -1448,29 +1448,24 @@\n caller)%3Cbr%3E%0A\n-%3Cbr%3E%0A\n  &nbsp;&nbsp\n@@ -1541,21 +1541,16 @@\n rue%3Cbr%3E%0A\n-%3Cbr%3E%0A\n  &nbsp;&\n",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"dapps\"],\"image\":[\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\",\"https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif\",\"https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png\"],\"links\":[\"https://youtu.be/L0al2gttTEs\",\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contract-caller-validation",
      "title": "NEO Smart Contract: Caller Validation"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T15:50:33",
  "trx_id": "2ac5d11dad3eb34fa288a637addbea5601943540",
  "trx_in_block": 42,
  "virtual_op": 0
}
2018/03/04 15:49:48
authorz0yo
body@@ -1,15 +1,122 @@ %3Chtml%3E%0A +%3Cp%3E%3Cimg src=%22https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png%22 width=%22455%22 height=%22195%22/%3E%3C/p%3E%0A %3Cp%3EIn ma
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","dapps"],"image":["https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png","https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif","https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png"],"links":["https://youtu.be/L0al2gttTEs","https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contract-caller-validation
titleNEO Smart Contract: Caller Validation
Transaction InfoBlock #20384374/Trx 204d955655d816158cf73c10cae5e5350f8e9b60
View Raw JSON Data
{
  "block": 20384374,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "@@ -1,15 +1,122 @@\n %3Chtml%3E%0A\n+%3Cp%3E%3Cimg src=%22https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png%22 width=%22455%22 height=%22195%22/%3E%3C/p%3E%0A\n %3Cp%3EIn ma\n",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"dapps\"],\"image\":[\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\",\"https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif\",\"https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png\"],\"links\":[\"https://youtu.be/L0al2gttTEs\",\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contract-caller-validation",
      "title": "NEO Smart Contract: Caller Validation"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T15:49:48",
  "trx_id": "204d955655d816158cf73c10cae5e5350f8e9b60",
  "trx_in_block": 36,
  "virtual_op": 0
}
2018/03/04 15:48:48
authorz0yo
body@@ -168,505 +168,8 @@ img -src=%22https://giphy.com/gifs/dpNuOoVHLscZq?utm_source=iframe&amp;utm_medium=embed&amp;utm_campaign=Embeds&amp;utm_term=https%253A%252F%252Fcdn.embedly.com%252Fwidgets%252Fmedia.html%253Fsrc%253Dhttps%253A%252F%252Fgiphy.com%252Fembed%252FdpNuOoVHLscZq%252Ftwitter%252Fiframe&amp;%253Burl=https%253A%252F%252Fmedia.giphy.com%252Fmedia%252FdpNuOoVHLscZq%252Fgiphy.gif&amp;%253Bimage=https%253A%252F%252Fmedia.giphy.com%252Fmedia%252FdpNuOoVHLscZq%252Fgiphy.gif&amp;%253Bkey=a19fcc184b9711e1b4764040d3dc5c07&amp;%253Btype=text%252Fhtml&amp;%253Bschema=giphy%22/%3E%3Cimg src=
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","dapps"],"image":["https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif","https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png"],"links":["https://youtu.be/L0al2gttTEs","https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contract-caller-validation
titleNEO Smart Contract: Caller Validation
Transaction InfoBlock #20384354/Trx ef9a040757b185b9e7c43c6d966ce023d3c7a6fd
View Raw JSON Data
{
  "block": 20384354,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "@@ -168,505 +168,8 @@\n img \n-src=%22https://giphy.com/gifs/dpNuOoVHLscZq?utm_source=iframe&amp;utm_medium=embed&amp;utm_campaign=Embeds&amp;utm_term=https%253A%252F%252Fcdn.embedly.com%252Fwidgets%252Fmedia.html%253Fsrc%253Dhttps%253A%252F%252Fgiphy.com%252Fembed%252FdpNuOoVHLscZq%252Ftwitter%252Fiframe&amp;%253Burl=https%253A%252F%252Fmedia.giphy.com%252Fmedia%252FdpNuOoVHLscZq%252Fgiphy.gif&amp;%253Bimage=https%253A%252F%252Fmedia.giphy.com%252Fmedia%252FdpNuOoVHLscZq%252Fgiphy.gif&amp;%253Bkey=a19fcc184b9711e1b4764040d3dc5c07&amp;%253Btype=text%252Fhtml&amp;%253Bschema=giphy%22/%3E%3Cimg \n src=\n",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"dapps\"],\"image\":[\"https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif\",\"https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png\"],\"links\":[\"https://youtu.be/L0al2gttTEs\",\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contract-caller-validation",
      "title": "NEO Smart Contract: Caller Validation"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T15:48:48",
  "trx_id": "ef9a040757b185b9e7c43c6d966ce023d3c7a6fd",
  "trx_in_block": 78,
  "virtual_op": 0
}
2018/03/04 15:47:00
authorz0yo
body<html> <p>In many, if not all cases, you will probably be wanting to validate whether the address invoking your contract code is really who they say they are.</p> <p><img src="https://giphy.com/gifs/dpNuOoVHLscZq?utm_source=iframe&amp;utm_medium=embed&amp;utm_campaign=Embeds&amp;utm_term=https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%3A%2F%2Fgiphy.com%2Fembed%2FdpNuOoVHLscZq%2Ftwitter%2Fiframe&amp;%3Burl=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&amp;%3Bimage=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&amp;%3Bkey=a19fcc184b9711e1b4764040d3dc5c07&amp;%3Btype=text%2Fhtml&amp;%3Bschema=giphy"/><img src="https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif" width="295" height="250"/></p> <p>Thankfully we are provided with the following validation method:</p> <pre><code>boa.blockchain.vm.Neo.Runtime.CheckWitness</code></pre> <p><br> This method accepts a single parameter which represents the address that you would like to validate against the address used to invoke the contract code.The provided input value can be in any of the following formats which can be used to identify the caller address:</p> <pre><code>#\xba\'\x03\xc52c\xe8\xd6\xe5"\xdc2 39\xdc\xd8\xee\xe9<br> <br> AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y<br> <br> 031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a</code></pre> <p><br></p> <p>These can all be found in the neo-python cli when running the command:</p> <pre><code>wallet</code></pre> <p><br></p> <p><img src="https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png" width="1000" height="686"/></p> <p><br></p> <p>In order to test this out, we can use the following sample contract code:</p> <pre><code>from boa.blockchain.vm.Neo.Runtime import CheckWitness<br> <br> def Main(caller):<br> <br> &nbsp;&nbsp;isCaller = CheckWitness(caller)<br> <br> &nbsp;&nbsp;if isCaller:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return True<br> <br> &nbsp;&nbsp;return False</code></pre> <p><br></p> <p>This will simply validate whether the provided input for <em><strong>caller</strong></em> matches the address that was used to invoke the contract.From our neo-python cli, we can use any of the following queries to test this out using our <a href="https://youtu.be/L0al2gttTEs">build &amp; test method</a>.Address:</p> <pre><code>build smartContracts/callerValidation.py test 07 01 False False AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y</code></pre> <p><br></p> <p>Public key:</p> <pre><code>build smartContracts/callerValidation.py test 07 01 False False 031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a</code></pre> <p><br></p> <p>Script hash of the address:</p> <pre><code>build smartContracts/callerValidation.py test 07 01 False False #\xba\'\x03\xc52c\xe8\xd6\xe5"\xdc2 39\xdc\xd8\xee\xe9</code></pre> <p><br></p> <p>Running these should all result in true if you are running on the main wallet provided for the private net. If you are running your own instance or calling from another wallet simply copy the desired value from the result of the <em><strong>wallet</strong></em> command. If you run a test execution with a value that is not your wallet, the execution will return <em><strong>False</strong></em>. For example:</p> <pre><code>build smartContracts/callerValidation.py test 07 01 False False BF3nJJpJr6o664CWJKi1QRXjqeic2zRaaa</code></pre> <p><br></p> <p>For a more in depth example please refer to the <a href="https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py">Hasty Ogre Name Service contract code</a>.</p> <p><br></p> <p>If you found this tutorial helpful, please donate at:</p> <pre><code>NEO/GAS/NEP5 tokens: AR8rRBxgWw5siKsp1dUmfTLy6QQTjcqoqB<br> ETH/ERC20 tokens: 0x575970777095575fDd12d9cD3B105b41D8DD1344<br> NANO/XRB: xrb_3rpmim57tqbrb8hhjfzm1x5uk135yhmgqoj7j7wsufpo53e3ad5k93ggy1cd<br> LTC: M8nZ7FwJXSMAkAfiGmTKjbB7MWpdwsp52d<br> BTC: 3LcA1ztxFjghexRNWPyGXA59VFU3gF4PTz<br> BCH: 1LXLiF7SjWGday6gm61hzbYHKbSAMevwXo</code></pre> </html>
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","dapps"],"image":["https://giphy.com/gifs/dpNuOoVHLscZq?utm_source=iframe&utm_medium=embed&utm_campaign=Embeds&utm_term=https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%3A%2F%2Fgiphy.com%2Fembed%2FdpNuOoVHLscZq%2Ftwitter%2Fiframe&%3Burl=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&%3Bimage=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&%3Bkey=a19fcc184b9711e1b4764040d3dc5c07&%3Btype=text%2Fhtml&%3Bschema=giphy","https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif","https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png"],"links":["https://youtu.be/L0al2gttTEs","https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contract-caller-validation
titleNEO Smart Contract: Caller Validation
Transaction InfoBlock #20384318/Trx 35dd1b5e2a0a629d8222f346ed37cf0381c85bee
View Raw JSON Data
{
  "block": 20384318,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "<html>\n<p>In many, if not all cases, you will probably be wanting to validate whether the address invoking your contract code is really who they say they are.</p>\n<p><img src=\"https://giphy.com/gifs/dpNuOoVHLscZq?utm_source=iframe&amp;utm_medium=embed&amp;utm_campaign=Embeds&amp;utm_term=https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%3A%2F%2Fgiphy.com%2Fembed%2FdpNuOoVHLscZq%2Ftwitter%2Fiframe&amp;%3Burl=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&amp;%3Bimage=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&amp;%3Bkey=a19fcc184b9711e1b4764040d3dc5c07&amp;%3Btype=text%2Fhtml&amp;%3Bschema=giphy\"/><img src=\"https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif\" width=\"295\" height=\"250\"/></p>\n<p>Thankfully we are provided with the following validation method:</p>\n<pre><code>boa.blockchain.vm.Neo.Runtime.CheckWitness</code></pre>\n<p><br>\nThis method accepts a single parameter which represents the address that you would like to validate against the address used to invoke the contract code.The provided input value can be in any of the following formats which can be used to identify the caller address:</p>\n<pre><code>#\\xba\\'\\x03\\xc52c\\xe8\\xd6\\xe5\"\\xdc2 39\\xdc\\xd8\\xee\\xe9<br>\n<br>\nAK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y<br>\n<br>\n031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a</code></pre>\n<p><br></p>\n<p>These can all be found in the neo-python cli when running the command:</p>\n<pre><code>wallet</code></pre>\n<p><br></p>\n<p><img src=\"https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png\" width=\"1000\" height=\"686\"/></p>\n<p><br></p>\n<p>In order to test this out, we can use the following sample contract code:</p>\n<pre><code>from boa.blockchain.vm.Neo.Runtime import CheckWitness<br>\n<br>\ndef Main(caller):<br>\n<br>\n &nbsp;&nbsp;isCaller = CheckWitness(caller)<br>\n<br>\n &nbsp;&nbsp;if isCaller:<br>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return True<br>\n<br>\n &nbsp;&nbsp;return False</code></pre>\n<p><br></p>\n<p>This will simply validate whether the provided input for <em><strong>caller</strong></em> matches the address that was used to invoke the contract.From our neo-python cli, we can use any of the following queries to test this out using our <a href=\"https://youtu.be/L0al2gttTEs\">build &amp; test method</a>.Address:</p>\n<pre><code>build smartContracts/callerValidation.py test 07 01 False False AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y</code></pre>\n<p><br></p>\n<p>Public key:</p>\n<pre><code>build smartContracts/callerValidation.py test 07 01 False False 031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a</code></pre>\n<p><br></p>\n<p>Script hash of the address:</p>\n<pre><code>build smartContracts/callerValidation.py test 07 01 False False #\\xba\\'\\x03\\xc52c\\xe8\\xd6\\xe5\"\\xdc2 39\\xdc\\xd8\\xee\\xe9</code></pre>\n<p><br></p>\n<p>Running these should all result in true if you are running on the main wallet provided for the private net. If you are running your own instance or calling from another wallet simply copy the desired value from the result of the <em><strong>wallet</strong></em> command. If you run a test execution with a value that is not your wallet, the execution will return <em><strong>False</strong></em>. For example:</p>\n<pre><code>build smartContracts/callerValidation.py test 07 01 False False BF3nJJpJr6o664CWJKi1QRXjqeic2zRaaa</code></pre>\n<p><br></p>\n<p>For a more in depth example please refer to the <a href=\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\">Hasty Ogre Name Service contract code</a>.</p>\n<p><br></p>\n<p>If you found this tutorial helpful, please donate at:</p>\n<pre><code>NEO/GAS/NEP5 tokens: AR8rRBxgWw5siKsp1dUmfTLy6QQTjcqoqB<br>\nETH/ERC20 tokens: 0x575970777095575fDd12d9cD3B105b41D8DD1344<br>\nNANO/XRB: xrb_3rpmim57tqbrb8hhjfzm1x5uk135yhmgqoj7j7wsufpo53e3ad5k93ggy1cd<br>\nLTC: M8nZ7FwJXSMAkAfiGmTKjbB7MWpdwsp52d<br>\nBTC: 3LcA1ztxFjghexRNWPyGXA59VFU3gF4PTz<br>\nBCH: 1LXLiF7SjWGday6gm61hzbYHKbSAMevwXo</code></pre>\n</html>",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"dapps\"],\"image\":[\"https://giphy.com/gifs/dpNuOoVHLscZq?utm_source=iframe&utm_medium=embed&utm_campaign=Embeds&utm_term=https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%3A%2F%2Fgiphy.com%2Fembed%2FdpNuOoVHLscZq%2Ftwitter%2Fiframe&%3Burl=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&%3Bimage=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdpNuOoVHLscZq%2Fgiphy.gif&%3Bkey=a19fcc184b9711e1b4764040d3dc5c07&%3Btype=text%2Fhtml&%3Bschema=giphy\",\"https://media.giphy.com/media/dpNuOoVHLscZq/giphy.gif\",\"https://cdn-images-1.medium.com/max/1000/1*sXbvSxMIcqdMaWuXt-vPsg.png\"],\"links\":[\"https://youtu.be/L0al2gttTEs\",\"https://github.com/nickfujita/hasty-ogre-name-service/blob/master/smartContract/hons-ico.py\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contract-caller-validation",
      "title": "NEO Smart Contract: Caller Validation"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-04T15:47:00",
  "trx_id": "35dd1b5e2a0a629d8222f346ed37cf0381c85bee",
  "trx_in_block": 48,
  "virtual_op": 0
}
2018/03/01 16:14:54
authoriamonuwa
bodyMore posts please!!!
json metadata{"tags":["neo"],"app":"steemit/0.1"}
parent authorz0yo
parent permlinkneo-smart-contracts-tutorial-helloworld
permlinkre-z0yo-neo-smart-contracts-tutorial-helloworld-20180301t160721208z
title
Transaction InfoBlock #20298513/Trx d42562942fb17ba472c9f6582c18dc232d8cab2d
View Raw JSON Data
{
  "block": 20298513,
  "op": [
    "comment",
    {
      "author": "iamonuwa",
      "body": "More posts please!!!",
      "json_metadata": "{\"tags\":[\"neo\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "z0yo",
      "parent_permlink": "neo-smart-contracts-tutorial-helloworld",
      "permlink": "re-z0yo-neo-smart-contracts-tutorial-helloworld-20180301t160721208z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-01T16:14:54",
  "trx_id": "d42562942fb17ba472c9f6582c18dc232d8cab2d",
  "trx_in_block": 22,
  "virtual_op": 0
}
2018/03/01 16:14:39
authorz0yo
permlinkneo-smart-contracts-tutorial-helloworld
voteriamonuwa
weight10000 (100.00%)
Transaction InfoBlock #20298508/Trx a568072c2485e0649f7d04707a42861f7da5426c
View Raw JSON Data
{
  "block": 20298508,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-tutorial-helloworld",
      "voter": "iamonuwa",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-03-01T16:14:39",
  "trx_id": "a568072c2485e0649f7d04707a42861f7da5426c",
  "trx_in_block": 5,
  "virtual_op": 0
}
2018/02/22 17:31:21
authorkern.pro
bodyThanks, but if I copy the HTML form my editor, it says I have to remove the spans... and it generates a lot fo spans... so won't update it anymore :D
json metadata{"tags":["neo"],"app":"steemit/0.1"}
parent authorz0yo
parent permlinkre-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t024234785z
permlinkre-z0yo-re-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t173122864z
title
Transaction InfoBlock #20098655/Trx 26239a6bd4953274397c8d91d6f91015e7819036
View Raw JSON Data
{
  "block": 20098655,
  "op": [
    "comment",
    {
      "author": "kern.pro",
      "body": "Thanks, but if I copy the HTML form my editor, it says I have to remove the spans... and it generates a lot fo spans... so won't update it anymore :D",
      "json_metadata": "{\"tags\":[\"neo\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "z0yo",
      "parent_permlink": "re-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t024234785z",
      "permlink": "re-z0yo-re-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t173122864z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T17:31:21",
  "trx_id": "26239a6bd4953274397c8d91d6f91015e7819036",
  "trx_in_block": 50,
  "virtual_op": 0
}
2018/02/22 17:30:39
authorz0yo
permlinkre-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t024234785z
voterkern.pro
weight10000 (100.00%)
Transaction InfoBlock #20098641/Trx e0e3ab29e9e8d124dd40b62cb52d81cb14e8976a
View Raw JSON Data
{
  "block": 20098641,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "re-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t024234785z",
      "voter": "kern.pro",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T17:30:39",
  "trx_id": "e0e3ab29e9e8d124dd40b62cb52d81cb14e8976a",
  "trx_in_block": 16,
  "virtual_op": 0
}
2018/02/22 08:53:39
authorz0yo
permlinkneo-development-tutorials
voterkern.pro
weight10000 (100.00%)
Transaction InfoBlock #20088301/Trx eb4cf045ce9976dc09565973aa47d14cb2628967
View Raw JSON Data
{
  "block": 20088301,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-development-tutorials",
      "voter": "kern.pro",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T08:53:39",
  "trx_id": "eb4cf045ce9976dc09565973aa47d14cb2628967",
  "trx_in_block": 36,
  "virtual_op": 0
}
z0yofollowed @kern.pro
2018/02/22 04:39:24
idfollow
json["follow",{"follower":"z0yo","following":"kern.pro","what":["blog"]}]
required auths[]
required posting auths["z0yo"]
Transaction InfoBlock #20083217/Trx d021c3af6a05ddf27041fe7a988a964911aab454
View Raw JSON Data
{
  "block": 20083217,
  "op": [
    "custom_json",
    {
      "id": "follow",
      "json": "[\"follow\",{\"follower\":\"z0yo\",\"following\":\"kern.pro\",\"what\":[\"blog\"]}]",
      "required_auths": [],
      "required_posting_auths": [
        "z0yo"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T04:39:24",
  "trx_id": "d021c3af6a05ddf27041fe7a988a964911aab454",
  "trx_in_block": 46,
  "virtual_op": 0
}
2018/02/22 03:37:09
authorz0yo
permlinkneo-development-tutorials
votergoose412
weight10000 (100.00%)
Transaction InfoBlock #20081972/Trx 1cf166f37ddedc0191a696658498214ec6f688f6
View Raw JSON Data
{
  "block": 20081972,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-development-tutorials",
      "voter": "goose412",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:37:09",
  "trx_id": "1cf166f37ddedc0191a696658498214ec6f688f6",
  "trx_in_block": 15,
  "virtual_op": 0
}
2018/02/22 03:16:39
authorz0yo
permlinkneo-smart-contracts-build-and-test
voterz0yo
weight10000 (100.00%)
Transaction InfoBlock #20081563/Trx 170399f0ad1f07a6fd0f4bc15cfcad134b24dc2a
View Raw JSON Data
{
  "block": 20081563,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-build-and-test",
      "voter": "z0yo",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:16:39",
  "trx_id": "170399f0ad1f07a6fd0f4bc15cfcad134b24dc2a",
  "trx_in_block": 18,
  "virtual_op": 0
}
2018/02/22 03:16:36
authorz0yo
permlinkneo-smart-contracts-workflow-improvements
voterz0yo
weight10000 (100.00%)
Transaction InfoBlock #20081562/Trx 2e9032c04ac75f58c0f2718edd4de1d295031b01
View Raw JSON Data
{
  "block": 20081562,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-workflow-improvements",
      "voter": "z0yo",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:16:36",
  "trx_id": "2e9032c04ac75f58c0f2718edd4de1d295031b01",
  "trx_in_block": 63,
  "virtual_op": 0
}
2018/02/22 03:15:39
authorz0yo
permlinkneo-development-tutorials
voterz0yo
weight10000 (100.00%)
Transaction InfoBlock #20081543/Trx 99ddec60c529da6db0a5fa41760448c7f6b504a6
View Raw JSON Data
{
  "block": 20081543,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-development-tutorials",
      "voter": "z0yo",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:15:39",
  "trx_id": "99ddec60c529da6db0a5fa41760448c7f6b504a6",
  "trx_in_block": 26,
  "virtual_op": 0
}
z0yopublished a new post: neo-development-tutorials
2018/02/22 03:15:24
authorz0yo
body@@ -1,15 +1,122 @@ %3Chtml%3E%0A +%3Cp%3E%3Cimg src=%22https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png%22 width=%22455%22 height=%22195%22/%3E%3C/p%3E%0A %3Cp%3EThis
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","tutorials"],"image":["https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png","https://img.youtube.com/vi/WBNzb_XwhBM/0.jpg","https://img.youtube.com/vi/IzIlLS9bWM0/0.jpg"],"links":["https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas","https://www.youtube.com/embed/WBNzb_XwhBM?rel=0&showinfo=0","https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld","https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&showinfo=0","https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test","https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-development-tutorials
titleNEO Development Tutorials
Transaction InfoBlock #20081538/Trx 2a6a9ae044312465556b22151b98a917d7b141d4
View Raw JSON Data
{
  "block": 20081538,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "@@ -1,15 +1,122 @@\n %3Chtml%3E%0A\n+%3Cp%3E%3Cimg src=%22https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png%22 width=%22455%22 height=%22195%22/%3E%3C/p%3E%0A\n %3Cp%3EThis \n",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"tutorials\"],\"image\":[\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\",\"https://img.youtube.com/vi/WBNzb_XwhBM/0.jpg\",\"https://img.youtube.com/vi/IzIlLS9bWM0/0.jpg\"],\"links\":[\"https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas\",\"https://www.youtube.com/embed/WBNzb_XwhBM?rel=0&showinfo=0\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld\",\"https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&showinfo=0\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-development-tutorials",
      "title": "NEO Development Tutorials"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:15:24",
  "trx_id": "2a6a9ae044312465556b22151b98a917d7b141d4",
  "trx_in_block": 16,
  "virtual_op": 0
}
z0yopublished a new post: neo-development-tutorials
2018/02/22 03:13:51
authorz0yo
body@@ -179,24 +179,202 @@ t-w-gas%3C/p%3E%0A +%3Ciframe width=%22560%22 height=%22315%22 src=%22https://www.youtube.com/embed/WBNzb_XwhBM?rel=0&amp;showinfo=0%22 frameborder=%220%22 allow=%22autoplay; encrypted-media%22 allowfullscreen%3E%3C/iframe%3E%0A %3Ch1%3EHello Wo
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","tutorials"],"image":["https://img.youtube.com/vi/WBNzb_XwhBM/0.jpg","https://img.youtube.com/vi/IzIlLS9bWM0/0.jpg"],"links":["https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas","https://www.youtube.com/embed/WBNzb_XwhBM?rel=0&showinfo=0","https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld","https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&showinfo=0","https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test","https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-development-tutorials
titleNEO Development Tutorials
Transaction InfoBlock #20081507/Trx ec1595e74edabd30b4b1328377ff45c1c4e45c09
View Raw JSON Data
{
  "block": 20081507,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "@@ -179,24 +179,202 @@\n t-w-gas%3C/p%3E%0A\n+%3Ciframe width=%22560%22 height=%22315%22 src=%22https://www.youtube.com/embed/WBNzb_XwhBM?rel=0&amp;showinfo=0%22 frameborder=%220%22 allow=%22autoplay; encrypted-media%22 allowfullscreen%3E%3C/iframe%3E%0A\n %3Ch1%3EHello Wo\n",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"tutorials\"],\"image\":[\"https://img.youtube.com/vi/WBNzb_XwhBM/0.jpg\",\"https://img.youtube.com/vi/IzIlLS9bWM0/0.jpg\"],\"links\":[\"https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas\",\"https://www.youtube.com/embed/WBNzb_XwhBM?rel=0&showinfo=0\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld\",\"https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&showinfo=0\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-development-tutorials",
      "title": "NEO Development Tutorials"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:13:51",
  "trx_id": "ec1595e74edabd30b4b1328377ff45c1c4e45c09",
  "trx_in_block": 2,
  "virtual_op": 0
}
z0yopublished a new post: neo-development-tutorials
2018/02/22 03:12:48
authorz0yo
body<html> <p>This is a evolving list of tutorials on development for the NEO ecosystem</p> <h1>Dev Environment Setup</h1> <p>https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas</p> <h1>Hello World Smart Contract</h1> <p>https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld</p> <iframe width="560" height="315" src="https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> <h1>Smart Contract: Build &amp; Test</h1> <p>https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test</p> <h1>NEO Smart Contracts: Workflow Improvements</h1> <p>https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements</p> </html>
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","tutorials"],"image":["https://img.youtube.com/vi/IzIlLS9bWM0/0.jpg"],"links":["https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas","https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld","https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&showinfo=0","https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test","https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-development-tutorials
titleNEO Development Tutorials
Transaction InfoBlock #20081486/Trx cf3cac7c7a7465940672efe3c56d97499c622bde
View Raw JSON Data
{
  "block": 20081486,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "<html>\n<p>This is a evolving list of tutorials on development for the NEO ecosystem</p>\n<h1>Dev Environment Setup</h1>\n<p>https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas</p>\n<h1>Hello World Smart Contract</h1>\n<p>https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld</p>\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&amp;showinfo=0\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen></iframe>\n<h1>Smart Contract: Build &amp; Test</h1>\n<p>https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test</p>\n<h1>NEO Smart Contracts: Workflow Improvements</h1>\n<p>https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements</p>\n</html>",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"tutorials\"],\"image\":[\"https://img.youtube.com/vi/IzIlLS9bWM0/0.jpg\"],\"links\":[\"https://steemit.com/neo/@z0yo/quick-setup-neo-private-net-w-gas\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-tutorial-helloworld\",\"https://www.youtube.com/embed/IzIlLS9bWM0?rel=0&showinfo=0\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-build-and-test\",\"https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-development-tutorials",
      "title": "NEO Development Tutorials"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:12:48",
  "trx_id": "cf3cac7c7a7465940672efe3c56d97499c622bde",
  "trx_in_block": 53,
  "virtual_op": 0
}
2018/02/22 03:07:30
authorlaza
permlinkre-z0yo-quick-setup-neo-private-net-w-gas-20180220t151855159z
voterz0yo
weight10000 (100.00%)
Transaction InfoBlock #20081380/Trx a0def1c11f1b514a689351ef02422214048d7413
View Raw JSON Data
{
  "block": 20081380,
  "op": [
    "vote",
    {
      "author": "laza",
      "permlink": "re-z0yo-quick-setup-neo-private-net-w-gas-20180220t151855159z",
      "voter": "z0yo",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:07:30",
  "trx_id": "a0def1c11f1b514a689351ef02422214048d7413",
  "trx_in_block": 10,
  "virtual_op": 0
}
2018/02/22 03:07:27
authorz0yo
bodyGlad you were able to get all set up! If you want to restart the container you can do the following: ``` docker ps ``` This will list all the active containers. Get the container id of the neo privnet, and remove it with: ``` docker rm {CONTAINER_ID} ``` If you are feeling extra fancy, you can checkout my other post on create bash scripts for these things ^^ https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements
json metadata{"tags":["neo"],"links":["https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements"],"app":"steemit/0.1"}
parent authorlaza
parent permlinkre-z0yo-quick-setup-neo-private-net-w-gas-20180220t151855159z
permlinkre-laza-re-z0yo-quick-setup-neo-private-net-w-gas-20180222t030727291z
title
Transaction InfoBlock #20081379/Trx 68ef1cd65a2dd4dc50c1f9648bc1570e883cb7e5
View Raw JSON Data
{
  "block": 20081379,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "Glad you were able to get all set up! If you want to restart the container you can do the following:\n```\ndocker ps\n```\nThis will list all the active containers. Get the container id of the neo privnet, and remove it with:\n```\ndocker rm {CONTAINER_ID}\n```\nIf you are feeling extra fancy, you can checkout my other post on create bash scripts for these things ^^\nhttps://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements",
      "json_metadata": "{\"tags\":[\"neo\"],\"links\":[\"https://steemit.com/neo/@z0yo/neo-smart-contracts-workflow-improvements\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "laza",
      "parent_permlink": "re-z0yo-quick-setup-neo-private-net-w-gas-20180220t151855159z",
      "permlink": "re-laza-re-z0yo-quick-setup-neo-private-net-w-gas-20180222t030727291z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T03:07:27",
  "trx_id": "68ef1cd65a2dd4dc50c1f9648bc1570e883cb7e5",
  "trx_in_block": 26,
  "virtual_op": 0
}
2018/02/22 02:42:33
authorz0yo
bodyCool writeup! You can switch from the markdown editor to raw html on the top right when editing, and delete the extra \<br\> tags
json metadata{"tags":["neo"],"app":"steemit/0.1"}
parent authorkern.pro
parent permlinkneon-js-calling-a-transaction-to-store-values-in-a-smart-contract
permlinkre-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t024234785z
title
Transaction InfoBlock #20080881/Trx f7af31e22a11340234e66b721206e06d82d1803c
View Raw JSON Data
{
  "block": 20080881,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "Cool writeup! You can switch from the markdown editor to raw html on the top right when editing, and delete the extra \\<br\\> tags",
      "json_metadata": "{\"tags\":[\"neo\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "kern.pro",
      "parent_permlink": "neon-js-calling-a-transaction-to-store-values-in-a-smart-contract",
      "permlink": "re-kernpro-neon-js-calling-a-transaction-to-store-values-in-a-smart-contract-20180222t024234785z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T02:42:33",
  "trx_id": "f7af31e22a11340234e66b721206e06d82d1803c",
  "trx_in_block": 42,
  "virtual_op": 0
}
2018/02/22 02:40:21
authorkern.pro
permlinkneon-js-calling-a-transaction-to-store-values-in-a-smart-contract
voterz0yo
weight10000 (100.00%)
Transaction InfoBlock #20080837/Trx 67b2b0679a7bfb7c3ec550d71e8b3e8b3a4d07c5
View Raw JSON Data
{
  "block": 20080837,
  "op": [
    "vote",
    {
      "author": "kern.pro",
      "permlink": "neon-js-calling-a-transaction-to-store-values-in-a-smart-contract",
      "voter": "z0yo",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-22T02:40:21",
  "trx_id": "67b2b0679a7bfb7c3ec550d71e8b3e8b3a4d07c5",
  "trx_in_block": 11,
  "virtual_op": 0
}
2018/02/20 15:18:54
authorlaza
bodyThanks, worked great. I'm going to try and learn all I can about this. What is the best way to stop the private net and the container? and how do I restart them another day? Please let me know if this is correct to shut it down; My guess is to use 'quit' to stop Neo in terminal, then 'exit' from neo-python, then click 'quit Docker' from the Docker app. Anything else?
json metadata{"tags":["neo"],"app":"steemit/0.1"}
parent authorz0yo
parent permlinkquick-setup-neo-private-net-w-gas
permlinkre-z0yo-quick-setup-neo-private-net-w-gas-20180220t151855159z
title
Transaction InfoBlock #20038416/Trx 29314e06e012c2960f520b88b9c0f8553caea141
View Raw JSON Data
{
  "block": 20038416,
  "op": [
    "comment",
    {
      "author": "laza",
      "body": "Thanks, worked great. I'm going to try and learn all I  can about this.\nWhat is the best way to stop the private net and the container?\nand how do I restart them another day?\n\nPlease let me know if this is correct to shut it down;\nMy guess is to use 'quit' to stop Neo in terminal, then 'exit' from neo-python,  then click 'quit Docker' from the Docker app.\nAnything else?",
      "json_metadata": "{\"tags\":[\"neo\"],\"app\":\"steemit/0.1\"}",
      "parent_author": "z0yo",
      "parent_permlink": "quick-setup-neo-private-net-w-gas",
      "permlink": "re-z0yo-quick-setup-neo-private-net-w-gas-20180220t151855159z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-20T15:18:54",
  "trx_id": "29314e06e012c2960f520b88b9c0f8553caea141",
  "trx_in_block": 44,
  "virtual_op": 0
}
slimt623upvoted (100.00%) @z0yo / byneinqj
2018/02/20 07:58:21
authorz0yo
permlinkbyneinqj
voterslimt623
weight10000 (100.00%)
Transaction InfoBlock #20029605/Trx 481e4b785d6dc0f1fdd17d04797fe607bf1ac040
View Raw JSON Data
{
  "block": 20029605,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "byneinqj",
      "voter": "slimt623",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-20T07:58:21",
  "trx_id": "481e4b785d6dc0f1fdd17d04797fe607bf1ac040",
  "trx_in_block": 12,
  "virtual_op": 0
}
2018/02/19 19:10:27
authorz0yo
permlinkneo-smart-contracts-tutorial-helloworld
voterslimt623
weight10000 (100.00%)
Transaction InfoBlock #20014260/Trx 0ba7f6aef7b45b616bf52e05cfbf6bfb8f0e3b46
View Raw JSON Data
{
  "block": 20014260,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-tutorial-helloworld",
      "voter": "slimt623",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-19T19:10:27",
  "trx_id": "0ba7f6aef7b45b616bf52e05cfbf6bfb8f0e3b46",
  "trx_in_block": 16,
  "virtual_op": 0
}
z0yoreceived 0.128 SBD, 0.038 SP author reward for @z0yo / xttjczn1
2018/02/19 08:30:45
authorz0yo
permlinkxttjczn1
sbd payout0.128 SBD
steem payout0.000 STEEM
vesting payout61.322772 VESTS
Transaction InfoBlock #20001477/Virtual Operation #17
View Raw JSON Data
{
  "block": 20001477,
  "op": [
    "author_reward",
    {
      "author": "z0yo",
      "permlink": "xttjczn1",
      "sbd_payout": "0.128 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "61.322772 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-19T08:30:45",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 17
}
dtubereceived 0.024 SP benefactor reward from @z0yo
2018/02/19 08:30:45
authorz0yo
benefactordtube
permlinkxttjczn1
sbd payout0.000 SBD
steem payout0.000 STEEM
vesting payout38.837756 VESTS
Transaction InfoBlock #20001477/Virtual Operation #16
View Raw JSON Data
{
  "block": 20001477,
  "op": [
    "comment_benefactor_reward",
    {
      "author": "z0yo",
      "benefactor": "dtube",
      "permlink": "xttjczn1",
      "sbd_payout": "0.000 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "38.837756 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-19T08:30:45",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 16
}
2018/02/19 04:48:15
authorz0yo
permlinkquick-setup-neo-private-net-w-gas
voterfollowjrb
weight10000 (100.00%)
Transaction InfoBlock #19997028/Trx 7b8771ea92afd7605da4b32afec12d298cfacd90
View Raw JSON Data
{
  "block": 19997028,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "quick-setup-neo-private-net-w-gas",
      "voter": "followjrb",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-19T04:48:15",
  "trx_id": "7b8771ea92afd7605da4b32afec12d298cfacd90",
  "trx_in_block": 26,
  "virtual_op": 0
}
2018/02/19 04:47:51
authorz0yo
permlinkneo-smart-contracts-tutorial-helloworld
voterfollowjrb
weight10000 (100.00%)
Transaction InfoBlock #19997020/Trx 4f321891bbcf7a76996877a0d5a0eb6965d020fe
View Raw JSON Data
{
  "block": 19997020,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-tutorial-helloworld",
      "voter": "followjrb",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-19T04:47:51",
  "trx_id": "4f321891bbcf7a76996877a0d5a0eb6965d020fe",
  "trx_in_block": 44,
  "virtual_op": 0
}
z0yoreceived 0.116 SBD, 0.034 SP author reward for @z0yo / byneinqj
2018/02/18 11:22:51
authorz0yo
permlinkbyneinqj
sbd payout0.116 SBD
steem payout0.000 STEEM
vesting payout55.193065 VESTS
Transaction InfoBlock #19976121/Virtual Operation #16
View Raw JSON Data
{
  "block": 19976121,
  "op": [
    "author_reward",
    {
      "author": "z0yo",
      "permlink": "byneinqj",
      "sbd_payout": "0.116 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "55.193065 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-18T11:22:51",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 16
}
dtubereceived 0.021 SP benefactor reward from @z0yo
2018/02/18 11:22:51
authorz0yo
benefactordtube
permlinkbyneinqj
sbd payout0.000 SBD
steem payout0.000 STEEM
vesting payout34.751189 VESTS
Transaction InfoBlock #19976121/Virtual Operation #15
View Raw JSON Data
{
  "block": 19976121,
  "op": [
    "comment_benefactor_reward",
    {
      "author": "z0yo",
      "benefactor": "dtube",
      "permlink": "byneinqj",
      "sbd_payout": "0.000 SBD",
      "steem_payout": "0.000 STEEM",
      "vesting_payout": "34.751189 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-18T11:22:51",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": 15
}
2018/02/16 19:29:57
authorz0yo
permlinkneo-smart-contracts-workflow-improvements
voteremelyanov
weight10000 (100.00%)
Transaction InfoBlock #19928282/Trx aaee31be0367e83e6665c6000f108e8406d2d928
View Raw JSON Data
{
  "block": 19928282,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-workflow-improvements",
      "voter": "emelyanov",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-16T19:29:57",
  "trx_id": "aaee31be0367e83e6665c6000f108e8406d2d928",
  "trx_in_block": 42,
  "virtual_op": 0
}
2018/02/16 19:29:48
authorz0yo
permlinkneo-smart-contracts-workflow-improvements
voterreginafadeev
weight10000 (100.00%)
Transaction InfoBlock #19928279/Trx f743376f40394d3da651860342dc40d89578954f
View Raw JSON Data
{
  "block": 19928279,
  "op": [
    "vote",
    {
      "author": "z0yo",
      "permlink": "neo-smart-contracts-workflow-improvements",
      "voter": "reginafadeev",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-16T19:29:48",
  "trx_id": "f743376f40394d3da651860342dc40d89578954f",
  "trx_in_block": 27,
  "virtual_op": 0
}
2018/02/16 17:21:21
authorz0yo
body@@ -3261,16 +3261,25 @@ e False +sunshine %5B'hello' @@ -3310,25 +3310,16 @@ things'%5D - sunshine %3C/code%3E%3C
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency"],"image":["https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png"],"links":["https://youtu.be/IzIlLS9bWM0","https://youtu.be/WBNzb_XwhBM","http://docs.neo.org/en-us/sc/tutorial/Parameter.html"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contracts-build-and-test
titleNEO Smart Contracts: Build & Test
Transaction InfoBlock #19925711/Trx f32e1ee9003d9eed9ba965c5f52dceae4a958d16
View Raw JSON Data
{
  "block": 19925711,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "@@ -3261,16 +3261,25 @@\n e False \n+sunshine \n %5B'hello'\n@@ -3310,25 +3310,16 @@\n things'%5D\n- sunshine\n %3C/code%3E%3C\n",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\"],\"image\":[\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\"],\"links\":[\"https://youtu.be/IzIlLS9bWM0\",\"https://youtu.be/WBNzb_XwhBM\",\"http://docs.neo.org/en-us/sc/tutorial/Parameter.html\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contracts-build-and-test",
      "title": "NEO Smart Contracts: Build & Test"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-16T17:21:21",
  "trx_id": "f32e1ee9003d9eed9ba965c5f52dceae4a958d16",
  "trx_in_block": 21,
  "virtual_op": 0
}
2018/02/16 08:56:45
authorz0yo
body<html> <p><img src="https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png" width="455" height="195"/></p> <p>In this post I'll be going over a couple of quick setup tips that can help to save you time by improving your dev setup workflow.</p> <p>If you haven't already already gone though the hello world and the dev environment setup tutorials, I'd suggest you quickly run through those before continuing with this post.</p> <p><a href="https://youtu.be/IzIlLS9bWM0">Hello World Smart Contract Tutorial</a></p> <p><a href="https://youtu.be/WBNzb_XwhBM">Dev Environment Setup Tutorial</a></p> <p>Let's face it, carpal tunnel is real, and as much as I want you to come back and ready my blog posts, it's more important that you have a fast and efficient workflow with minimal friction between you and your contract code.</p> <p><img src="https://i.imgur.com/GSlAc5D.png" width="1194" height="593"/></p> <h1>Bash Scripts</h1> <p>This is where bash scripts can come in handy. If you haven't used them before, they are just shortcuts in the terminal that we can use to refer to larger commands. We can edit the list of these in out <code>~/.bashrc</code> files in our root directories, both on local machine in in our docker container.</p> <h2>Local Machine</h2> <p>To access your <code>.bashrc</code> on your local computer you can open it at the root with your favorite text editor. In my case it will be:</p> <pre><code>atom ~/.bashrc</code></pre> <p><br></p> <p>Here we can add our alias commands. The first one is for spinning up the docker container. While this is commonly done once, you will eventually run out of gas, and have to recreate the container. As such, having this on hand will have you a trip to the interwebs to copy pasta.</p> <pre><code>alias neodocker="docker run -d --name neo-privnet-with-gas -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp -v ~/Documents/smartContracts:/opt/neo-python/smartContracts metachris/neo-privnet-with-gas"</code></pre> <p><br></p> <p>It's important to note that this is a bit modified from the version found in the dev environment setup tutorial. Since it is now a part of our bashrc, we need to update the volume reference path to our local directory that we will be sharing. In my case, it was updated from <code>"$(pwd)"</code> to <code>~/Documents/smartContracts</code></p> <p><br></p> <p>The next alias is a short cut for when you need to SSH into your docker container.</p> <pre><code>alias neossh="docker exec -it neo-privnet-with-gas /bin/bash"</code></pre> <p><br></p> <p>Now on our local machine we can simply use the calls <code>neodocker</code> to spin up the container if it's not already created, and <code>neossh</code> to jack in. Since recreting the container is very much less common, you will probably just be using <code>neossh</code> for the majority of the time.</p> <h2>Docker Container</h2> <p>Within the container we can edit the bashrc file at the root in command line, or simply create one in the shared folder on our local machine and copy it over.</p> <p>Once running <code>neossh</code>, you will be placed in the root directory of the docker container, but most of the fun happens in the <code>opt/neo-python</code> directory. This command gets you from root to fun times in 4 chars.</p> <pre><code>alias cdnp='cd opt/neo-python'</code></pre> <p><br></p> <p>Once in the neo-python directory, we always want to quickly jump into our neo-python cli. With this command we can now do so by just typing <code>neocli</code></p> <pre><code>alias neocli='python3 prompt.py -c protocol.privnet.json'</code></pre> <h1>Preset Docker Image</h1> <p>If you are too lazy to set up the bashrc commands in the docker container, you are in luck. I made a docker image of my own which is exactly the same as <a href="https://hub.docker.com/r/metachris/neo-privnet-with-gas/">neo-privnet-with-gas</a>, but with these queries already setup for you~!</p> <p><a href="https://hub.docker.com/r/nickfujita/neo-privnet-plus/">neo-privnet-plus</a></p> <p>As an added bonus, I've also pre-downloaded the main.wallet file from the s3 bucket into the docker container neo-python folder. Saves you one more step when recreating your docker container.</p> <p><img src="https://media.giphy.com/media/xT8qBp0R5SxfLMIgjC/giphy.gif" width="480" height="266"/></p> <p><br></p> <p>In the case that you do choose to use this alternative, please make sure that you go back and update your bash scripts on your local machine to the following:</p> <p>neodocker</p> <pre><code>alias neodocker="docker run -d --name neo-privnet-plus -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp -v ~/Documents/smartContracts:/opt/neo-python/smartContracts nickfujita/neo-privnet-plus"</code></pre> <p><br></p> <p>neossh</p> <pre><code>alias neossh="docker exec -it neo-privnet-plus /bin/bash"</code></pre> <p><br></p> <p>I you use this alternative docker image, and you dont go back and update your saved queries or bashrc...</p> <p><img src="https://steemitimages.com/DQmTSz4VopvAks3sGRfwc3vmVvbCXJ8skZB3DfmJsjZyytT/image.png" width="450" height="375"/></p> <p><br></p> <h1>General Docker Scripts</h1> <p>Here are a couple other random docker commands that I use:</p> <pre><code>alias dps="docker ps"</code></pre> <pre><code>alias dpsa="docker ps -a"</code></pre> <p><br></p> <p>Please use the following 2 with caution, because you WILL close containers that you didn't mean to if you are not careful</p> <pre><code>drmfa () {<br> &nbsp;docker rm -f $(docker ps -aq)<br> }</code></pre> <p><br></p> <p>Called with <code>drmf {container_id}</code></p> <pre><code>drmf () {<br> &nbsp;docker rm -f "$1"<br> }</code></pre> <p><br></p> <p>Lastly, if you don't like the abbreviations for any of the commands, the greatest part is that since they are all in your bashrc files, you are free to update them to w/e works best for you.</p> <p>Once you get all these set up, you should be flying around the terminal like a mad man, and will have no excuses to not get straight to work on your contract code, like I am doing right now by writing this post :p</p> <p><br></p> <p>If you found this tutorial helpful, please donate at:</p> <pre><code>NEO/GAS/NEP5 tokens: AR8rRBxgWw5siKsp1dUmfTLy6QQTjcqoqB<br> ETH/ERC20 tokens: 0x575970777095575fDd12d9cD3B105b41D8DD1344<br> NANO/XRB: xrb_3rpmim57tqbrb8hhjfzm1x5uk135yhmgqoj7j7wsufpo53e3ad5k93ggy1cd<br> LTC: M8nZ7FwJXSMAkAfiGmTKjbB7MWpdwsp52d<br> BTC: 3LcA1ztxFjghexRNWPyGXA59VFU3gF4PTz<br> BCH: 1LXLiF7SjWGday6gm61hzbYHKbSAMevwXo</code></pre> </html>
json metadata{"tags":["neo","smartcontracts","python","cryptocurrency","bash"],"image":["https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png","https://i.imgur.com/GSlAc5D.png","https://media.giphy.com/media/xT8qBp0R5SxfLMIgjC/giphy.gif","https://steemitimages.com/DQmTSz4VopvAks3sGRfwc3vmVvbCXJ8skZB3DfmJsjZyytT/image.png"],"links":["https://youtu.be/IzIlLS9bWM0","https://youtu.be/WBNzb_XwhBM","https://hub.docker.com/r/metachris/neo-privnet-with-gas/","https://hub.docker.com/r/nickfujita/neo-privnet-plus/"],"app":"steemit/0.1","format":"html"}
parent author
parent permlinkneo
permlinkneo-smart-contracts-workflow-improvements
titleNEO Smart Contracts: Workflow Improvements
Transaction InfoBlock #19915629/Trx 1e86d3cee40a957ff70b06835a1788371ac5207b
View Raw JSON Data
{
  "block": 19915629,
  "op": [
    "comment",
    {
      "author": "z0yo",
      "body": "<html>\n<p><img src=\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\" width=\"455\" height=\"195\"/></p>\n<p>In this post I'll be going over a couple of quick setup tips that can help to save you time by improving your dev setup workflow.</p>\n<p>If you haven't already already gone though the hello world and the dev environment setup tutorials, I'd suggest you quickly run through those before continuing with this post.</p>\n<p><a href=\"https://youtu.be/IzIlLS9bWM0\">Hello World Smart Contract Tutorial</a></p>\n<p><a href=\"https://youtu.be/WBNzb_XwhBM\">Dev Environment Setup Tutorial</a></p>\n<p>Let's face it, carpal tunnel is real, and as much as I want you to come back and ready my blog posts, it's more important that you have a fast and efficient workflow with minimal friction between you and your contract code.</p>\n<p><img src=\"https://i.imgur.com/GSlAc5D.png\" width=\"1194\" height=\"593\"/></p>\n<h1>Bash Scripts</h1>\n<p>This is where bash scripts can come in handy. If you haven't used them before, they are just shortcuts in the terminal that we can use to refer to larger commands. We can edit the list of these in out <code>~/.bashrc</code> files in our root directories, both on local machine in in our docker container.</p>\n<h2>Local Machine</h2>\n<p>To access your <code>.bashrc</code> on your local computer you can open it at the root with your favorite text editor. In my case it will be:</p>\n<pre><code>atom ~/.bashrc</code></pre>\n<p><br></p>\n<p>Here we can add our alias commands. The first one is for spinning up the docker container. While this is commonly done once, you will eventually run out of gas, and have to recreate the container. As such, having this on hand will have you a trip to the interwebs to copy pasta.</p>\n<pre><code>alias neodocker=\"docker run -d --name neo-privnet-with-gas -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp -v ~/Documents/smartContracts:/opt/neo-python/smartContracts metachris/neo-privnet-with-gas\"</code></pre>\n<p><br></p>\n<p>It's important to note that this is a bit modified from the version found in the dev environment setup tutorial. Since it is now a part of our bashrc, we need to update the volume reference path to our local directory that we will be sharing. In my case, it was updated from <code>\"$(pwd)\"</code> to <code>~/Documents/smartContracts</code></p>\n<p><br></p>\n<p>The next alias is a short cut for when you need to SSH into your docker container.</p>\n<pre><code>alias neossh=\"docker exec -it neo-privnet-with-gas /bin/bash\"</code></pre>\n<p><br></p>\n<p>Now on our local machine we can simply use the calls <code>neodocker</code> to spin up the container if it's not already created, and <code>neossh</code> to jack in. Since recreting the container is very much less common, you will probably just be using <code>neossh</code> for the majority of the time.</p>\n<h2>Docker Container</h2>\n<p>Within the container we can edit the bashrc file at the root in command line, or simply create one in the shared folder on our local machine and copy it over.</p>\n<p>Once running <code>neossh</code>, you will be placed in the root directory of the docker container, but most of the fun happens in the <code>opt/neo-python</code> directory. This command gets you from root to fun times in 4 chars.</p>\n<pre><code>alias cdnp='cd opt/neo-python'</code></pre>\n<p><br></p>\n<p>Once in the neo-python directory, we always want to quickly jump into our neo-python cli. With this command we can now do so by just typing <code>neocli</code></p>\n<pre><code>alias neocli='python3 prompt.py -c protocol.privnet.json'</code></pre>\n<h1>Preset Docker Image</h1>\n<p>If you are too lazy to set up the bashrc commands in the docker container, you are in luck. I made a docker image of my own which is exactly the same as <a href=\"https://hub.docker.com/r/metachris/neo-privnet-with-gas/\">neo-privnet-with-gas</a>, but with these queries already setup for you~!</p>\n<p><a href=\"https://hub.docker.com/r/nickfujita/neo-privnet-plus/\">neo-privnet-plus</a></p>\n<p>As an added bonus, I've also pre-downloaded the main.wallet file from the s3 bucket into the docker container neo-python folder. Saves you one more step when recreating your docker container.</p>\n<p><img src=\"https://media.giphy.com/media/xT8qBp0R5SxfLMIgjC/giphy.gif\" width=\"480\" height=\"266\"/></p>\n<p><br></p>\n<p>In the case that you do choose to use this alternative, please make sure that you go back and update your bash scripts on your local machine to the following:</p>\n<p>neodocker</p>\n<pre><code>alias neodocker=\"docker run -d --name neo-privnet-plus -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp -v ~/Documents/smartContracts:/opt/neo-python/smartContracts nickfujita/neo-privnet-plus\"</code></pre>\n<p><br></p>\n<p>neossh</p>\n<pre><code>alias neossh=\"docker exec -it neo-privnet-plus /bin/bash\"</code></pre>\n<p><br></p>\n<p>I you use this alternative docker image, and you dont go back and update your saved queries or bashrc...</p>\n<p><img src=\"https://steemitimages.com/DQmTSz4VopvAks3sGRfwc3vmVvbCXJ8skZB3DfmJsjZyytT/image.png\" width=\"450\" height=\"375\"/></p>\n<p><br></p>\n<h1>General Docker Scripts</h1>\n<p>Here are a couple other random docker commands that I use:</p>\n<pre><code>alias dps=\"docker ps\"</code></pre>\n<pre><code>alias dpsa=\"docker ps -a\"</code></pre>\n<p><br></p>\n<p>Please use the following 2 with caution, because you WILL close containers that you didn't mean to if you are not careful</p>\n<pre><code>drmfa () {<br>\n &nbsp;docker rm -f $(docker ps -aq)<br>\n}</code></pre>\n<p><br></p>\n<p>Called with <code>drmf {container_id}</code></p>\n<pre><code>drmf () {<br>\n &nbsp;docker rm -f \"$1\"<br>\n}</code></pre>\n<p><br></p>\n<p>Lastly, if you don't like the abbreviations for any of the commands, the greatest part is that since they are all in your bashrc files, you are free to update them to w/e works best for you.</p>\n<p>Once you get all these set up, you should be flying around the terminal like a mad man, and will have no excuses to not get straight to work on your contract code, like I am doing right now by writing this post :p</p>\n<p><br></p>\n<p>If you found this tutorial helpful, please donate at:</p>\n<pre><code>NEO/GAS/NEP5 tokens: AR8rRBxgWw5siKsp1dUmfTLy6QQTjcqoqB<br>\nETH/ERC20 tokens: 0x575970777095575fDd12d9cD3B105b41D8DD1344<br>\nNANO/XRB: xrb_3rpmim57tqbrb8hhjfzm1x5uk135yhmgqoj7j7wsufpo53e3ad5k93ggy1cd<br>\nLTC: M8nZ7FwJXSMAkAfiGmTKjbB7MWpdwsp52d<br>\nBTC: 3LcA1ztxFjghexRNWPyGXA59VFU3gF4PTz<br>\nBCH: 1LXLiF7SjWGday6gm61hzbYHKbSAMevwXo</code></pre>\n</html>",
      "json_metadata": "{\"tags\":[\"neo\",\"smartcontracts\",\"python\",\"cryptocurrency\",\"bash\"],\"image\":[\"https://steemitimages.com/0x0/https://i.imgur.com/3qlNu5a.png\",\"https://i.imgur.com/GSlAc5D.png\",\"https://media.giphy.com/media/xT8qBp0R5SxfLMIgjC/giphy.gif\",\"https://steemitimages.com/DQmTSz4VopvAks3sGRfwc3vmVvbCXJ8skZB3DfmJsjZyytT/image.png\"],\"links\":[\"https://youtu.be/IzIlLS9bWM0\",\"https://youtu.be/WBNzb_XwhBM\",\"https://hub.docker.com/r/metachris/neo-privnet-with-gas/\",\"https://hub.docker.com/r/nickfujita/neo-privnet-plus/\"],\"app\":\"steemit/0.1\",\"format\":\"html\"}",
      "parent_author": "",
      "parent_permlink": "neo",
      "permlink": "neo-smart-contracts-workflow-improvements",
      "title": "NEO Smart Contracts: Workflow Improvements"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2018-02-16T08:56:45",
  "trx_id": "1e86d3cee40a957ff70b06835a1788371ac5207b",
  "trx_in_block": 3,
  "virtual_op": 0
}

Account Metadata

POSTING JSON METADATA
profile{"name":"Nick Fujita","profile_image":"https://i.imgur.com/u8lh19n.jpg"}
JSON METADATA
profile{"name":"Nick Fujita","profile_image":"https://i.imgur.com/u8lh19n.jpg"}
{
  "posting_json_metadata": {
    "profile": {
      "name": "Nick Fujita",
      "profile_image": "https://i.imgur.com/u8lh19n.jpg"
    }
  },
  "json_metadata": {
    "profile": {
      "name": "Nick Fujita",
      "profile_image": "https://i.imgur.com/u8lh19n.jpg"
    }
  }
}

Auth Keys

Owner
Single Signature
Public Keys
STM6ZmLBPNwZSNFuudHxeo4nXGntuR563FFo25qSzcAGV6pnMCDyM1/1
Active
Single Signature
Public Keys
STM6CJ6zn18p1ARcZvyhHraWJqgEeEPsGG9fSa18aTbwYELZUaAox1/1
Posting
Single Signature
Public Keys
STM8KqbX1RA3szc7KqtLNGwwcYN6YXUmZMccA7hCwvBw8ZcwFAVSY1/1
App Permissions
Memo
STM6BbccdpZ5texPMT5GsRRyffMPnQa2Uufni7u3UBeKCuXauYRpL
{
  "owner": {
    "account_auths": [],
    "key_auths": [
      [
        "STM6ZmLBPNwZSNFuudHxeo4nXGntuR563FFo25qSzcAGV6pnMCDyM",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "active": {
    "account_auths": [],
    "key_auths": [
      [
        "STM6CJ6zn18p1ARcZvyhHraWJqgEeEPsGG9fSa18aTbwYELZUaAox",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "posting": {
    "account_auths": [
      [
        "dtube.app",
        1
      ]
    ],
    "key_auths": [
      [
        "STM8KqbX1RA3szc7KqtLNGwwcYN6YXUmZMccA7hCwvBw8ZcwFAVSY",
        1
      ]
    ],
    "weight_threshold": 1
  },
  "memo": "STM6BbccdpZ5texPMT5GsRRyffMPnQa2Uufni7u3UBeKCuXauYRpL"
}

Witness Votes

0 / 30
No active witness votes.
[]