Ecoer Logo

@pangol

42

프로그래머 활동가

steemit.com/@pangol
VOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS72.34%
Net Worth
3.567USD
STEEM
0.654STEEM
SBD
6.828SBD
Effective Power
5.406SP
├── Own SP
4.343SP
└── Incoming Deleg
+1.063SP

Detailed Balance

STEEM
balance
0.654STEEM
market_balance
0.000STEEM
savings_balance
0.000STEEM
reward_steem_balance
0.000STEEM
STEEM POWER
Own SP
4.343SP
Delegated Out
0.000SP
Delegation In
1.063SP
Effective Power
5.406SP
Reward SP (pending)
0.000SP
SBD
sbd_balance
6.828SBD
sbd_conversions
0.000SBD
sbd_market_balance
0.000SBD
savings_sbd_balance
0.000SBD
reward_sbd_balance
0.000SBD
{
  "balance": "0.654 STEEM",
  "savings_balance": "0.000 STEEM",
  "reward_steem_balance": "0.000 STEEM",
  "vesting_shares": "7063.808649 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "1728.630060 VESTS",
  "sbd_balance": "6.828 SBD",
  "savings_sbd_balance": "0.000 SBD",
  "reward_sbd_balance": "0.000 SBD",
  "conversions": []
}

Account Info

namepangol
id728377
rank216,734
reputation72137360941
created2018-02-06T03:45:15
recovery_accountsteem
proxyNone
post_count176
comment_count0
lifetime_vote_count0
witnesses_voted_for0
last_post2018-08-02T01:56:15
last_root_post2018-08-02T01:56:15
last_vote_time2019-03-15T03:48:03
proxied_vsf_votes0, 0, 0, 0
can_vote1
voting_power0
delayed_votes0
balance0.654 STEEM
savings_balance0.000 STEEM
sbd_balance6.828 SBD
savings_sbd_balance0.000 SBD
vesting_shares7063.808649 VESTS
delegated_vesting_shares0.000000 VESTS
received_vesting_shares1728.630060 VESTS
reward_vesting_balance0.000000 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_update2018-02-07T03:36:45
last_account_update2018-04-19T01:40:27
minedNo
sbd_seconds4,568,266,836
sbd_last_interest_payment2018-08-02T07:13:42
savings_sbd_last_interest_payment1970-01-01T00:00:00
{
  "id": 728377,
  "name": "pangol",
  "owner": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM8Qdm82i3txQFUPFf7JHGT5cv8dcqPRUGwDTpZMgiAFiu2F3mrD",
        1
      ]
    ]
  },
  "active": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM6HKW1ZpAHTCr8cHAmjtvLbGH8TwJM1Pq3pXfkmb9pgq7z9bkNs",
        1
      ]
    ]
  },
  "posting": {
    "weight_threshold": 1,
    "account_auths": [
      [
        "busy.app",
        1
      ],
      [
        "dtube.app",
        1
      ],
      [
        "utopian.app",
        1
      ]
    ],
    "key_auths": [
      [
        "STM5fYg1UoGobb5Cym354g3k228Y8s4XxX9YHw4kzDNuDUrzoj3rj",
        1
      ]
    ]
  },
  "memo_key": "STM6M9NnwRM4xpGEqoAX3WNS6ZgX2QtMH6GYWNvhBBCTBqbzeCUT6",
  "json_metadata": "{\"profile\":{\"name\":\"켄타\",\"about\":\"프로그래머 활동가\",\"location\":\"대한민국\",\"profile_image\":\"https://i.imgur.com/q9w4FgI.png\",\"website\":\"\"}}",
  "posting_json_metadata": "{\"profile\":{\"name\":\"켄타\",\"about\":\"프로그래머 활동가\",\"location\":\"대한민국\",\"profile_image\":\"https://i.imgur.com/q9w4FgI.png\",\"website\":\"\"}}",
  "proxy": "",
  "last_owner_update": "2018-02-07T03:36:45",
  "last_account_update": "2018-04-19T01:40:27",
  "created": "2018-02-06T03:45:15",
  "mined": false,
  "recovery_account": "steem",
  "last_account_recovery": "1970-01-01T00:00:00",
  "reset_account": "null",
  "comment_count": 0,
  "lifetime_vote_count": 0,
  "post_count": 176,
  "can_vote": true,
  "voting_manabar": {
    "current_mana": "8792438709",
    "last_update_time": 1708650447
  },
  "downvote_manabar": {
    "current_mana": 2198109677,
    "last_update_time": 1708650447
  },
  "voting_power": 0,
  "balance": "0.654 STEEM",
  "savings_balance": "0.000 STEEM",
  "sbd_balance": "6.828 SBD",
  "sbd_seconds": "4568266836",
  "sbd_seconds_last_update": "2018-08-10T01:43:51",
  "sbd_last_interest_payment": "2018-08-02T07:13:42",
  "savings_sbd_balance": "0.000 SBD",
  "savings_sbd_seconds": "0",
  "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
  "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_withdraw_requests": 0,
  "reward_sbd_balance": "0.000 SBD",
  "reward_steem_balance": "0.000 STEEM",
  "reward_vesting_balance": "0.000000 VESTS",
  "reward_vesting_steem": "0.000 STEEM",
  "vesting_shares": "7063.808649 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "1728.630060 VESTS",
  "vesting_withdraw_rate": "0.000000 VESTS",
  "next_vesting_withdrawal": "1969-12-31T23:59:59",
  "withdrawn": 0,
  "to_withdraw": 0,
  "withdraw_routes": 0,
  "curation_rewards": 11,
  "posting_rewards": 5824,
  "proxied_vsf_votes": [
    0,
    0,
    0,
    0
  ],
  "witnesses_voted_for": 0,
  "last_post": "2018-08-02T01:56:15",
  "last_root_post": "2018-08-02T01:56:15",
  "last_vote_time": "2019-03-15T03:48:03",
  "post_bandwidth": 0,
  "pending_claimed_accounts": 0,
  "vesting_balance": "0.000 STEEM",
  "reputation": "72137360941",
  "transfer_history": [],
  "market_history": [],
  "post_history": [],
  "vote_history": [],
  "other_history": [],
  "witness_votes": [],
  "tags_usage": [],
  "guest_bloggers": [],
  "rank": 216734
}

Withdraw Routes

