{"action":"closed","number":1302,"pull_request":{"url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1302","id":212617244,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNjE3MjQ0","html_url":"https://github.com/bitshares/bitshares-core/pull/1302","diff_url":"https://github.com/bitshares/bitshares-core/pull/1302.diff","patch_url":"https://github.com/bitshares/bitshares-core/pull/1302.patch","issue_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/1302","number":1302,"state":"closed","locked":false,"title":"Create plugin script","user":{"login":"oxarbitrage","id":21685097,"node_id":"MDQ6VXNlcjIxNjg1MDk3","avatar_url":"https://avatars0.githubusercontent.com/u/21685097?v=4","gravatar_id":"","url":"https://api.github.com/users/oxarbitrage","html_url":"https://github.com/oxarbitrage","followers_url":"https://api.github.com/users/oxarbitrage/followers","following_url":"https://api.github.com/users/oxarbitrage/following{/other_user}","gists_url":"https://api.github.com/users/oxarbitrage/gists{/gist_id}","starred_url":"https://api.github.com/users/oxarbitrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxarbitrage/subscriptions","organizations_url":"https://api.github.com/users/oxarbitrage/orgs","repos_url":"https://api.github.com/users/oxarbitrage/repos","events_url":"https://api.github.com/users/oxarbitrage/events{/privacy}","received_events_url":"https://api.github.com/users/oxarbitrage/received_events","type":"User","site_admin":false},"body":"When working with plugins the developer find himself doing the same renaming work too many times. \r\n\r\nI found a script in eos that actually do the job of automating plugin creation: https://github.com/EOSIO/eos/blob/master/plugins/eosio-make_new_plugin.sh\r\n\r\nSo i copied over and added some further instructions to get up and running in bitshares after the files are all in place.\r\n\r\nThe template is a plugin with implementation class, most of our plugins are like that even if there are others that don't follow this pattern i think this is the way most of them can be built.\r\n\r\nIt haves some minimal functionality on how to add an argument and an onBlock function that will execute every block.\r\n\r\nFor further examples the developer will check other plugins, unfortunately we have no plugin that exposes api calls in the plugin itself. This is only visible on @xeroc hello plugin:\r\n\r\nhttps://github.com/bitshares/bitshares-core/tree/hello_plugin/libraries/plugins\r\n\r\nI think we should encourage the use of the api in the plugin itself rather than adding to `api.cpp` but i didn't added this to template as most plugins will not want it, tried to keep it simple.\r\n\r\nSample script output:\r\n\r\n```\r\nalfredo@alfredo-Inspiron-5559 ~/CLionProjects/template_plugin/libraries/plugins $ ./make_new_plugin.sh stoploss\r\nCopying template...\r\nRenaming files/directories...\r\nRenaming in files...\r\nDone! stoploss is ready.\r\nNext steps:\r\n1- Add 'add_subdirectory( stoploss )' to CmakeLists.txt in this directory.\r\n2- Add 'graphene_stoploss' to ../../programs/witness_node/CMakeLists.txt with the other plugins.\r\n3- Include plugin header file '#include <graphene/stoploss/stoploss.hpp>' to ../../programs/witness_node/main.cpp.\r\n4- Initialize plugin with the others with 'auto stoploss_plug = node->register_plugin<stoploss::stoploss>();' in ../../programs/witness_node/main.cpp\r\n5- cmake and make\r\n5- Start plugin with './../programs/witness_node/witness_node --plugins \"stoploss\"'. After the seed nodes are added you start to see see a msgs from the plugin 'onBlock' \r\nalfredo@alfredo-Inspiron-5559 ~/CLionProjects/template_plugin/libraries/plugins $ \r\n```","created_at":"2018-09-02T23:37:19Z","updated_at":"2018-09-28T17:51:13Z","closed_at":"2018-09-28T17:51:13Z","merged_at":"2018-09-28T17:51:13Z","merge_commit_sha":"90ae25d71989d34166fb8a98b9d4dcf1fca9082c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/bitshares/bitshares-core/milestones/15","html_url":"https://github.com/bitshares/bitshares-core/milestone/15","labels_url":"https://api.github.com/repos/bitshares/bitshares-core/milestones/15/labels","id":3530618,"node_id":"MDk6TWlsZXN0b25lMzUzMDYxOA==","number":15,"title":"201810 - Feature Release","description":"Next feature release after 201808.","creator":{"login":"abitmore","id":9946777,"node_id":"MDQ6VXNlcjk5NDY3Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/9946777?v=4","gravatar_id":"","url":"https://api.github.com/users/abitmore","html_url":"https://github.com/abitmore","followers_url":"https://api.github.com/users/abitmore/followers","following_url":"https://api.github.com/users/abitmore/following{/other_user}","gists_url":"https://api.github.com/users/abitmore/gists{/gist_id}","starred_url":"https://api.github.com/users/abitmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abitmore/subscriptions","organizations_url":"https://api.github.com/users/abitmore/orgs","repos_url":"https://api.github.com/users/abitmore/repos","events_url":"https://api.github.com/users/abitmore/events{/privacy}","received_events_url":"https://api.github.com/users/abitmore/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":44,"state":"open","created_at":"2018-07-29T21:19:51Z","updated_at":"2018-09-28T17:51:13Z","due_on":"2018-10-26T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1302/commits","review_comments_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1302/comments","review_comment_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/1302/comments","statuses_url":"https://api.github.com/repos/bitshares/bitshares-core/statuses/59728cbdb0ea46e13d3219221e7ad5f48ba2a39f","head":{"label":"oxarbitrage:template_plugin","ref":"template_plugin","sha":"59728cbdb0ea46e13d3219221e7ad5f48ba2a39f","user":{"login":"oxarbitrage","id":21685097,"node_id":"MDQ6VXNlcjIxNjg1MDk3","avatar_url":"https://avatars0.githubusercontent.com/u/21685097?v=4","gravatar_id":"","url":"https://api.github.com/users/oxarbitrage","html_url":"https://github.com/oxarbitrage","followers_url":"https://api.github.com/users/oxarbitrage/followers","following_url":"https://api.github.com/users/oxarbitrage/following{/other_user}","gists_url":"https://api.github.com/users/oxarbitrage/gists{/gist_id}","starred_url":"https://api.github.com/users/oxarbitrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxarbitrage/subscriptions","organizations_url":"https://api.github.com/users/oxarbitrage/orgs","repos_url":"https://api.github.com/users/oxarbitrage/repos","events_url":"https://api.github.com/users/oxarbitrage/events{/privacy}","received_events_url":"https://api.github.com/users/oxarbitrage/received_events","type":"User","site_admin":false},"repo":{"id":79817333,"node_id":"MDEwOlJlcG9zaXRvcnk3OTgxNzMzMw==","name":"bitshares-core","full_name":"oxarbitrage/bitshares-core","private":false,"owner":{"login":"oxarbitrage","id":21685097,"node_id":"MDQ6VXNlcjIxNjg1MDk3","avatar_url":"https://avatars0.githubusercontent.com/u/21685097?v=4","gravatar_id":"","url":"https://api.github.com/users/oxarbitrage","html_url":"https://github.com/oxarbitrage","followers_url":"https://api.github.com/users/oxarbitrage/followers","following_url":"https://api.github.com/users/oxarbitrage/following{/other_user}","gists_url":"https://api.github.com/users/oxarbitrage/gists{/gist_id}","starred_url":"https://api.github.com/users/oxarbitrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxarbitrage/subscriptions","organizations_url":"https://api.github.com/users/oxarbitrage/orgs","repos_url":"https://api.github.com/users/oxarbitrage/repos","events_url":"https://api.github.com/users/oxarbitrage/events{/privacy}","received_events_url":"https://api.github.com/users/oxarbitrage/received_events","type":"User","site_admin":false},"html_url":"https://github.com/oxarbitrage/bitshares-core","description":"Your share in the Decentralized Exchange","fork":true,"url":"https://api.github.com/repos/oxarbitrage/bitshares-core","forks_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/forks","keys_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/teams","hooks_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/hooks","issue_events_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/issues/events{/number}","events_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/events","assignees_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/assignees{/user}","branches_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/branches{/branch}","tags_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/tags","blobs_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/statuses/{sha}","languages_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/languages","stargazers_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/stargazers","contributors_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/contributors","subscribers_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/subscribers","subscription_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/subscription","commits_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/contents/{+path}","compare_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/merges","archive_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/downloads","issues_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/issues{/number}","pulls_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/pulls{/number}","milestones_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/milestones{/number}","notifications_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/labels{/name}","releases_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/releases{/id}","deployments_url":"https://api.github.com/repos/oxarbitrage/bitshares-core/deployments","created_at":"2017-01-23T15:29:58Z","updated_at":"2017-01-23T15:30:02Z","pushed_at":"2018-09-28T15:41:45Z","git_url":"git://github.com/oxarbitrage/bitshares-core.git","ssh_url":"git@github.com:oxarbitrage/bitshares-core.git","clone_url":"https://github.com/oxarbitrage/bitshares-core.git","svn_url":"https://github.com/oxarbitrage/bitshares-core","homepage":"https://bitshares.org/","size":97767,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitshares:develop","ref":"develop","sha":"8189b452150863f2f10e680b6357b83412edc608","user":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"repo":{"id":44123252,"node_id":"MDEwOlJlcG9zaXRvcnk0NDEyMzI1Mg==","name":"bitshares-core","full_name":"bitshares/bitshares-core","private":false,"owner":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bitshares/bitshares-core","description":"BitShares Blockchain implementation and command-line interface","fork":true,"url":"https://api.github.com/repos/bitshares/bitshares-core","forks_url":"https://api.github.com/repos/bitshares/bitshares-core/forks","keys_url":"https://api.github.com/repos/bitshares/bitshares-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitshares/bitshares-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitshares/bitshares-core/teams","hooks_url":"https://api.github.com/repos/bitshares/bitshares-core/hooks","issue_events_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/events{/number}","events_url":"https://api.github.com/repos/bitshares/bitshares-core/events","assignees_url":"https://api.github.com/repos/bitshares/bitshares-core/assignees{/user}","branches_url":"https://api.github.com/repos/bitshares/bitshares-core/branches{/branch}","tags_url":"https://api.github.com/repos/bitshares/bitshares-core/tags","blobs_url":"https://api.github.com/repos/bitshares/bitshares-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitshares/bitshares-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitshares/bitshares-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitshares/bitshares-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitshares/bitshares-core/statuses/{sha}","languages_url":"https://api.github.com/repos/bitshares/bitshares-core/languages","stargazers_url":"https://api.github.com/repos/bitshares/bitshares-core/stargazers","contributors_url":"https://api.github.com/repos/bitshares/bitshares-core/contributors","subscribers_url":"https://api.github.com/repos/bitshares/bitshares-core/subscribers","subscription_url":"https://api.github.com/repos/bitshares/bitshares-core/subscription","commits_url":"https://api.github.com/repos/bitshares/bitshares-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitshares/bitshares-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitshares/bitshares-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitshares/bitshares-core/contents/{+path}","compare_url":"https://api.github.com/repos/bitshares/bitshares-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitshares/bitshares-core/merges","archive_url":"https://api.github.com/repos/bitshares/bitshares-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitshares/bitshares-core/downloads","issues_url":"https://api.github.com/repos/bitshares/bitshares-core/issues{/number}","pulls_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls{/number}","milestones_url":"https://api.github.com/repos/bitshares/bitshares-core/milestones{/number}","notifications_url":"https://api.github.com/repos/bitshares/bitshares-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitshares/bitshares-core/labels{/name}","releases_url":"https://api.github.com/repos/bitshares/bitshares-core/releases{/id}","deployments_url":"https://api.github.com/repos/bitshares/bitshares-core/deployments","created_at":"2015-10-12T17:36:04Z","updated_at":"2018-09-28T02:59:02Z","pushed_at":"2018-09-28T17:51:13Z","git_url":"git://github.com/bitshares/bitshares-core.git","ssh_url":"git@github.com:bitshares/bitshares-core.git","clone_url":"https://github.com/bitshares/bitshares-core.git","svn_url":"https://github.com/bitshares/bitshares-core","homepage":"https://bitshares.org/","size":21953,"stargazers_count":934,"watchers_count":934,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":428,"mirror_url":null,"archived":false,"open_issues_count":256,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":428,"open_issues":256,"watchers":934,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1302"},"html":{"href":"https://github.com/bitshares/bitshares-core/pull/1302"},"issue":{"href":"https://api.github.com/repos/bitshares/bitshares-core/issues/1302"},"comments":{"href":"https://api.github.com/repos/bitshares/bitshares-core/issues/1302/comments"},"review_comments":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1302/comments"},"review_comment":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1302/commits"},"statuses":{"href":"https://api.github.com/repos/bitshares/bitshares-core/statuses/59728cbdb0ea46e13d3219221e7ad5f48ba2a39f"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"oxarbitrage","id":21685097,"node_id":"MDQ6VXNlcjIxNjg1MDk3","avatar_url":"https://avatars0.githubusercontent.com/u/21685097?v=4","gravatar_id":"","url":"https://api.github.com/users/oxarbitrage","html_url":"https://github.com/oxarbitrage","followers_url":"https://api.github.com/users/oxarbitrage/followers","following_url":"https://api.github.com/users/oxarbitrage/following{/other_user}","gists_url":"https://api.github.com/users/oxarbitrage/gists{/gist_id}","starred_url":"https://api.github.com/users/oxarbitrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxarbitrage/subscriptions","organizations_url":"https://api.github.com/users/oxarbitrage/orgs","repos_url":"https://api.github.com/users/oxarbitrage/repos","events_url":"https://api.github.com/users/oxarbitrage/events{/privacy}","received_events_url":"https://api.github.com/users/oxarbitrage/received_events","type":"User","site_admin":false},"comments":4,"review_comments":7,"maintainer_can_modify":false,"commits":7,"additions":254,"deletions":0,"changed_files":4}}
{"actor":{"display_login":"oxarbitrage"}}