IncomingOutgoing
Empty
Empty
{
  "incoming": [],
  "outgoing": []
}
From Date
To Date
steemdelegated 1.063 SP to @pangol
2024/02/23 01:07:27
delegatorsteem
delegateepangol
vesting shares1728.630060 VESTS
Transaction InfoBlock #82751126/Trx af4f2689a6aba4b6ee339ba4138bc3a31f538d65
View Raw JSON Data
{
  "trx_id": "af4f2689a6aba4b6ee339ba4138bc3a31f538d65",
  "block": 82751126,
  "trx_in_block": 4,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2024-02-23T01:07:27",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "1728.630060 VESTS"
    }
  ]
}
steemdelegated 1.169 SP to @pangol
2022/11/03 16:25:30
delegatorsteem
delegateepangol
vesting shares1901.500524 VESTS
Transaction InfoBlock #69118901/Trx 7f60bd5650cd07631de57e9cb4eebf48991c8cea
View Raw JSON Data
{
  "trx_id": "7f60bd5650cd07631de57e9cb4eebf48991c8cea",
  "block": 69118901,
  "trx_in_block": 4,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2022-11-03T16:25:30",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "1901.500524 VESTS"
    }
  ]
}
steemdelegated 1.304 SP to @pangol
2022/01/17 21:45:51
delegatorsteem
delegateepangol
vesting shares2121.608125 VESTS
Transaction InfoBlock #60822316/Trx 684af5946bcdfa8ea25cc678962aceedd4119c85
View Raw JSON Data
{
  "trx_id": "684af5946bcdfa8ea25cc678962aceedd4119c85",
  "block": 60822316,
  "trx_in_block": 11,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2022-01-17T21:45:51",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "2121.608125 VESTS"
    }
  ]
}
steemdelegated 1.418 SP to @pangol
2021/06/14 05:00:12
delegatorsteem
delegateepangol
vesting shares2305.802413 VESTS
Transaction InfoBlock #54612714/Trx 870a8e4ab34d2967f9b080a7b1f3aa29cc1f505b
View Raw JSON Data
{
  "trx_id": "870a8e4ab34d2967f9b080a7b1f3aa29cc1f505b",
  "block": 54612714,
  "trx_in_block": 4,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2021-06-14T05:00:12",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "2305.802413 VESTS"
    }
  ]
}
steemdelegated 1.533 SP to @pangol
2020/12/11 15:13:39
delegatorsteem
delegateepangol
vesting shares2493.224387 VESTS
Transaction InfoBlock #49360016/Trx 2bd1deb8ee6126e3f9a4d9c5f7237ef42e26b4ba
View Raw JSON Data
{
  "trx_id": "2bd1deb8ee6126e3f9a4d9c5f7237ef42e26b4ba",
  "block": 49360016,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-12-11T15:13:39",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "2493.224387 VESTS"
    }
  ]
}
steemdelegated 1.176 SP to @pangol
2020/12/06 08:49:51
delegatorsteem
delegateepangol
vesting shares1912.543513 VESTS
Transaction InfoBlock #49211549/Trx 31d90342ba2a14a4ab4fd4e254bb0fee80a43ccf
View Raw JSON Data
{
  "trx_id": "31d90342ba2a14a4ab4fd4e254bb0fee80a43ccf",
  "block": 49211549,
  "trx_in_block": 8,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-12-06T08:49:51",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "1912.543513 VESTS"
    }
  ]
}
steemdelegated 1.537 SP to @pangol
2020/12/05 18:51:24
delegatorsteem
delegateepangol
vesting shares2499.432241 VESTS
Transaction InfoBlock #49195097/Trx a14ab7fde975d8affc9a01498b36c4207434d685
View Raw JSON Data
{
  "trx_id": "a14ab7fde975d8affc9a01498b36c4207434d685",
  "block": 49195097,
  "trx_in_block": 15,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-12-05T18:51:24",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "2499.432241 VESTS"
    }
  ]
}
steemdelegated 1.180 SP to @pangol
2020/11/03 00:08:36
delegatorsteem
delegateepangol
vesting shares1920.017158 VESTS
Transaction InfoBlock #48267813/Trx c7685f16c593ee92386f086088d6cab71b1b4e74
View Raw JSON Data
{
  "trx_id": "c7685f16c593ee92386f086088d6cab71b1b4e74",
  "block": 48267813,
  "trx_in_block": 3,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-11-03T00:08:36",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "1920.017158 VESTS"
    }
  ]
}
steemdelegated 1.661 SP to @pangol
2020/05/09 09:51:24
delegatorsteem
delegateepangol
vesting shares2702.237600 VESTS
Transaction InfoBlock #43221858/Trx 09aa66e2a70a96284ff9d138408737a933930145
View Raw JSON Data
{
  "trx_id": "09aa66e2a70a96284ff9d138408737a933930145",
  "block": 43221858,
  "trx_in_block": 0,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-05-09T09:51:24",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "2702.237600 VESTS"
    }
  ]
}
steemdelegated 1.201 SP to @pangol
2020/05/08 14:04:42
delegatorsteem
delegateepangol
vesting shares1953.311140 VESTS
Transaction InfoBlock #43198684/Trx 428f50cda640b33256840b7ba0c1ce7ee26fd704
View Raw JSON Data
{
  "trx_id": "428f50cda640b33256840b7ba0c1ce7ee26fd704",
  "block": 43198684,
  "trx_in_block": 27,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-05-08T14:04:42",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "1953.311140 VESTS"
    }
  ]
}
2020/02/06 04:41:45
parent authorpangol
parent permlinkdapp-7-truffle
authorsteemitboard
permlinksteemitboard-notify-pangol-20200206t044144000z
title
bodyCongratulations @pangol! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@pangol/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/@pangol) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=pangol)_</sub> **Do not miss the last post from @steemitboard:** <table><tr><td><a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-ranking-update-a-better-rich-list-comparator"><img src="https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png"></a></td><td><a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-ranking-update-a-better-rich-list-comparator">SteemitBoard Ranking update - A better rich list comparator</a></td></tr></table> ###### [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"]}
Transaction InfoBlock #40572694/Trx 48bfbb36c81090266a950ca4e3544e5279104dca
View Raw JSON Data
{
  "trx_id": "48bfbb36c81090266a950ca4e3544e5279104dca",
  "block": 40572694,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2020-02-06T04:41:45",
  "op": [
    "comment",
    {
      "parent_author": "pangol",
      "parent_permlink": "dapp-7-truffle",
      "author": "steemitboard",
      "permlink": "steemitboard-notify-pangol-20200206t044144000z",
      "title": "",
      "body": "Congratulations @pangol! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@pangol/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/@pangol) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=pangol)_</sub>\n\n\n**Do not miss the last post from @steemitboard:**\n<table><tr><td><a href=\"https://steemit.com/steemitboard/@steemitboard/steemitboard-ranking-update-a-better-rich-list-comparator\"><img src=\"https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmfRVpHQhLDhnjDtqck8GPv9NPvNKPfMsDaAFDE1D9Er2Z/header_ranking.png\"></a></td><td><a href=\"https://steemit.com/steemitboard/@steemitboard/steemitboard-ranking-update-a-better-rich-list-comparator\">SteemitBoard Ranking update - A better rich list comparator</a></td></tr></table>\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\"]}"
    }
  ]
}
2019/11/01 01:04:06
voterseongyeolpark
authorpangol
permlinkdapp-2-geth-private-network
weight10000 (100.00%)
Transaction InfoBlock #37780078/Trx d48b0feeb5f58901c2bb78d11a0bc3c1735a2dab
View Raw JSON Data
{
  "trx_id": "d48b0feeb5f58901c2bb78d11a0bc3c1735a2dab",
  "block": 37780078,
  "trx_in_block": 6,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-11-01T01:04:06",
  "op": [
    "vote",
    {
      "voter": "seongyeolpark",
      "author": "pangol",
      "permlink": "dapp-2-geth-private-network",
      "weight": 10000
    }
  ]
}
seongyeolparkupvoted (100.00%) @pangol / dapp-1-geth
2019/10/30 05:59:09
voterseongyeolpark
authorpangol
permlinkdapp-1-geth
weight10000 (100.00%)
Transaction InfoBlock #37728480/Trx 08c8f5fca7ac651b3c3a35eedff50717ad4338d5
View Raw JSON Data
{
  "trx_id": "08c8f5fca7ac651b3c3a35eedff50717ad4338d5",
  "block": 37728480,
  "trx_in_block": 22,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-10-30T05:59:09",
  "op": [
    "vote",
    {
      "voter": "seongyeolpark",
      "author": "pangol",
      "permlink": "dapp-1-geth",
      "weight": 10000
    }
  ]
}
dtubesent 0.001 STEEM to @pangol- "Time is running out, claim your DTube account now before anyone else can! Login at https://d.tube"
2019/08/22 16:20:27
fromdtube
topangol
amount0.001 STEEM
memoTime is running out, claim your DTube account now before anyone else can! Login at https://d.tube
Transaction InfoBlock #35779618/Trx 942036cfe542e043a667d0e2912840651ef0b517
View Raw JSON Data
{
  "trx_id": "942036cfe542e043a667d0e2912840651ef0b517",
  "block": 35779618,
  "trx_in_block": 39,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-08-22T16:20:27",
  "op": [
    "transfer",
    {
      "from": "dtube",
      "to": "pangol",
      "amount": "0.001 STEEM",
      "memo": "Time is running out, claim your DTube account now before anyone else can! Login at https://d.tube"
    }
  ]
}
steemdelegated 1.778 SP to @pangol
2019/06/14 05:11:12
delegatorsteem
delegateepangol
vesting shares2891.874214 VESTS
Transaction InfoBlock #33783319/Trx 48c8305b607ff35f611e0357c5ec593281d511f6
View Raw JSON Data
{
  "trx_id": "48c8305b607ff35f611e0357c5ec593281d511f6",
  "block": 33783319,
  "trx_in_block": 11,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-06-14T05:11:12",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "2891.874214 VESTS"
    }
  ]
}
steemdetectivesent 0.001 STEEM to @pangol- "Hy @pangol check out https://steemdetective.com"
2019/04/09 12:12:42
fromsteemdetective
topangol
amount0.001 STEEM
memoHy @pangol check out https://steemdetective.com
Transaction InfoBlock #31893607/Trx 02c3e133fd4701662f015c89ee57a8a39122e59e
View Raw JSON Data
{
  "trx_id": "02c3e133fd4701662f015c89ee57a8a39122e59e",
  "block": 31893607,
  "trx_in_block": 29,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-04-09T12:12:42",
  "op": [
    "transfer",
    {
      "from": "steemdetective",
      "to": "pangol",
      "amount": "0.001 STEEM",
      "memo": "Hy @pangol check out https://steemdetective.com"
    }
  ]
}
steemdelegated 14.117 SP to @pangol
2019/03/15 05:35:33
delegatorsteem
delegateepangol
vesting shares22961.098959 VESTS
Transaction InfoBlock #31166508/Trx 4fd0d96f29d350ccc815af2152e7d4bc5c5e6745
View Raw JSON Data
{
  "trx_id": "4fd0d96f29d350ccc815af2152e7d4bc5c5e6745",
  "block": 31166508,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-03-15T05:35:33",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "22961.098959 VESTS"
    }
  ]
}
pangolupvoted (100.00%) @abcteacher / 6cshfo
2019/03/15 03:48:03
voterpangol
authorabcteacher
permlink6cshfo
weight10000 (100.00%)
Transaction InfoBlock #31164358/Trx 394f68dc499c61075bf1de588f58edff6db05acd
View Raw JSON Data
{
  "trx_id": "394f68dc499c61075bf1de588f58edff6db05acd",
  "block": 31164358,
  "trx_in_block": 5,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-03-15T03:48:03",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "abcteacher",
      "permlink": "6cshfo",
      "weight": 10000
    }
  ]
}
2019/02/06 05:26:54
parent authorpangol
parent permlinkdapp-7-truffle
authorsteemitboard
permlinksteemitboard-notify-pangol-20190206t052653000z
title
bodyCongratulations @pangol! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@pangol/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table> <sub>_[Click here to view your Board](https://steemitboard.com/@pangol)_</sub> > 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"]}
Transaction InfoBlock #30101487/Trx 5c3f5bc7862945d129a497b71feb85e3dea0cb98
View Raw JSON Data
{
  "trx_id": "5c3f5bc7862945d129a497b71feb85e3dea0cb98",
  "block": 30101487,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-02-06T05:26:54",
  "op": [
    "comment",
    {
      "parent_author": "pangol",
      "parent_permlink": "dapp-7-truffle",
      "author": "steemitboard",
      "permlink": "steemitboard-notify-pangol-20190206t052653000z",
      "title": "",
      "body": "Congratulations @pangol! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@pangol/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table>\n\n<sub>_[Click here to view your Board](https://steemitboard.com/@pangol)_</sub>\n\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\"]}"
    }
  ]
}
steemdelegated 1.827 SP to @pangol
2019/01/28 16:32:45
delegatorsteem
delegateepangol
vesting shares2970.855260 VESTS
Transaction InfoBlock #29855826/Trx 1cfe8ec914790d096c330c29b135dd504570bb26
View Raw JSON Data
{
  "trx_id": "1cfe8ec914790d096c330c29b135dd504570bb26",
  "block": 29855826,
  "trx_in_block": 7,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2019-01-28T16:32:45",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "2970.855260 VESTS"
    }
  ]
}
steemdelegated 14.215 SP to @pangol
2018/12/11 10:50:03
delegatorsteem
delegateepangol
vesting shares23121.078545 VESTS
Transaction InfoBlock #28467745/Trx c1d9a3aa6566744346c7637a5c8474d23ba06a42
View Raw JSON Data
{
  "trx_id": "c1d9a3aa6566744346c7637a5c8474d23ba06a42",
  "block": 28467745,
  "trx_in_block": 0,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-12-11T10:50:03",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "23121.078545 VESTS"
    }
  ]
}
pangolupvoted (100.00%) @kilu83 / 3np2k6-cosint
2018/10/29 11:09:00
voterpangol
authorkilu83
permlink3np2k6-cosint
weight10000 (100.00%)
Transaction InfoBlock #27230467/Trx f76fc54db1709cf291c922e8130e741d35e35eaa
View Raw JSON Data
{
  "trx_id": "f76fc54db1709cf291c922e8130e741d35e35eaa",
  "block": 27230467,
  "trx_in_block": 20,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-10-29T11:09:00",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "kilu83",
      "permlink": "3np2k6-cosint",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @osyvv / 17-5-2018-10-19
2018/10/19 04:39:36
voterpangol
authorosyvv
permlink17-5-2018-10-19
weight10000 (100.00%)
Transaction InfoBlock #26934886/Trx bd0b1b7d40077b735870096809382b2539691f7e
View Raw JSON Data
{
  "trx_id": "bd0b1b7d40077b735870096809382b2539691f7e",
  "block": 26934886,
  "trx_in_block": 8,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-10-19T04:39:36",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "osyvv",
      "permlink": "17-5-2018-10-19",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @ericahan / tasteem-d11c3f
2018/10/19 04:38:51
voterpangol
authorericahan
permlinktasteem-d11c3f
weight10000 (100.00%)
Transaction InfoBlock #26934871/Trx 8c9a0abdb71c7e4cb89fbc240675032cd71ec3e6
View Raw JSON Data
{
  "trx_id": "8c9a0abdb71c7e4cb89fbc240675032cd71ec3e6",
  "block": 26934871,
  "trx_in_block": 2,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-10-19T04:38:51",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "ericahan",
      "permlink": "tasteem-d11c3f",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @osyvv / 4
2018/09/17 06:45:39
voterpangol
authorosyvv
permlink4
weight10000 (100.00%)
Transaction InfoBlock #26032207/Trx 2b042c6d025789b74168271c6e23c4480f7bc458
View Raw JSON Data
{
  "trx_id": "2b042c6d025789b74168271c6e23c4480f7bc458",
  "block": 26032207,
  "trx_in_block": 13,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-09-17T06:45:39",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "osyvv",
      "permlink": "4",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @osyvv / mp-nia-2018-8-16
2018/08/16 01:28:36
voterpangol
authorosyvv
permlinkmp-nia-2018-8-16
weight10000 (100.00%)
Transaction InfoBlock #25104676/Trx bdfc7453872fe4f90484f7e8fcaac53051befef8
View Raw JSON Data
{
  "trx_id": "bdfc7453872fe4f90484f7e8fcaac53051befef8",
  "block": 25104676,
  "trx_in_block": 6,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-16T01:28:36",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "osyvv",
      "permlink": "mp-nia-2018-8-16",
      "weight": 10000
    }
  ]
}
steemdelegated 14.339 SP to @pangol
2018/08/10 04:34:36
delegatorsteem
delegateepangol
vesting shares23322.397297 VESTS
Transaction InfoBlock #24935650/Trx 33eb82c4571354436cb817e01ae82a355f6e2bbb
View Raw JSON Data
{
  "trx_id": "33eb82c4571354436cb817e01ae82a355f6e2bbb",
  "block": 24935650,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-10T04:34:36",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "23322.397297 VESTS"
    }
  ]
}
pangolclaimed reward balance: 0.272 STEEM, 0.024 SBD, 0.366 SP
2018/08/10 01:43:51
accountpangol
reward steem0.272 STEEM
reward sbd0.024 SBD
reward vests595.610174 VESTS
Transaction InfoBlock #24932236/Trx 7db7403486a58122b8d1ae450352b33cbdb8903d
View Raw JSON Data
{
  "trx_id": "7db7403486a58122b8d1ae450352b33cbdb8903d",
  "block": 24932236,
  "trx_in_block": 7,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-10T01:43:51",
  "op": [
    "claim_reward_balance",
    {
      "account": "pangol",
      "reward_steem": "0.272 STEEM",
      "reward_sbd": "0.024 SBD",
      "reward_vests": "595.610174 VESTS"
    }
  ]
}
pangolreceived 0.272 STEEM, 0.024 SBD, 0.366 SP author reward for @pangol / dapp-7-truffle
2018/08/09 01:56:15
authorpangol
permlinkdapp-7-truffle
sbd payout0.024 SBD
steem payout0.272 STEEM
vesting payout595.610174 VESTS
Transaction InfoBlock #24903690/Virtual Operation #11
View Raw JSON Data
{
  "trx_id": "0000000000000000000000000000000000000000",
  "block": 24903690,
  "trx_in_block": 4294967295,
  "op_in_trx": 0,
  "virtual_op": 11,
  "timestamp": "2018-08-09T01:56:15",
  "op": [
    "author_reward",
    {
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "sbd_payout": "0.024 SBD",
      "steem_payout": "0.272 STEEM",
      "vesting_payout": "595.610174 VESTS"
    }
  ]
}
2018/08/06 11:27:18
voterpangol
authorcodingart
permlink113-wemos-lolin-led-on-off
weight10000 (100.00%)
Transaction InfoBlock #24828755/Trx a84837ff5b424c3cb16d947d8ea4708d3b1075d5
View Raw JSON Data
{
  "trx_id": "a84837ff5b424c3cb16d947d8ea4708d3b1075d5",
  "block": 24828755,
  "trx_in_block": 11,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-06T11:27:18",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "codingart",
      "permlink": "113-wemos-lolin-led-on-off",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @donekim / a5odt
2018/08/06 07:26:00
voterpangol
authordonekim
permlinka5odt
weight10000 (100.00%)
Transaction InfoBlock #24823933/Trx 9804988dd768a079b58d869a095dcb4309fa6c02
View Raw JSON Data
{
  "trx_id": "9804988dd768a079b58d869a095dcb4309fa6c02",
  "block": 24823933,
  "trx_in_block": 2,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-06T07:26:00",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "donekim",
      "permlink": "a5odt",
      "weight": 10000
    }
  ]
}
2018/08/03 15:51:03
voterbrainstormot
authorpangol
permlinkdapp-7-truffle
weight10000 (100.00%)
Transaction InfoBlock #24747654/Trx 32a33f7b40bc17e39773cbfeefc5b632b78acc00
View Raw JSON Data
{
  "trx_id": "32a33f7b40bc17e39773cbfeefc5b632b78acc00",
  "block": 24747654,
  "trx_in_block": 6,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-03T15:51:03",
  "op": [
    "vote",
    {
      "voter": "brainstormot",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "weight": 10000
    }
  ]
}
frontalnhupvoted (10.00%) @pangol / dapp-7-truffle
2018/08/02 11:01:03
voterfrontalnh
authorpangol
permlinkdapp-7-truffle
weight1000 (10.00%)
Transaction InfoBlock #24713065/Trx a4e3e6f8468d0caeef9e4973e3fe15a63c954ce1
View Raw JSON Data
{
  "trx_id": "a4e3e6f8468d0caeef9e4973e3fe15a63c954ce1",
  "block": 24713065,
  "trx_in_block": 35,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T11:01:03",
  "op": [
    "vote",
    {
      "voter": "frontalnh",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "weight": 1000
    }
  ]
}
promotedpostsent 0.001 SBD to @pangol- "Hello, our user. We have created a system to deliver the article to more people. Resteem to 14.500+ Followers | @promotedpost Upvote ⏩(3500SP) | Upvote with min +200 Different account | Our post will ..."
2018/08/02 07:13:42
frompromotedpost
topangol
amount0.001 SBD
memoHello, our user. We have created a system to deliver the article to more people. Resteem to 14.500+ Followers | @promotedpost Upvote ⏩(3500SP) | Upvote with min +200 Different account | Our post will be more popular and you will find new friends | Send 1 SBD or 1 STEEM to @promotedpost (URL as memo) Service Active
Transaction InfoBlock #24708519/Trx e0f41067f14c3639f05b7d58ef608a3afb14a3b0
View Raw JSON Data
{
  "trx_id": "e0f41067f14c3639f05b7d58ef608a3afb14a3b0",
  "block": 24708519,
  "trx_in_block": 8,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T07:13:42",
  "op": [
    "transfer",
    {
      "from": "promotedpost",
      "to": "pangol",
      "amount": "0.001 SBD",
      "memo": "Hello, our user. We have created a system to deliver the article to more people. Resteem to 14.500+ Followers | @promotedpost Upvote ⏩(3500SP) | Upvote with min +200 Different account | Our post will be more popular and you will find new friends | Send 1 SBD or 1 STEEM to @promotedpost (URL as memo) Service Active"
    }
  ]
}
kdjupvoted (50.00%) @pangol / dapp-7-truffle
2018/08/02 06:46:00
voterkdj
authorpangol
permlinkdapp-7-truffle
weight5000 (50.00%)
Transaction InfoBlock #24707968/Trx 68d95bda0cdb31497dc839f42e3e82ca9348266e
View Raw JSON Data
{
  "trx_id": "68d95bda0cdb31497dc839f42e3e82ca9348266e",
  "block": 24707968,
  "trx_in_block": 4,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T06:46:00",
  "op": [
    "vote",
    {
      "voter": "kdj",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "weight": 5000
    }
  ]
}
mishanaupvoted (60.00%) @pangol / dapp-7-truffle
2018/08/02 02:33:54
votermishana
authorpangol
permlinkdapp-7-truffle
weight6000 (60.00%)
Transaction InfoBlock #24702926/Trx 287e643d02d03d2e12ddd6e9eec6ed0991606ddf
View Raw JSON Data
{
  "trx_id": "287e643d02d03d2e12ddd6e9eec6ed0991606ddf",
  "block": 24702926,
  "trx_in_block": 16,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T02:33:54",
  "op": [
    "vote",
    {
      "voter": "mishana",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "weight": 6000
    }
  ]
}
2018/08/02 02:32:33
votermagpielover
authorpangol
permlinkdapp-7-truffle
weight10000 (100.00%)
Transaction InfoBlock #24702899/Trx d55d77dfd39b9a1675a9ebafa598e063c24498bd
View Raw JSON Data
{
  "trx_id": "d55d77dfd39b9a1675a9ebafa598e063c24498bd",
  "block": 24702899,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T02:32:33",
  "op": [
    "vote",
    {
      "voter": "magpielover",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "weight": 10000
    }
  ]
}
wonsamaupvoted (1.00%) @pangol / dapp-7-truffle
2018/08/02 02:01:06
voterwonsama
authorpangol
permlinkdapp-7-truffle
weight100 (1.00%)
Transaction InfoBlock #24702270/Trx 7645bb245c2a6f84ad833dfaae27937d63538b24
View Raw JSON Data
{
  "trx_id": "7645bb245c2a6f84ad833dfaae27937d63538b24",
  "block": 24702270,
  "trx_in_block": 6,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T02:01:06",
  "op": [
    "vote",
    {
      "voter": "wonsama",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "weight": 100
    }
  ]
}
pangolupvoted (100.00%) @pangol / dapp-7-truffle
2018/08/02 01:56:15
voterpangol
authorpangol
permlinkdapp-7-truffle
weight10000 (100.00%)
Transaction InfoBlock #24702173/Trx 6387d8d5b0e7bedcd06828ae4da8e061aa52d5a3
View Raw JSON Data
{
  "trx_id": "6387d8d5b0e7bedcd06828ae4da8e061aa52d5a3",
  "block": 24702173,
  "trx_in_block": 24,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T01:56:15",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "weight": 10000
    }
  ]
}
pangolpublished a new post: dapp-7-truffle
2018/08/02 01:56:15
parent author
parent permlinkkr
authorpangol
permlinkdapp-7-truffle
title이더리움 Dapp 만들기 [7. Truffle 사용법]
body이더리움 dapp을 작성하고 사용하려면 컴파일하고 네트워크에 배포하고 배포된 컨트랙트와 연결해야하는 과정을 거치게 됩니다. 대략 solc를 사용해서 컴파일, 컴파일 된 파일에서 ABI 정보를 가져와서 geth에서 배포하고, 후에 컨트랙트 주소를 저장해두고 후에 사용할 때 주소를 통해서 접근하게 되죠. 실제로 개발을 해보면 보통 복잡한 게 아닙니다. 그래서 이러한 걸 해결해주는 프레임워크가 있습니다. 바로 트러플입니다. (https://truffleframework.com/) 트러플에서 제공하는 기능은 컨트랙트 컴파일, 배포, 디버그, 테스트를 제공합니다. 트러플을 사용해서 dapp을 개발하면 좀? 편해집니다. (과연 그럴까요?) 트러플을 사용하기 위해서는 NODE.JS가 설치되어 있어야 합니다. 노드 버전 5.0이상 설치되어 있어야 합니다. (NODE.JS 설치는 https://nodejs.org/en/ 에서 확인해보세요) 설치된 노드 버전 확인은 아래 명령어를 사용하면 됩니다. ``` node -v ``` ## 1. 트러플 설치하기 ``` npm install -g install ``` 트러플이 설치 되었으면 버전을 확인해보겠습니다. ``` truffle version ``` 설치된 트러플 버전과 솔리디티 컴파일 버전이 나옵니다. 설치 확인이 끝났으면 트러플 예제를 작성할 폴더를 하나 만들고 이동합니다. ``` mkdir truffle_exmple cd truffle_example ``` ## 2. 트러플 프로젝트 만들기 ``` truffle init ``` 트러플 초기화가 완료되면 contracts, test, migrations 폴더가 생성되고 truffle.js, truffle-config.js 가 생성됩니다. contracts 폴더에는 solidity언어로 작성한 컨트랙트들을 두는 곳입니다. test폴더에는 컨트랙트를 테스트할 때 사용하는 파일을 두는 곳입니다. migration 폴더에는 컴파일 후에 컨트랙트를 배포할 때 사용하는 파일을 두는 곳입니다. truffle.js는 트러플에서 컨트랙트를 배포할 네트워크 설정, 컴파일러 언어 설정 등 트러플과 관련된 설정을 하는 파일입니다. truffle-config.js 파일은 truffle.js를 설정할 예시를 보여주는 파일입니다. 트러플 설정을 할 때는 truffle.js를 사용한 다는 것 명심! ## 3. 트러플 설정하기 트러플에서 배포할 때 사용할 네트워크를 설정하겠습니다. truffle.js를 엽니다 ``` module.exports = { // See <http://truffleframework.com/docs/advanced/configuration> // to customize your Truffle configuration! networks: { development: { host: "localhost", port: "8545", network_id: "*", } } }; ``` networks에서 development로 네트워크를 설정하면 트러플 컴파일 하거나 배포를 할 때 —network를 옵션으로 지정해서 사용할 수 있습니다. (—network development) host와 port는 geth 실행 시에 설정한 rpc host와 port로 설정하면 됩니다. geth 실행 시에 지정을 하지 않았으면 기본으로 localhost, 8545로 설정됩니다. 잘 설정이 됐는지 연결이 잘 되는지 확인해보겠습니다. 트러플에서는 콘솔을 제공해서 네트워크 정보를 확인할 수 있습니다. ``` truffle console ``` 또는 ``` truffle console —network development ``` 로 접속을 합니다. (geth 이더리움 네트워크는 구동상태여야 합니다!) ``` web3.eth.coinbase ``` 로 명령어를 쳤을 때 geth에서 설정된 coinbase 주소가 나오면 잘 연결된겁니다. 연결이 확인됐다면 .exit를 입력해서 빠져나옵니다. ## 4. 컨트랙트 컴파일 트러플에서 컨트랙트를 컴파일 할 때 사용하는 명령어는 아래와 같습니다 ``` truffle compile ``` contracts/ 폴더 안에 들어있는 모든 파일이 컴파일이 진행됩니다. truffle init을 하고 contracts 폴더를 보면 Migration.sol 컨트랙트 파일이 있는 걸 확인할 수 있습니다. 해당 파일은 다른 컨트랙트들에 대한 배포정보를 가지고 있고 관리할 때 트러플이 사용하는 파일입니다. 절대 삭제하지 마시고 수정하지 말기를 권해드립니다. 자, 이제 컨트랙트를 컴파일 해보겠습니다. 이 전에 작성한 Simple.sol 파일을 contracts폴더에 작성합니다. ``` pragma solidity ^0.4.23; contract Simple { uint256 data; function set (uint256 _data)public { data = _data; } function get()public view returns(uint256){ return data; } } ``` ``` truffle compile ``` 명령어를 실행시킵니다. contracts폴더에 들어있는 파일들의 컴파일을 다 수행하고 build폴더를 만들고 해당 폴더에 컴파일이 완료된 정보가 담겨있는 파일들이 생성됩니다. (컨트랙트에 오류가 있으면 오류가 표시되고 종료됩니다.) build/contracts 폴더를 보면 json파일들이 생성된 걸 확인할 수 있습니다. json파일에는 컨트랙트의 ABI 정보, bytecode 등 배포때 필요한 정보가 들어있습니다. ## 5. 컨트랙트 배포하기 컨트랙트를 배포하기 위해서는 migrations폴더에 배포할 컨트랙트에 맞게 파일을 하나 작성해줘야 합니다. truffle init을 하면 migrations 폴더에 1_initial_migration.js 파일이 존재합니다. 해당 파일을 열어보면 ``` var Migrations = artifacts.require("./Migrations.sol"); module.exports = function(deployer) { deployer.deploy(Migrations); }; ``` Migration 컨트랙트를 배포하는 파일임을 확인할 수 있습니다. 컨트랙트를 배포하기 위해서는 artifacts.require()로 배포를 원하는 컨트랙트의 정보를 획득 한 후 deployer.deploy()를 사용해서 배포를 하는 과정임을 알 수 있습니다. 해당 파일도 삭제 또는 수정하지 않는 걸 권해드립니다. Simple.sol을 배포하기 위해서는 새로운 배포파일을 작성하면 됩니다. migrations 폴더에 2_deploy_contracts.js 를 생성합니다. 아래와 같이 작성합니다. ``` var Simple = artifacts.require("Simple"); module.exports = function(deployer) { deployer.deploy(Simple); }; ``` 자! 이제 배포해보겠습니다. (geth 실행 후에 miner.start()를 실행시켜서 마이닝을 활성화 시켜주세요!!!!) ``` truffle migrate ``` 성공적으로 작업이 완료되면 아래와 같은 문구가 나타납니다. ``` Using network 'development'. Running migration: 1_initial_migration.js Deploying Migrations... ... 0x966134b845d298f18406f8cd7051f4b81010cdc5f15d9b8b251c344fa3703e45 Migrations: 0x81a3bb2434d5064036f6fff4b3ef21a13d1cdb84 Saving successful migration to network... ... 0x0cd3a7043705d61e46783ff0cca339a6f1fc00f3654ddc4be22ef1c24715e35e Saving artifacts... Running migration: 2_deploy_contract.js Deploying Simple... ... 0x1209fd60a114e9231e838dc15e45f82c1361f4271828eb4eec02402268f8fd8d Simple: 0x996ba351a2cb36307c078360530ffe43655fd0b5 Saving successful migration to network... ... 0x88d7adb4bd53901e9db8c547982477b68a0bd8dc5697c7f565ac3bd743875e19 Saving artifacts... ``` 혹 배포가 잘 되지 않는다면 geth를 실행시킬 때, 어카운트의 락을 풀었는지 혹은 gas limit 에 걸리지 않았는지를 살펴보세요~ ## 6. 컨트랙트 사용하기 배포된 컨트랙를 사용해 보겠습니다. Simple 컨트랙트는 data에 수를 저장할 수 있는 set 함수와, data에 저장된 수를 반환하는 get함수가 있습니다. 트러플을 사용하지 않았을 때는 컨트랙트의 주소와 ABI를 매번 설정해줘야 하는 불편함이 있었죠. 하지만 트러플을 사용하면 그럴 필요가 없습니다. 먼저 트러플 콘솔상에서 컨트랙트를 사용해보겠습니다. ``` truffle console ``` 를 입력해서 트러플 콘솔로 들어갑니다. ``` Simple.deployed().then((instance)=>{return instance.get.call()}).then((result) => { data = result }); ``` 를 입력해서 data 변수에 컨트랙트에 저장된 값을 저장합니다. ``` data.toNumber() ``` 의 값이 0이 출력되면 성공!!!!!! Simple.deployed() 를 호출하면 배포된 Simple 컨트랙트의 객체가 반환됩니다. 해당 객체 를 instance 변수로 받고 get함수를 호출해서 컨트랙트에 저장된 변수의 값을 가져옵니다. 이렇게 배포된 컨트랙트를 사용할 때는 컨트랙트이름.deployed()를 사용한다는 점 기억하세요. 그러면 이 번에는 set함수를 사용해서 변수에 데이터를 저장해보겠습니다. ``` Simple.deployed().then((instance) => { return instance.set(100) }) ``` 제대로 수행이 되면 트랜젝션 관련 정보가 출력된답니다. 그럼 정말 저장이 됐는지 get함수를 통해서 출력해볼까요? ``` Simple.deployed().then((instance)=>{return instance.get.call()}).then((result) => { data = result }); data.toNumber(); ``` 100이 출력 되었다면 제대로 실행된 겁니다. 어떤가요? 트러플을 사용하면 컨트랙트 관리, 배포, 사용이 편리해지셨나요? 저는 편리한 것 같습니다. (아직까지는.. ㅎㅎ) 오늘은 여기까지! 트러플에서 테스트 방법과 디버깅, 다른 패키지와의 연결은 다음에 작성해보려고 합니다. (아직 익숙지 않아서.. 헤헤)
json metadata{"community":"busy","app":"busy/2.5.4","format":"markdown","tags":["kr","kr-dev","dapp","ethereum","truffle"],"users":[],"links":["https://truffleframework.com/","https://nodejs.org/en/"],"image":[]}
Transaction InfoBlock #24702173/Trx 6387d8d5b0e7bedcd06828ae4da8e061aa52d5a3
View Raw JSON Data
{
  "trx_id": "6387d8d5b0e7bedcd06828ae4da8e061aa52d5a3",
  "block": 24702173,
  "trx_in_block": 24,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-08-02T01:56:15",
  "op": [
    "comment",
    {
      "parent_author": "",
      "parent_permlink": "kr",
      "author": "pangol",
      "permlink": "dapp-7-truffle",
      "title": "이더리움 Dapp 만들기 [7. Truffle 사용법]",
      "body": "이더리움 dapp을 작성하고 사용하려면 컴파일하고 네트워크에 배포하고 배포된 컨트랙트와 연결해야하는 과정을 거치게 됩니다. 대략 solc를 사용해서 컴파일, 컴파일 된 파일에서 ABI 정보를 가져와서 geth에서 배포하고, 후에 컨트랙트 주소를 저장해두고 후에 사용할 때 주소를 통해서 접근하게 되죠. 실제로 개발을 해보면 보통 복잡한 게 아닙니다. 그래서 이러한 걸 해결해주는 프레임워크가 있습니다. 바로 트러플입니다. (https://truffleframework.com/)\n\n트러플에서 제공하는 기능은 컨트랙트 컴파일, 배포, 디버그, 테스트를 제공합니다. 트러플을 사용해서 dapp을 개발하면 좀? 편해집니다. (과연 그럴까요?)\n\n트러플을 사용하기 위해서는 NODE.JS가 설치되어 있어야 합니다. 노드 버전 5.0이상 설치되어 있어야 합니다. (NODE.JS 설치는 https://nodejs.org/en/ 에서 확인해보세요)\n\n설치된 노드 버전 확인은 아래 명령어를 사용하면 됩니다.\n\n```\nnode -v\n```\n\n## 1. 트러플 설치하기\n\n```\nnpm install -g install\n```\n\n트러플이 설치 되었으면 버전을 확인해보겠습니다.\n\n```\ntruffle version\n```\n\n설치된 트러플 버전과 솔리디티 컴파일 버전이 나옵니다.\n설치 확인이 끝났으면 트러플 예제를 작성할 폴더를 하나 만들고 이동합니다.\n\n```\nmkdir truffle_exmple\ncd truffle_example\n```\n\n## 2. 트러플 프로젝트 만들기\n\n```\ntruffle init\n```\n트러플 초기화가 완료되면 contracts, test, migrations 폴더가 생성되고 truffle.js, truffle-config.js 가 생성됩니다. \n\ncontracts 폴더에는 solidity언어로 작성한 컨트랙트들을 두는 곳입니다. test폴더에는 컨트랙트를 테스트할 때 사용하는 파일을 두는 곳입니다. migration 폴더에는 컴파일 후에 컨트랙트를 배포할 때 사용하는 파일을 두는 곳입니다. truffle.js는 트러플에서 컨트랙트를 배포할 네트워크 설정, 컴파일러 언어 설정 등 트러플과 관련된 설정을 하는 파일입니다. truffle-config.js 파일은 truffle.js를 설정할 예시를 보여주는 파일입니다. 트러플 설정을 할 때는 truffle.js를 사용한 다는 것 명심!\n\n## 3. 트러플 설정하기\n\n트러플에서 배포할 때 사용할 네트워크를 설정하겠습니다. truffle.js를 엽니다\n```\nmodule.exports = {\n  // See <http://truffleframework.com/docs/advanced/configuration>\n  // to customize your Truffle configuration!\n  networks: {\n    development: {\n      host: \"localhost\",\n      port: \"8545\",\n      network_id: \"*\",\n    }\n  }\n};\n```\n\nnetworks에서 development로 네트워크를 설정하면 트러플 컴파일 하거나 배포를 할 때 —network를 옵션으로 지정해서 사용할 수 있습니다. (—network development)\n\nhost와 port는 geth 실행 시에 설정한 rpc host와 port로 설정하면 됩니다. geth 실행 시에 지정을 하지 않았으면 기본으로 localhost, 8545로 설정됩니다.\n\n잘 설정이 됐는지 연결이 잘 되는지 확인해보겠습니다.\n트러플에서는 콘솔을 제공해서 네트워크 정보를 확인할 수 있습니다.\n\n```\ntruffle console \n```\n\n또는\n```\ntruffle console —network development\n```\n로 접속을 합니다. (geth 이더리움 네트워크는 구동상태여야 합니다!)\n```\nweb3.eth.coinbase\n```\n로 명령어를 쳤을 때 geth에서 설정된 coinbase 주소가 나오면 잘 연결된겁니다. 연결이 확인됐다면 .exit를 입력해서 빠져나옵니다.\n\n## 4. 컨트랙트 컴파일\n트러플에서 컨트랙트를 컴파일 할 때 사용하는 명령어는 아래와 같습니다\n```\ntruffle compile\n```\ncontracts/ 폴더 안에 들어있는 모든 파일이 컴파일이 진행됩니다. truffle init을 하고 contracts 폴더를 보면 Migration.sol 컨트랙트 파일이 있는 걸 확인할 수 있습니다. 해당 파일은 다른 컨트랙트들에 대한 배포정보를 가지고 있고 관리할 때 트러플이 사용하는 파일입니다. 절대 삭제하지 마시고 수정하지 말기를 권해드립니다.\n\n자, 이제 컨트랙트를 컴파일 해보겠습니다. 이 전에 작성한 Simple.sol 파일을 contracts폴더에 작성합니다.\n```\n pragma solidity ^0.4.23;\n\ncontract Simple {\n        uint256 data;\n        function set (uint256 _data)public {\n                data = _data;\n\n        }\n        function get()public view returns(uint256){\n                return data;\n        }\n}\n```\n```\ntruffle compile\n```\n명령어를 실행시킵니다. contracts폴더에 들어있는 파일들의 컴파일을 다 수행하고 build폴더를 만들고 해당 폴더에 컴파일이 완료된 정보가 담겨있는 파일들이 생성됩니다. (컨트랙트에 오류가 있으면 오류가 표시되고 종료됩니다.) build/contracts 폴더를 보면 json파일들이 생성된 걸 확인할 수 있습니다. json파일에는 컨트랙트의 ABI 정보, bytecode 등 배포때 필요한 정보가 들어있습니다. \n\n## 5. 컨트랙트 배포하기\n\n컨트랙트를 배포하기 위해서는 migrations폴더에 배포할 컨트랙트에 맞게 파일을 하나 작성해줘야 합니다. truffle init을 하면 migrations 폴더에 1_initial_migration.js 파일이 존재합니다. \n\n해당 파일을 열어보면 \n```\nvar Migrations = artifacts.require(\"./Migrations.sol\");\n\nmodule.exports = function(deployer) {\n  deployer.deploy(Migrations);\n};\n```\n\nMigration 컨트랙트를 배포하는 파일임을 확인할 수 있습니다. 컨트랙트를 배포하기 위해서는 artifacts.require()로 배포를 원하는 컨트랙트의 정보를 획득 한 후 deployer.deploy()를 사용해서 배포를 하는 과정임을 알 수 있습니다. 해당 파일도 삭제 또는 수정하지 않는 걸 권해드립니다. \n\nSimple.sol을 배포하기 위해서는 새로운 배포파일을 작성하면 됩니다.\nmigrations 폴더에 2_deploy_contracts.js\t를 생성합니다. 아래와 같이 작성합니다.\n\n```\nvar Simple = artifacts.require(\"Simple\");\n\nmodule.exports = function(deployer) {\n  deployer.deploy(Simple);\n};\n```\n자! 이제 배포해보겠습니다. (geth 실행 후에 miner.start()를 실행시켜서 마이닝을 활성화 시켜주세요!!!!)\n\n```\ntruffle migrate\n```\n성공적으로 작업이 완료되면 아래와 같은 문구가 나타납니다.\n```\nUsing network 'development'.\n\nRunning migration: 1_initial_migration.js\n  Deploying Migrations...\n  ... 0x966134b845d298f18406f8cd7051f4b81010cdc5f15d9b8b251c344fa3703e45\n  Migrations: 0x81a3bb2434d5064036f6fff4b3ef21a13d1cdb84\nSaving successful migration to network...\n  ... 0x0cd3a7043705d61e46783ff0cca339a6f1fc00f3654ddc4be22ef1c24715e35e\nSaving artifacts...\nRunning migration: 2_deploy_contract.js\n  Deploying Simple...\n  ... 0x1209fd60a114e9231e838dc15e45f82c1361f4271828eb4eec02402268f8fd8d\n  Simple: 0x996ba351a2cb36307c078360530ffe43655fd0b5\nSaving successful migration to network...\n  ... 0x88d7adb4bd53901e9db8c547982477b68a0bd8dc5697c7f565ac3bd743875e19\nSaving artifacts...\n ```\n\n혹 배포가 잘 되지 않는다면 geth를 실행시킬 때, 어카운트의 락을 풀었는지 혹은 gas limit 에 걸리지 않았는지를 살펴보세요~\n\n## 6. 컨트랙트 사용하기\n\n배포된 컨트랙를 사용해 보겠습니다. Simple 컨트랙트는 data에 수를 저장할 수 있는 set 함수와, data에 저장된 수를 반환하는 get함수가 있습니다. 트러플을 사용하지 않았을 때는 컨트랙트의 주소와 ABI를 매번 설정해줘야 하는 불편함이 있었죠. 하지만 트러플을 사용하면 그럴 필요가 없습니다. 먼저 트러플 콘솔상에서 컨트랙트를 사용해보겠습니다.\n\n```\ntruffle console\n```\n를 입력해서 트러플 콘솔로 들어갑니다.\n\n```\nSimple.deployed().then((instance)=>{return instance.get.call()}).then((result) => { data = result });\n```\n를 입력해서 data 변수에 컨트랙트에 저장된 값을 저장합니다.\n\n```\ndata.toNumber()\n```\n의 값이 0이 출력되면 성공!!!!!!\n\nSimple.deployed() 를 호출하면 배포된 Simple 컨트랙트의 객체가 반환됩니다. 해당 객체\t를 instance 변수로 받고 get함수를 호출해서 컨트랙트에 저장된 변수의 값을 가져옵니다. \n\n이렇게 배포된 컨트랙트를 사용할 때는 컨트랙트이름.deployed()를 사용한다는 점 기억하세요.\n\n그러면 이 번에는 set함수를 사용해서 변수에 데이터를 저장해보겠습니다.\n```\nSimple.deployed().then((instance) => { return instance.set(100) })\n```\n제대로 수행이 되면 트랜젝션 관련 정보가 출력된답니다.\n그럼 정말 저장이 됐는지 get함수를 통해서 출력해볼까요?\n\n```\nSimple.deployed().then((instance)=>{return instance.get.call()}).then((result) => { data = result });\ndata.toNumber();\n```\n100이 출력 되었다면 제대로 실행된 겁니다.\t\n\n어떤가요? 트러플을 사용하면 컨트랙트 관리, 배포, 사용이 편리해지셨나요? 저는 편리한 것 같습니다. (아직까지는.. ㅎㅎ)\n\n오늘은 여기까지! 트러플에서 테스트 방법과 디버깅, 다른 패키지와의 연결은 다음에 작성해보려고 합니다. (아직 익숙지 않아서.. 헤헤)\n\n\n \n",
      "json_metadata": "{\"community\":\"busy\",\"app\":\"busy/2.5.4\",\"format\":\"markdown\",\"tags\":[\"kr\",\"kr-dev\",\"dapp\",\"ethereum\",\"truffle\"],\"users\":[],\"links\":[\"https://truffleframework.com/\",\"https://nodejs.org/en/\"],\"image\":[]}"
    }
  ]
}
pangolupvoted (100.00%) @wonsama / webrtc-1
2018/07/27 07:42:00
voterpangol
authorwonsama
permlinkwebrtc-1
weight10000 (100.00%)
Transaction InfoBlock #24536785/Trx 0e9887ca341ad43e54992c75cc5d4976005d8549
View Raw JSON Data
{
  "trx_id": "0e9887ca341ad43e54992c75cc5d4976005d8549",
  "block": 24536785,
  "trx_in_block": 9,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-27T07:42:00",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "wonsama",
      "permlink": "webrtc-1",
      "weight": 10000
    }
  ]
}
2018/07/27 07:40:09
voterpangol
authordonekim
permlinktelos-vs-eos-feat-lumeos
weight10000 (100.00%)
Transaction InfoBlock #24536748/Trx 92a9b23df72298fade3271ad7fb0ba1f047a8cd8
View Raw JSON Data
{
  "trx_id": "92a9b23df72298fade3271ad7fb0ba1f047a8cd8",
  "block": 24536748,
  "trx_in_block": 7,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-27T07:40:09",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "donekim",
      "permlink": "telos-vs-eos-feat-lumeos",
      "weight": 10000
    }
  ]
}
steemdelegated 14.720 SP to @pangol
2018/07/26 19:03:48
delegatorsteem
delegateepangol
vesting shares23941.256568 VESTS
Transaction InfoBlock #24521649/Trx 6d5a62cf45373aa38d02090adc8b54dd4b0c6b51
View Raw JSON Data
{
  "trx_id": "6d5a62cf45373aa38d02090adc8b54dd4b0c6b51",
  "block": 24521649,
  "trx_in_block": 14,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-26T19:03:48",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "23941.256568 VESTS"
    }
  ]
}
pangolupvoted (100.00%) @tip2yo / 2n76rg
2018/07/06 00:36:48
voterpangol
authortip2yo
permlink2n76rg
weight10000 (100.00%)
Transaction InfoBlock #23923864/Trx ca1d1b02bac5937d04eaa76b46de71a51c920a3c
View Raw JSON Data
{
  "trx_id": "ca1d1b02bac5937d04eaa76b46de71a51c920a3c",
  "block": 23923864,
  "trx_in_block": 27,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-06T00:36:48",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "tip2yo",
      "permlink": "2n76rg",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @cyranodcd / 52
2018/07/04 05:33:21
voterpangol
authorcyranodcd
permlink52
weight10000 (100.00%)
Transaction InfoBlock #23872259/Trx 90a34c5c7776a3f9193309c1ebb5cfe71f4d103f
View Raw JSON Data
{
  "trx_id": "90a34c5c7776a3f9193309c1ebb5cfe71f4d103f",
  "block": 23872259,
  "trx_in_block": 33,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-04T05:33:21",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "cyranodcd",
      "permlink": "52",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @xinnong / 44vvdg
2018/07/04 05:32:12
voterpangol
authorxinnong
permlink44vvdg
weight10000 (100.00%)
Transaction InfoBlock #23872236/Trx 13a78e6264a4f1b4f934d985abff08c599eeb305
View Raw JSON Data
{
  "trx_id": "13a78e6264a4f1b4f934d985abff08c599eeb305",
  "block": 23872236,
  "trx_in_block": 52,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-04T05:32:12",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "xinnong",
      "permlink": "44vvdg",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @yhoh / 6mghpi
2018/07/04 05:31:03
voterpangol
authoryhoh
permlink6mghpi
weight10000 (100.00%)
Transaction InfoBlock #23872213/Trx 926b2336f016b005a354aabdaa3271c16f9e8f39
View Raw JSON Data
{
  "trx_id": "926b2336f016b005a354aabdaa3271c16f9e8f39",
  "block": 23872213,
  "trx_in_block": 19,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-04T05:31:03",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "yhoh",
      "permlink": "6mghpi",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @osyvv / 52-2018-7-2
2018/07/02 00:59:12
voterpangol
authorosyvv
permlink52-2018-7-2
weight10000 (100.00%)
Transaction InfoBlock #23819000/Trx 00342a7b5c7eef10327b062b0a3a35e0eb5daba7
View Raw JSON Data
{
  "trx_id": "00342a7b5c7eef10327b062b0a3a35e0eb5daba7",
  "block": 23819000,
  "trx_in_block": 17,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-07-02T00:59:12",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "osyvv",
      "permlink": "52-2018-7-2",
      "weight": 10000
    }
  ]
}
pangolclaimed reward balance: 0.051 STEEM, 0.024 SBD, 0.089 SP
2018/06/29 09:37:24
accountpangol
reward steem0.051 STEEM
reward sbd0.024 SBD
reward vests144.155293 VESTS
Transaction InfoBlock #23742974/Trx b644913da5abb5e0bde858183ec82f0c025ccbb6
View Raw JSON Data
{
  "trx_id": "b644913da5abb5e0bde858183ec82f0c025ccbb6",
  "block": 23742974,
  "trx_in_block": 67,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-29T09:37:24",
  "op": [
    "claim_reward_balance",
    {
      "account": "pangol",
      "reward_steem": "0.051 STEEM",
      "reward_sbd": "0.024 SBD",
      "reward_vests": "144.155293 VESTS"
    }
  ]
}
pangolreceived 0.051 STEEM, 0.024 SBD, 0.089 SP author reward for @pangol / dapp-6-web3-js-geth
2018/06/28 02:43:12
authorpangol
permlinkdapp-6-web3-js-geth
sbd payout0.024 SBD
steem payout0.051 STEEM
vesting payout144.155293 VESTS
Transaction InfoBlock #23705934/Virtual Operation #7
View Raw JSON Data
{
  "trx_id": "0000000000000000000000000000000000000000",
  "block": 23705934,
  "trx_in_block": 4294967295,
  "op_in_trx": 0,
  "virtual_op": 7,
  "timestamp": "2018-06-28T02:43:12",
  "op": [
    "author_reward",
    {
      "author": "pangol",
      "permlink": "dapp-6-web3-js-geth",
      "sbd_payout": "0.024 SBD",
      "steem_payout": "0.051 STEEM",
      "vesting_payout": "144.155293 VESTS"
    }
  ]
}
pangolclaimed reward balance: 0.001 SP
2018/06/28 00:02:15
accountpangol
reward steem0.000 STEEM
reward sbd0.000 SBD
reward vests2.030614 VESTS
Transaction InfoBlock #23702716/Trx b4efe76b66bb6be6b42fb5fbdc220de11c76db48
View Raw JSON Data
{
  "trx_id": "b4efe76b66bb6be6b42fb5fbdc220de11c76db48",
  "block": 23702716,
  "trx_in_block": 29,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-28T00:02:15",
  "op": [
    "claim_reward_balance",
    {
      "account": "pangol",
      "reward_steem": "0.000 STEEM",
      "reward_sbd": "0.000 SBD",
      "reward_vests": "2.030614 VESTS"
    }
  ]
}
pangolreceived 0.001 SP curation reward for @sigmoid / 1
2018/06/25 17:08:06
curatorpangol
reward2.030614 VESTS
comment authorsigmoid
comment permlink1
Transaction InfoBlock #23636844/Virtual Operation #4
View Raw JSON Data
{
  "trx_id": "0000000000000000000000000000000000000000",
  "block": 23636844,
  "trx_in_block": 4294967295,
  "op_in_trx": 0,
  "virtual_op": 4,
  "timestamp": "2018-06-25T17:08:06",
  "op": [
    "curation_reward",
    {
      "curator": "pangol",
      "reward": "2.030614 VESTS",
      "comment_author": "sigmoid",
      "comment_permlink": "1"
    }
  ]
}
2018/06/25 00:25:18
parent authorvirus707
parent permlinkre-pangol-dapp-6-web3-js-geth-1529689142738td48ff0e9-c159-45e0-89d7-e61f7e2d1dc3uid
authorpangol
permlinkre-virus707-re-pangol-dapp-6-web3-js-geth-1529689142738td48ff0e9-c159-45e0-89d7-e61f7e2d1dc3uid-20180625t002523511z
title
body감사합니다 :)
json metadata{"tags":["kr"],"community":"busy","app":"busy/2.4.0"}
Transaction InfoBlock #23616793/Trx 3e1cf0381ea36843b4c73dbe411cffa9b904f6dd
View Raw JSON Data
{
  "trx_id": "3e1cf0381ea36843b4c73dbe411cffa9b904f6dd",
  "block": 23616793,
  "trx_in_block": 20,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-25T00:25:18",
  "op": [
    "comment",
    {
      "parent_author": "virus707",
      "parent_permlink": "re-pangol-dapp-6-web3-js-geth-1529689142738td48ff0e9-c159-45e0-89d7-e61f7e2d1dc3uid",
      "author": "pangol",
      "permlink": "re-virus707-re-pangol-dapp-6-web3-js-geth-1529689142738td48ff0e9-c159-45e0-89d7-e61f7e2d1dc3uid-20180625t002523511z",
      "title": "",
      "body": "감사합니다 :)",
      "json_metadata": "{\"tags\":[\"kr\"],\"community\":\"busy\",\"app\":\"busy/2.4.0\"}"
    }
  ]
}
2018/06/22 17:39:09
parent authorpangol
parent permlinkdapp-6-web3-js-geth
authorvirus707
permlinkre-pangol-dapp-6-web3-js-geth-1529689142738td48ff0e9-c159-45e0-89d7-e61f7e2d1dc3uid
title
body(jjangjjangman 태그 사용시 댓글을 남깁니다.) 호출에 감사드립니다! 즐거운 스티밋하세요!
json metadata{"tags":["support"],"app":"null/null","format":"markdown"}
Transaction InfoBlock #23551080/Trx 66f7e19a92bd667e8ca7308290d8ccf0853726f2
View Raw JSON Data
{
  "trx_id": "66f7e19a92bd667e8ca7308290d8ccf0853726f2",
  "block": 23551080,
  "trx_in_block": 59,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-22T17:39:09",
  "op": [
    "comment",
    {
      "parent_author": "pangol",
      "parent_permlink": "dapp-6-web3-js-geth",
      "author": "virus707",
      "permlink": "re-pangol-dapp-6-web3-js-geth-1529689142738td48ff0e9-c159-45e0-89d7-e61f7e2d1dc3uid",
      "title": "",
      "body": "(jjangjjangman 태그 사용시 댓글을 남깁니다.)\n호출에 감사드립니다! 즐거운 스티밋하세요!\n\n",
      "json_metadata": "{\"tags\":[\"support\"],\"app\":\"null/null\",\"format\":\"markdown\"}"
    }
  ]
}
2018/06/22 17:39:00
votervirus707
authorpangol
permlinkdapp-6-web3-js-geth
weight100 (1.00%)
Transaction InfoBlock #23551077/Trx ab131a2d8a1b871071cec81ee42d541ff8457451
View Raw JSON Data
{
  "trx_id": "ab131a2d8a1b871071cec81ee42d541ff8457451",
  "block": 23551077,
  "trx_in_block": 54,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-22T17:39:00",
  "op": [
    "vote",
    {
      "voter": "virus707",
      "author": "pangol",
      "permlink": "dapp-6-web3-js-geth",
      "weight": 100
    }
  ]
}
steemdelegated 14.844 SP to @pangol
2018/06/21 06:19:18
delegatorsteem
delegateepangol
vesting shares24144.127404 VESTS
Transaction InfoBlock #23508686/Trx 52bcbd8c375fa253cee00f6d6ba9370fb18f8a35
View Raw JSON Data
{
  "trx_id": "52bcbd8c375fa253cee00f6d6ba9370fb18f8a35",
  "block": 23508686,
  "trx_in_block": 13,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T06:19:18",
  "op": [
    "delegate_vesting_shares",
    {
      "delegator": "steem",
      "delegatee": "pangol",
      "vesting_shares": "24144.127404 VESTS"
    }
  ]
}
2018/06/21 05:51:15
voterpangol
authormodolee
permlinkethereum-ethernaut-1-fallback
weight10000 (100.00%)
Transaction InfoBlock #23508125/Trx 8b0cc3f38e89db21646458fd78482aeb6336ac9f
View Raw JSON Data
{
  "trx_id": "8b0cc3f38e89db21646458fd78482aeb6336ac9f",
  "block": 23508125,
  "trx_in_block": 12,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T05:51:15",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "modolee",
      "permlink": "ethereum-ethernaut-1-fallback",
      "weight": 10000
    }
  ]
}
2018/06/21 05:34:00
voterpangol
authormodolee
permlinkethereum-ethernaut-2-fallout
weight10000 (100.00%)
Transaction InfoBlock #23507780/Trx c8e0f4b29fc05bf699076922eecb67e43168b697
View Raw JSON Data
{
  "trx_id": "c8e0f4b29fc05bf699076922eecb67e43168b697",
  "block": 23507780,
  "trx_in_block": 20,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T05:34:00",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "modolee",
      "permlink": "ethereum-ethernaut-2-fallout",
      "weight": 10000
    }
  ]
}
2018/06/21 04:01:15
votermodolee
authorpangol
permlinkdapp-6-web3-js-geth
weight10000 (100.00%)
Transaction InfoBlock #23505925/Trx 4d05977f3e2316d3c2ff2dd8b7b19efe0f2e81b4
View Raw JSON Data
{
  "trx_id": "4d05977f3e2316d3c2ff2dd8b7b19efe0f2e81b4",
  "block": 23505925,
  "trx_in_block": 12,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T04:01:15",
  "op": [
    "vote",
    {
      "voter": "modolee",
      "author": "pangol",
      "permlink": "dapp-6-web3-js-geth",
      "weight": 10000
    }
  ]
}
pangolupvoted (100.00%) @osyvv / 52-6-2018-6-21
2018/06/21 04:01:03
voterpangol
authorosyvv
permlink52-6-2018-6-21
weight10000 (100.00%)
Transaction InfoBlock #23505921/Trx 9f3b891596f1238904c508f2012c4cbfc00af487
View Raw JSON Data
{
  "trx_id": "9f3b891596f1238904c508f2012c4cbfc00af487",
  "block": 23505921,
  "trx_in_block": 7,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T04:01:03",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "osyvv",
      "permlink": "52-6-2018-6-21",
      "weight": 10000
    }
  ]
}
pangolclaimed reward balance: 0.036 STEEM, 0.072 SBD, 0.102 SP
2018/06/21 03:56:36
accountpangol
reward steem0.036 STEEM
reward sbd0.072 SBD
reward vests166.567598 VESTS
Transaction InfoBlock #23505832/Trx 1439e86ec1e28141c519ea2218ef36a9e83ece9f
View Raw JSON Data
{
  "trx_id": "1439e86ec1e28141c519ea2218ef36a9e83ece9f",
  "block": 23505832,
  "trx_in_block": 40,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T03:56:36",
  "op": [
    "claim_reward_balance",
    {
      "account": "pangol",
      "reward_steem": "0.036 STEEM",
      "reward_sbd": "0.072 SBD",
      "reward_vests": "166.567598 VESTS"
    }
  ]
}
2018/06/21 03:46:45
votermishana
authorpangol
permlinkdapp-6-web3-js-geth
weight5000 (50.00%)
Transaction InfoBlock #23505635/Trx 6bd862313429ae27f3e2c816fac2c5876a0e2ee1
View Raw JSON Data
{
  "trx_id": "6bd862313429ae27f3e2c816fac2c5876a0e2ee1",
  "block": 23505635,
  "trx_in_block": 1,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T03:46:45",
  "op": [
    "vote",
    {
      "voter": "mishana",
      "author": "pangol",
      "permlink": "dapp-6-web3-js-geth",
      "weight": 5000
    }
  ]
}
pangolpublished a new post: dapp-6-web3-js-geth
2018/06/21 02:44:06
parent author
parent permlinkkr
authorpangol
permlinkdapp-6-web3-js-geth
title이더리움 Dapp만들기 [6. web3.js를 이용해서 geth와 통신하기]
body@@ -74,19 +74,21 @@ %EC%A0%9C%EA%B3%B5%ED%95%98%EB%8A%94 + javascr -t +r ip +t API
json metadata{"community":"busy","app":"busy/2.4.0","format":"markdown","tags":["kr","kr-dev","ethereum","dapp","jjangjjangman"],"links":["https://github.com/ethereum/web3.js/tree/v0.20.6/dist","http://localhost:8545","https://busy.org/@pangol/dapp-5-solc","https://github.com/ethereum/wiki/wiki/JavaScript-API"],"users":["pangol"]}
Transaction InfoBlock #23504382/Trx e23a1d4034273dd259d8dce6487f6ac8ebdebf41
View Raw JSON Data
{
  "trx_id": "e23a1d4034273dd259d8dce6487f6ac8ebdebf41",
  "block": 23504382,
  "trx_in_block": 22,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T02:44:06",
  "op": [
    "comment",
    {
      "parent_author": "",
      "parent_permlink": "kr",
      "author": "pangol",
      "permlink": "dapp-6-web3-js-geth",
      "title": "이더리움 Dapp만들기 [6. web3.js를 이용해서 geth와 통신하기]",
      "body": "@@ -74,19 +74,21 @@\n %EC%A0%9C%EA%B3%B5%ED%95%98%EB%8A%94\n+ \n  javascr\n-t\n+r\n ip\n+t\n  API\n",
      "json_metadata": "{\"community\":\"busy\",\"app\":\"busy/2.4.0\",\"format\":\"markdown\",\"tags\":[\"kr\",\"kr-dev\",\"ethereum\",\"dapp\",\"jjangjjangman\"],\"links\":[\"https://github.com/ethereum/web3.js/tree/v0.20.6/dist\",\"http://localhost:8545\",\"https://busy.org/@pangol/dapp-5-solc\",\"https://github.com/ethereum/wiki/wiki/JavaScript-API\"],\"users\":[\"pangol\"]}"
    }
  ]
}
2018/06/21 02:43:30
parent authorpangol
parent permlinkdapp-6-web3-js-geth
authora-0-0-0
permlinkre-pangol-dapp-6-web3-js-geth-20180621t024333243z
title
bodyUpvote this for me please? https://steemit.com/christianity/@bible.com/verse-of-the-day-hebrews-4-16-nlt
json metadata{"tags":["kr"],"links":["https://steemit.com/christianity/@bible.com/verse-of-the-day-hebrews-4-16-nlt"],"app":"steemit/0.1"}
Transaction InfoBlock #23504370/Trx 6ec9dd8be2eec27f5051e184d5956ea9c810a738
View Raw JSON Data
{
  "trx_id": "6ec9dd8be2eec27f5051e184d5956ea9c810a738",
  "block": 23504370,
  "trx_in_block": 36,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T02:43:30",
  "op": [
    "comment",
    {
      "parent_author": "pangol",
      "parent_permlink": "dapp-6-web3-js-geth",
      "author": "a-0-0-0",
      "permlink": "re-pangol-dapp-6-web3-js-geth-20180621t024333243z",
      "title": "",
      "body": "Upvote this for me please? https://steemit.com/christianity/@bible.com/verse-of-the-day-hebrews-4-16-nlt",
      "json_metadata": "{\"tags\":[\"kr\"],\"links\":[\"https://steemit.com/christianity/@bible.com/verse-of-the-day-hebrews-4-16-nlt\"],\"app\":\"steemit/0.1\"}"
    }
  ]
}
2018/06/21 02:43:12
voterpangol
authorpangol
permlinkdapp-6-web3-js-geth
weight10000 (100.00%)
Transaction InfoBlock #23504364/Trx 504bfc9604313e3193a035bfad09e9247d0dd59c
View Raw JSON Data
{
  "trx_id": "504bfc9604313e3193a035bfad09e9247d0dd59c",
  "block": 23504364,
  "trx_in_block": 10,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T02:43:12",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "pangol",
      "permlink": "dapp-6-web3-js-geth",
      "weight": 10000
    }
  ]
}
pangolpublished a new post: dapp-6-web3-js-geth
2018/06/21 02:43:12
parent author
parent permlinkkr
authorpangol
permlinkdapp-6-web3-js-geth
title이더리움 Dapp만들기 [6. web3.js를 이용해서 geth와 통신하기]
bodygeth콘솔을 이용해서 배포한 스마트 컨트랙트를 web3.js를 이용하면 웹에서 사용할 수 있습니다. web3.js는 이더리움에서 제공하는 javascrtip API입니다. # web3.js 다운로드와 geth 연결 해당 링크로 가서 web3.min.js를 다운받습니다. 이 번에 사용할 web3.js 버전은 0.20.6 입니다. https://github.com/ethereum/web3.js/tree/v0.20.6/dist 해당 파일 다운로드가 완료되었으면 test.html로 에디터로 문서를 만들겠습니다. 가장 먼저 해야할 건 web3.min.js를 html문서에 포함시키는 겁니다. ``` <!DOCTYPE html> <html> <head> <meta charset=”UTF-8”> <title>web3 test</title> <script type=”text/javascript” src=”web3.min.js”></script> </head> <body> </body> </html> ``` 여기까지 완료하고 test.html문서를 열어서 에러 문구가 나타나지 않으면 web3.min.js 가 성공적으로 로딩이 완료된겁니다. 그럼 web3를 이용해서 geth와 연결하는 방법을 알아보겠습니다. (geth가 실행중이여야 합니다!!!!!!!!!!!!!!!!) web3.min.js를 불러오는 태그 밑에 script태그를 만들고 그 안에 자바스크립트 코드를 작성하겠습니다. ``` <head> <meta charset=”UTF-8”> <title>web3 test</title> <script type=”text/javascript” src=”web3.min.js”></script> <script type=”text/javascript”> var Web3 = require(‘web3’); var web3 = new Web3( new Web3.providers.HttpProvider(“http://localhost:8545”)); var network_version = web3.version.network; console.log(network_version); </script> </head> ``` var Web3 = require(‘web3’) 는 web3모듈을 로딩해서 변수 Web3에 할당하는 구문입니다. var web3 = new Web3()는 web3 객체를 생성해서 변수 web3에 할당하는 구문이며 new Web3()안에 삽입된 구문은 web3객체와 geth콘솔과 연결하는 구문입니다. new Web3.providers.HttpProvider(“http://localhost:8545”) HttpProvider함수를 사용해서 geth와 연결하며 파라미터로 연결하고 싶은 geth의 도메인과 rpc port넘버를 사용하면 됩니다. geth를 실행할 때 rpc port를 명시하지 않았으면 8545가 설정됩니다. geth와 잘 연결이 됐는지 web3를 이용해서 연결된 geth의 network 정보를 출력해보겠습니다. ``` var network_version = web3.version.network; console.log(network_version); ``` 아래와 같이 geth 옵션에서 사용한 네트워크 아이디가 출력되는 걸 확인할 수 있습니다. ![01.png](https://ipfs.busy.org/ipfs/QmadCwFu8tEgVcRg2LZxMvWtVnh2VfPcV8K9SzwjTHban8) # web3.js로 이더 전송하기 web3와 geth 연결을 확인했으니 web3를 이용해서 이더를 전송해보겠습니다. web3.eth.accounts 를 사용하면 연결된 geth의 모든 계좌의 주소를 가져올 수 있습니다. web3.eth.sendTransaction()함수를 사용하면 트랜잭션을 실행시킬 수있습니다. sendTransaction함수는 Transacton Object와 callback함수를 파라미터로 받습니다. Transaction Object는 이더를 전송할 from, 이더를 받은 to, 전송할 이더의 양 value 을 명시해주면 됩니다. (그 외에 gas, gasPrice, nonce, data 를 옵션으로 지정할 수 있습니다.) 첫 번째 계좌에서 두 번째 계좌로 1000 wei를 보내겠습니다. ``` <script type=”text/javascript”> var Web3 = require(‘web3’); var web3 = new Web3( new Web3.providers.HttpProvider(“http://localhost:8545”)); var network_version = web3.version.network; console.log(network_version); var accounts = web3.eth.accounts; //account 정보 가져오기 var from_account = accounts[0]; var to_account = accounts[1]; var transactionObj = { //transaction object 설정 from: from_account, to:to_account, value: 1000 }; web3.eth.sendTransaction(transactionObj) </script> ``` 이렇게 작성을 하고 실행을 시키기 전에 geth에서 첫 번째 계좌의 락을 풀어줘야 합니다. geth 콘솔창에서 ``` personal.unlockAccount(eth.accounts[0]) ``` 를 입력해서 락을 풀어준 후에 html문서를 실행시킵니다. 아! 마이닝도 실행시켜줘야 합니다!!!!! geth 콘솔창에서 miner.start()를 입력합니다. 마이닝이 됐으면 geth콘솔창에서 eth.getBalance(eth.accounts[1])을 실행해서 제대로 수행됐는지 확인해보면 됩니다! ![02.png](https://ipfs.busy.org/ipfs/QmRyCPccTJ2xKpdom5WrnRek3djwDor8wWjhcyGGJgMPbQ) # web3.js를 이용해서 컨트랙트 사용하기 web3를 이용해서 private network에 배포된 스마트 컨트랙트를 사용하는 법을 알아보겠습니다. solc 컴파일러를 사용해서 geth에서 스마트 컨트랙트를 사용할 때 알아야할 정보가 두 가지 였습니다. 첫 번째는 컨트랙트의 abi, 두 번째는 배포된 컨트랙트의 주소! web3에서도 이 두 개의 정보를 사용해서 컨트랙트와 연결합니다. 5번째 글(https://busy.org/@pangol/dapp-5-solc) 에서 배포한 컨트랙트를 사용하도록 하겠습니다. ``` <script type=”text/javascript”> var Web3 = require(‘web3’); var web3 = new Web3( new Web3.providers.HttpProvider(“http://localhost:8545”)); var from_account = accounts[0]; //contract abi 설정 var contractAbi = [{"constant":false,"inputs":[{"name":"_data","type":"uint256"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]; //배포된 컨트랙트 주소 설정 var contractAddress = "0x2a2d085b683c995e5155260d044db06d117fb666"; var contract = web3.eth.contract(contractAbi); var contractInstance = contract.at(contractAddress); var result = contractInstance.get() console.log(result.toString()); </script> ``` abi와 주소를 설정한 후 web3.eth.contract()안에 abi를 인자로 넘기고 컨트랙트를 인터페이스를 설정하고 contract.at()함수를 사용해서 컨트랙트의 인스턴스를 할당 받습니다. 그럼 배포된 컨트랙트를 사용할 수 있습니다. get()을 이용해서 data에 저장된 숫자를 출력합니다. web3.js에서는 bignumber 라이브러리를 사용해서 숫자를 처리하기 때문에 result.toString() 또는 result.toNumber()를 붙이지 않고 result만 출력하게 되면 숫자가 아닌 객체가 출력되니 유의하시기 바랍니다. ![03.png](https://ipfs.busy.org/ipfs/Qma5uxGhuEivLommLBNs8AZfPWRkpmMp1VcRExnFpXN7c9) 마지막으로 컨트랙트의 set함수를 사용해서 컨트랙트 변수의 값을 변경해보겠습니다. set함수는 get함수와 다르게 변수의 값을 변화시키기 때문에 transaction object를 인자로 같이 넘겨줘야 합니다. ``` contractInstance.set(1000, {from:eth.accounts[0]}) ``` transaction을 전송하기 때문 eth.accounts[0]의 락이 풀린 상태여야 합니다. 마이닝을 한 후, 값을 확인해보면 변경된 걸 볼 수 있습니다. web3에 대해서 자세히 알고 싶은 분은 https://github.com/ethereum/wiki/wiki/JavaScript-API 에서 확인해보시면 됩니다.
json metadata{"community":"busy","app":"busy/2.4.0","format":"markdown","tags":["kr","kr-dev","ethereum","dapp","jjangjjangman"],"links":["https://github.com/ethereum/web3.js/tree/v0.20.6/dist","http://localhost:8545","https://busy.org/@pangol/dapp-5-solc","https://github.com/ethereum/wiki/wiki/JavaScript-API"],"users":["pangol"]}
Transaction InfoBlock #23504364/Trx 504bfc9604313e3193a035bfad09e9247d0dd59c
View Raw JSON Data
{
  "trx_id": "504bfc9604313e3193a035bfad09e9247d0dd59c",
  "block": 23504364,
  "trx_in_block": 10,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-21T02:43:12",
  "op": [
    "comment",
    {
      "parent_author": "",
      "parent_permlink": "kr",
      "author": "pangol",
      "permlink": "dapp-6-web3-js-geth",
      "title": "이더리움 Dapp만들기 [6. web3.js를 이용해서 geth와 통신하기]",
      "body": "geth콘솔을 이용해서 배포한 스마트 컨트랙트를 web3.js를 이용하면 웹에서 사용할 수 있습니다. web3.js는 이더리움에서 제공하는 javascrtip API입니다.\n\n# web3.js 다운로드와 geth 연결\n\n해당 링크로 가서 web3.min.js를 다운받습니다. 이 번에 사용할 web3.js 버전은 0.20.6 입니다. https://github.com/ethereum/web3.js/tree/v0.20.6/dist\n\n해당 파일 다운로드가 완료되었으면 test.html로 에디터로 문서를 만들겠습니다.\n가장 먼저 해야할 건 web3.min.js를 html문서에 포함시키는 겁니다.\n\n```\n<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=”UTF-8”>\n\t<title>web3 test</title>\n\t<script type=”text/javascript” src=”web3.min.js”></script>\n</head>\n<body>\n</body>\n</html>\n```\n\n여기까지 완료하고 test.html문서를 열어서 에러 문구가 나타나지 않으면 web3.min.js 가 성공적으로 로딩이 완료된겁니다. 그럼 web3를 이용해서 geth와 연결하는 방법을 알아보겠습니다. (geth가 실행중이여야 합니다!!!!!!!!!!!!!!!!)\n\nweb3.min.js를 불러오는 태그 밑에 script태그를 만들고 그 안에 자바스크립트 코드를 작성하겠습니다.\n\n```\n<head>\n\t<meta charset=”UTF-8”>\n\t<title>web3 test</title>\n\t<script type=”text/javascript” src=”web3.min.js”></script>\n\t<script type=”text/javascript”>\n\t\tvar Web3 = require(‘web3’);\n\t\tvar web3 = new Web3( new Web3.providers.HttpProvider(“http://localhost:8545”));\n\t\tvar network_version = web3.version.network;\n\t\tconsole.log(network_version);\n\t</script>\n</head>\n```\n\n\nvar Web3 = require(‘web3’) 는 web3모듈을 로딩해서 변수 Web3에 할당하는 구문입니다. \nvar web3 = new Web3()는 web3 객체를 생성해서 변수 web3에 할당하는 구문이며 new Web3()안에 삽입된 구문은 web3객체와 geth콘솔과 연결하는 구문입니다.\n\n  new Web3.providers.HttpProvider(“http://localhost:8545”)\n\nHttpProvider함수를 사용해서 geth와 연결하며 파라미터로 연결하고 싶은 geth의 도메인과 rpc port넘버를 사용하면 됩니다. geth를 실행할 때 rpc port를 명시하지 않았으면 8545가 설정됩니다.\n\ngeth와 잘 연결이 됐는지 web3를 이용해서 연결된 geth의 network 정보를 출력해보겠습니다.\n\n```\nvar network_version = web3.version.network;\nconsole.log(network_version);\n```\n아래와 같이 geth 옵션에서 사용한 네트워크 아이디가 출력되는 걸 확인할 수 있습니다.\n\n![01.png](https://ipfs.busy.org/ipfs/QmadCwFu8tEgVcRg2LZxMvWtVnh2VfPcV8K9SzwjTHban8)\n\n#  web3.js로 이더 전송하기\n\nweb3와 geth 연결을 확인했으니 web3를 이용해서 이더를 전송해보겠습니다. web3.eth.accounts 를 사용하면 연결된 geth의 모든 계좌의 주소를 가져올 수 있습니다. \nweb3.eth.sendTransaction()함수를 사용하면 트랜잭션을 실행시킬 수있습니다.\nsendTransaction함수는 Transacton Object와 callback함수를 파라미터로 받습니다. \nTransaction Object는 이더를 전송할 from, 이더를 받은 to, 전송할 이더의 양 value 을 명시해주면 됩니다. (그 외에 gas, gasPrice, nonce, data 를 옵션으로 지정할 수 있습니다.)\n\n첫 번째 계좌에서 두 번째 계좌로 1000 wei를 보내겠습니다.\n\n``` \n<script type=”text/javascript”>\n\tvar Web3 = require(‘web3’);\n\tvar web3 = new Web3( new Web3.providers.HttpProvider(“http://localhost:8545”));\n\tvar network_version = web3.version.network;\n\tconsole.log(network_version);\n\n\n\tvar accounts = web3.eth.accounts;  //account 정보 가져오기\n\tvar from_account = accounts[0];\n\tvar to_account = accounts[1];\n\n\tvar transactionObj = { //transaction object 설정\n\t\tfrom: from_account,\n\t\tto:to_account,\n\t\tvalue: 1000\n};\n\nweb3.eth.sendTransaction(transactionObj)\n</script>\n```\n\n이렇게 작성을 하고 실행을 시키기 전에 geth에서 첫 번째 계좌의 락을 풀어줘야 합니다. geth 콘솔창에서 \n\n```\npersonal.unlockAccount(eth.accounts[0])\n```\n\n를 입력해서 락을 풀어준 후에 html문서를 실행시킵니다. \n아! 마이닝도 실행시켜줘야 합니다!!!!! geth 콘솔창에서 miner.start()를 입력합니다.\n\n마이닝이 됐으면 geth콘솔창에서 eth.getBalance(eth.accounts[1])을 실행해서 제대로 수행됐는지 확인해보면 됩니다!\n\n![02.png](https://ipfs.busy.org/ipfs/QmRyCPccTJ2xKpdom5WrnRek3djwDor8wWjhcyGGJgMPbQ)\n\n#  web3.js를 이용해서 컨트랙트 사용하기\n\nweb3를 이용해서 private network에 배포된 스마트 컨트랙트를 사용하는 법을 알아보겠습니다. solc 컴파일러를 사용해서 geth에서 스마트 컨트랙트를 사용할 때 알아야할 정보가 두 가지 였습니다. 첫 번째는 컨트랙트의 abi, 두 번째는 배포된 컨트랙트의 주소!\n\nweb3에서도 이 두 개의 정보를 사용해서 컨트랙트와 연결합니다. 5번째 글(https://busy.org/@pangol/dapp-5-solc) 에서 배포한 컨트랙트를 사용하도록 하겠습니다.\n\n```\n<script type=”text/javascript”>\n\tvar Web3 = require(‘web3’);\n\tvar web3 = new Web3( new Web3.providers.HttpProvider(“http://localhost:8545”));\n\tvar from_account = accounts[0];\n\t\n//contract abi 설정\n\tvar contractAbi = [{\"constant\":false,\"inputs\":[{\"name\":\"_data\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"get\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}];\n\n\t//배포된 컨트랙트 주소 설정\n            \tvar contractAddress = \"0x2a2d085b683c995e5155260d044db06d117fb666\";\n            \t\nvar contract = web3.eth.contract(contractAbi);\n            \tvar contractInstance = contract.at(contractAddress);\n\n            \tvar result = contractInstance.get()\n            \tconsole.log(result.toString());\n</script>\n```\nabi와 주소를 설정한 후 web3.eth.contract()안에 abi를 인자로 넘기고 컨트랙트를 인터페이스를 설정하고 contract.at()함수를 사용해서 컨트랙트의 인스턴스를 할당 받습니다. 그럼 배포된 컨트랙트를 사용할 수 있습니다. get()을 이용해서 data에 저장된 숫자를 출력합니다.\n\nweb3.js에서는 bignumber 라이브러리를 사용해서 숫자를 처리하기 때문에 result.toString() 또는 result.toNumber()를 붙이지 않고 result만 출력하게 되면 숫자가 아닌 객체가 출력되니 유의하시기 바랍니다.\n\n![03.png](https://ipfs.busy.org/ipfs/Qma5uxGhuEivLommLBNs8AZfPWRkpmMp1VcRExnFpXN7c9)\n\n마지막으로 컨트랙트의 set함수를 사용해서 컨트랙트 변수의 값을 변경해보겠습니다. set함수는 get함수와 다르게 변수의 값을 변화시키기 때문에 transaction object를 인자로 같이 넘겨줘야 합니다.\n```\ncontractInstance.set(1000, {from:eth.accounts[0]})\n```\n\ntransaction을 전송하기 때문 eth.accounts[0]의 락이 풀린 상태여야 합니다. 마이닝을 한 후, 값을 확인해보면 변경된 걸 볼 수 있습니다.\n\nweb3에 대해서 자세히 알고 싶은 분은 https://github.com/ethereum/wiki/wiki/JavaScript-API 에서 확인해보시면 됩니다.\n\n\n",
      "json_metadata": "{\"community\":\"busy\",\"app\":\"busy/2.4.0\",\"format\":\"markdown\",\"tags\":[\"kr\",\"kr-dev\",\"ethereum\",\"dapp\",\"jjangjjangman\"],\"links\":[\"https://github.com/ethereum/web3.js/tree/v0.20.6/dist\",\"http://localhost:8545\",\"https://busy.org/@pangol/dapp-5-solc\",\"https://github.com/ethereum/wiki/wiki/JavaScript-API\"],\"users\":[\"pangol\"]}"
    }
  ]
}
pangolreceived 0.001 SP curation reward for @doctor.fish / kr-dev-git
2018/06/21 02:28:33
curatorpangol
reward2.031109 VESTS
comment authordoctor.fish
comment permlinkkr-dev-git
Transaction InfoBlock #23504070/Virtual Operation #12
View Raw JSON Data
{
  "trx_id": "0000000000000000000000000000000000000000",
  "block": 23504070,
  "trx_in_block": 4294967295,
  "op_in_trx": 0,
  "virtual_op": 12,
  "timestamp": "2018-06-21T02:28:33",
  "op": [
    "curation_reward",
    {
      "curator": "pangol",
      "reward": "2.031109 VESTS",
      "comment_author": "doctor.fish",
      "comment_permlink": "kr-dev-git"
    }
  ]
}
pangolreceived 0.025 STEEM, 0.051 SBD, 0.071 SP author reward for @pangol / python-2-mining
2018/06/19 05:20:42
authorpangol
permlinkpython-2-mining
sbd payout0.051 SBD
steem payout0.025 STEEM
vesting payout115.784691 VESTS
Transaction InfoBlock #23449954/Virtual Operation #7
View Raw JSON Data
{
  "trx_id": "0000000000000000000000000000000000000000",
  "block": 23449954,
  "trx_in_block": 4294967295,
  "op_in_trx": 0,
  "virtual_op": 7,
  "timestamp": "2018-06-19T05:20:42",
  "op": [
    "author_reward",
    {
      "author": "pangol",
      "permlink": "python-2-mining",
      "sbd_payout": "0.051 SBD",
      "steem_payout": "0.025 STEEM",
      "vesting_payout": "115.784691 VESTS"
    }
  ]
}
2018/06/19 02:29:18
parent authorsigmoid
parent permlinkgo
authorpangol
permlinkre-sigmoid-go-20180619t022922818z
title
body저도 geth분석하려고 go 보고 있는데.. shell 작성하는 라이브러리도 있는 거 보고 편리하네 라고 생각하게 됐어요 :)
json metadata{"tags":["go"],"app":"steemit/0.1"}
Transaction InfoBlock #23446527/Trx a95450ec6bb2c4215b6bc31c83991df6c652a470
View Raw JSON Data
{
  "trx_id": "a95450ec6bb2c4215b6bc31c83991df6c652a470",
  "block": 23446527,
  "trx_in_block": 46,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-19T02:29:18",
  "op": [
    "comment",
    {
      "parent_author": "sigmoid",
      "parent_permlink": "go",
      "author": "pangol",
      "permlink": "re-sigmoid-go-20180619t022922818z",
      "title": "",
      "body": "저도 geth분석하려고 go 보고 있는데.. shell 작성하는 라이브러리도 있는 거 보고 편리하네 라고 생각하게 됐어요 :)",
      "json_metadata": "{\"tags\":[\"go\"],\"app\":\"steemit/0.1\"}"
    }
  ]
}
2018/06/19 02:27:45
required auths[]
required posting auths["pangol"]
idfollow
json["follow",{"follower":"pangol","following":"sigmoid","what":["blog"]}]
Transaction InfoBlock #23446496/Trx e70ab05a2b3562675b18fb6293457f8eb27082f7
View Raw JSON Data
{
  "trx_id": "e70ab05a2b3562675b18fb6293457f8eb27082f7",
  "block": 23446496,
  "trx_in_block": 18,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-19T02:27:45",
  "op": [
    "custom_json",
    {
      "required_auths": [],
      "required_posting_auths": [
        "pangol"
      ],
      "id": "follow",
      "json": "[\"follow\",{\"follower\":\"pangol\",\"following\":\"sigmoid\",\"what\":[\"blog\"]}]"
    }
  ]
}
pangolupvoted (100.00%) @sigmoid / 1
2018/06/19 02:27:30
voterpangol
authorsigmoid
permlink1
weight10000 (100.00%)
Transaction InfoBlock #23446491/Trx 9ab6412025859f16440f824585088a19502d0085
View Raw JSON Data
{
  "trx_id": "9ab6412025859f16440f824585088a19502d0085",
  "block": 23446491,
  "trx_in_block": 37,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-19T02:27:30",
  "op": [
    "vote",
    {
      "voter": "pangol",
      "author": "sigmoid",
      "permlink": "1",
      "weight": 10000
    }
  ]
}
pangolreceived 0.011 STEEM, 0.021 SBD, 0.030 SP author reward for @pangol / dapp-5-solc
2018/06/19 02:05:03
authorpangol
permlinkdapp-5-solc
sbd payout0.021 SBD
steem payout0.011 STEEM
vesting payout48.751798 VESTS
Transaction InfoBlock #23446041/Virtual Operation #20
View Raw JSON Data
{
  "trx_id": "0000000000000000000000000000000000000000",
  "block": 23446041,
  "trx_in_block": 4294967295,
  "op_in_trx": 0,
  "virtual_op": 20,
  "timestamp": "2018-06-19T02:05:03",
  "op": [
    "author_reward",
    {
      "author": "pangol",
      "permlink": "dapp-5-solc",
      "sbd_payout": "0.021 SBD",
      "steem_payout": "0.011 STEEM",
      "vesting_payout": "48.751798 VESTS"
    }
  ]
}
pangolclaimed reward balance: 0.007 STEEM, 0.013 SBD, 0.019 SP
2018/06/19 00:14:30
accountpangol
reward steem0.007 STEEM
reward sbd0.013 SBD
reward vests30.473217 VESTS
Transaction InfoBlock #23443831/Trx 431c92c1144060d22cc72be3c829e94a3e6b105d
View Raw JSON Data
{
  "trx_id": "431c92c1144060d22cc72be3c829e94a3e6b105d",
  "block": 23443831,
  "trx_in_block": 11,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-19T00:14:30",
  "op": [
    "claim_reward_balance",
    {
      "account": "pangol",
      "reward_steem": "0.007 STEEM",
      "reward_sbd": "0.013 SBD",
      "reward_vests": "30.473217 VESTS"
    }
  ]
}
2018/06/17 06:42:06
voterpenghuren
authorpangol
permlinkre-peopler-re-pangol-python-2-mining-20180614t064804490z
weight200 (2.00%)
Transaction InfoBlock #23393996/Trx 09e7be8d9e5cf06e3186bae06faed1f76c176295
View Raw JSON Data
{
  "trx_id": "09e7be8d9e5cf06e3186bae06faed1f76c176295",
  "block": 23393996,
  "trx_in_block": 14,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-17T06:42:06",
  "op": [
    "vote",
    {
      "voter": "penghuren",
      "author": "pangol",
      "permlink": "re-peopler-re-pangol-python-2-mining-20180614t064804490z",
      "weight": 200
    }
  ]
}
2018/06/17 06:42:00
voterpenghuren
authorpangol
permlinkre-doctorfish-kr-dev-git-20180614t032548514z
weight200 (2.00%)
Transaction InfoBlock #23393994/Trx 7e248408f2426529ec7f82c394885efec063e94b
View Raw JSON Data
{
  "trx_id": "7e248408f2426529ec7f82c394885efec063e94b",
  "block": 23393994,
  "trx_in_block": 6,
  "op_in_trx": 0,
  "virtual_op": 0,
  "timestamp": "2018-06-17T06:42:00",
  "op": [
    "vote",
    {
      "voter": "penghuren",
      "author": "pangol",
      "permlink": "re-doctorfish-kr-dev-git-20180614t032548514z",
      "weight": 200
    }
  ]
}

Account Metadata

POSTING JSON METADATA
profile{"name":"켄타","about":"프로그래머 활동가","location":"대한민국","profile_image":"https://i.imgur.com/q9w4FgI.png","website":""}
JSON METADATA
profile{"name":"켄타","about":"프로그래머 활동가","location":"대한민국","profile_image":"https://i.imgur.com/q9w4FgI.png","website":""}
{
  "posting_json_metadata": {
    "profile": {
      "name": "켄타",
      "about": "프로그래머 활동가",
      "location": "대한민국",
      "profile_image": "https://i.imgur.com/q9w4FgI.png",
      "website": ""
    }
  },
  "json_metadata": {
    "profile": {
      "name": "켄타",
      "about": "프로그래머 활동가",
      "location": "대한민국",
      "profile_image": "https://i.imgur.com/q9w4FgI.png",
      "website": ""
    }
  }
}

Auth Keys

Owner
Single Signature
Public Keys
STM8Qdm82i3txQFUPFf7JHGT5cv8dcqPRUGwDTpZMgiAFiu2F3mrD1/1
Active
Single Signature
Public Keys
STM6HKW1ZpAHTCr8cHAmjtvLbGH8TwJM1Pq3pXfkmb9pgq7z9bkNs1/1
Posting
Single Signature
Public Keys
STM5fYg1UoGobb5Cym354g3k228Y8s4XxX9YHw4kzDNuDUrzoj3rj1/1
App Permissions
Memo
STM6M9NnwRM4xpGEqoAX3WNS6ZgX2QtMH6GYWNvhBBCTBqbzeCUT6
{
  "owner": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM8Qdm82i3txQFUPFf7JHGT5cv8dcqPRUGwDTpZMgiAFiu2F3mrD",
        1
      ]
    ]
  },
  "active": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM6HKW1ZpAHTCr8cHAmjtvLbGH8TwJM1Pq3pXfkmb9pgq7z9bkNs",
        1
      ]
    ]
  },
  "posting": {
    "weight_threshold": 1,
    "account_auths": [
      [
        "busy.app",
        1
      ],
      [
        "dtube.app",
        1
      ],
      [
        "utopian.app",
        1
      ]
    ],
    "key_auths": [
      [
        "STM5fYg1UoGobb5Cym354g3k228Y8s4XxX9YHw4kzDNuDUrzoj3rj",
        1
      ]
    ]
  },
  "memo": "STM6M9NnwRM4xpGEqoAX3WNS6ZgX2QtMH6GYWNvhBBCTBqbzeCUT6"
}

Witness Votes

0 / 30
No active witness votes.
[]