{"action":"created","comment":{"url":"https://api.github.com/repos/iotexproject/iotex-core/pulls/comments/263652399","pull_request_review_id":212124134,"id":263652399,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2MzY1MjM5OQ==","diff_hunk":"@@ -24,3 +34,57 @@ func ConnectToEndpoint() (*grpc.ClientConn, error) {\n \t}\n \treturn grpc.Dial(endpoint, grpc.WithInsecure())\n }\n+\n+// IotxStringToRau convert Iotx string into Rau big int\n+func IotxStringToRau(amount string) (*big.Int, error) {\n+\tamountStrings := strings.Split(amount, \".\")\n+\tif len(amountStrings) == 1 {\n+\t\tfor i := 0; i < IotxDecimalNum; i++ {\n+\t\t\tamountStrings[0] += \"0\"\n+\t\t}\n+\t\tamountRau, ok := big.NewInt(0).SetString(amountStrings[0], 10)\n+\t\tif !ok {\n+\t\t\treturn nil, fmt.Errorf(\"failed to convert string into big int\")\n+\t\t}\n+\t\treturn amountRau, nil\n+\t}\n+\tif len(amountStrings) > 2 || len(amountStrings[1]) > IotxDecimalNum {\n+\t\treturn nil, fmt.Errorf(\"failed to convert string into big int\")\n+\t}\n+\tamountStrings[0] += amountStrings[1]\n+\tfor i := 0; i < IotxDecimalNum-len(amountStrings[1]); i++ {\n+\t\tamountStrings[0] += \"0\"\n+\t}\n+\tamountRau, ok := big.NewInt(0).SetString(amountStrings[0], 10)\n+\tif !ok {\n+\t\treturn nil, fmt.Errorf(\"failed to convert string into big int\")\n+\t}\n+\treturn amountRau, nil\n+}\n+\n+// GasPriceStringToRau convert GasPrice string into Rau big int\n+func GasPriceStringToRau(amount string) (*big.Int, error) {","path":"cli/ioctl/util/util.go","position":57,"original_position":57,"commit_id":"8c3e91ad6cebd3fc564c9191bab8b406b7ea8e72","original_commit_id":"8c3e91ad6cebd3fc564c9191bab8b406b7ea8e72","user":{"login":"golangcibot","id":42910462,"node_id":"MDQ6VXNlcjQyOTEwNDYy","avatar_url":"https://avatars1.githubusercontent.com/u/42910462?v=4","gravatar_id":"","url":"https://api.github.com/users/golangcibot","html_url":"https://github.com/golangcibot","followers_url":"https://api.github.com/users/golangcibot/followers","following_url":"https://api.github.com/users/golangcibot/following{/other_user}","gists_url":"https://api.github.com/users/golangcibot/gists{/gist_id}","starred_url":"https://api.github.com/users/golangcibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golangcibot/subscriptions","organizations_url":"https://api.github.com/users/golangcibot/orgs","repos_url":"https://api.github.com/users/golangcibot/repos","events_url":"https://api.github.com/users/golangcibot/events{/privacy}","received_events_url":"https://api.github.com/users/golangcibot/received_events","type":"User","site_admin":false},"body":"66-90 lines are duplicate of `cli/ioctl/util/util.go:39-63` (from `dupl`)","created_at":"2019-03-08T03:06:20Z","updated_at":"2019-03-08T03:06:21Z","html_url":"https://github.com/iotexproject/iotex-core/pull/697#discussion_r263652399","pull_request_url":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/iotexproject/iotex-core/pulls/comments/263652399"},"html":{"href":"https://github.com/iotexproject/iotex-core/pull/697#discussion_r263652399"},"pull_request":{"href":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697"}}},"pull_request":{"url":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697","id":259345689,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU5MzQ1Njg5","html_url":"https://github.com/iotexproject/iotex-core/pull/697","diff_url":"https://github.com/iotexproject/iotex-core/pull/697.diff","patch_url":"https://github.com/iotexproject/iotex-core/pull/697.patch","issue_url":"https://api.github.com/repos/iotexproject/iotex-core/issues/697","number":697,"state":"open","locked":false,"title":" change units for ioctl","user":{"login":"Frankonly","id":35358771,"node_id":"MDQ6VXNlcjM1MzU4Nzcx","avatar_url":"https://avatars1.githubusercontent.com/u/35358771?v=4","gravatar_id":"","url":"https://api.github.com/users/Frankonly","html_url":"https://github.com/Frankonly","followers_url":"https://api.github.com/users/Frankonly/followers","following_url":"https://api.github.com/users/Frankonly/following{/other_user}","gists_url":"https://api.github.com/users/Frankonly/gists{/gist_id}","starred_url":"https://api.github.com/users/Frankonly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frankonly/subscriptions","organizations_url":"https://api.github.com/users/Frankonly/orgs","repos_url":"https://api.github.com/users/Frankonly/repos","events_url":"https://api.github.com/users/Frankonly/events{/privacy}","received_events_url":"https://api.github.com/users/Frankonly/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-03-08T03:04:51Z","updated_at":"2019-03-08T03:06:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed5685a0a47e1a0adcd8407d9fb7a846d97114af","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[{"name":"protocol-team","id":2774529,"node_id":"MDQ6VGVhbTI3NzQ1Mjk=","slug":"protocol-team","description":"protocol dev team","privacy":"closed","url":"https://api.github.com/teams/2774529","html_url":"https://github.com/orgs/iotexproject/teams/protocol-team","members_url":"https://api.github.com/teams/2774529/members{/member}","repositories_url":"https://api.github.com/teams/2774529/repos","permission":"pull"}],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697/commits","review_comments_url":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697/comments","review_comment_url":"https://api.github.com/repos/iotexproject/iotex-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iotexproject/iotex-core/issues/697/comments","statuses_url":"https://api.github.com/repos/iotexproject/iotex-core/statuses/8c3e91ad6cebd3fc564c9191bab8b406b7ea8e72","head":{"label":"Frankonly:ioctl","ref":"ioctl","sha":"8c3e91ad6cebd3fc564c9191bab8b406b7ea8e72","user":{"login":"Frankonly","id":35358771,"node_id":"MDQ6VXNlcjM1MzU4Nzcx","avatar_url":"https://avatars1.githubusercontent.com/u/35358771?v=4","gravatar_id":"","url":"https://api.github.com/users/Frankonly","html_url":"https://github.com/Frankonly","followers_url":"https://api.github.com/users/Frankonly/followers","following_url":"https://api.github.com/users/Frankonly/following{/other_user}","gists_url":"https://api.github.com/users/Frankonly/gists{/gist_id}","starred_url":"https://api.github.com/users/Frankonly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frankonly/subscriptions","organizations_url":"https://api.github.com/users/Frankonly/orgs","repos_url":"https://api.github.com/users/Frankonly/repos","events_url":"https://api.github.com/users/Frankonly/events{/privacy}","received_events_url":"https://api.github.com/users/Frankonly/received_events","type":"User","site_admin":false},"repo":{"id":174023083,"node_id":"MDEwOlJlcG9zaXRvcnkxNzQwMjMwODM=","name":"iotex-core","full_name":"Frankonly/iotex-core","private":false,"owner":{"login":"Frankonly","id":35358771,"node_id":"MDQ6VXNlcjM1MzU4Nzcx","avatar_url":"https://avatars1.githubusercontent.com/u/35358771?v=4","gravatar_id":"","url":"https://api.github.com/users/Frankonly","html_url":"https://github.com/Frankonly","followers_url":"https://api.github.com/users/Frankonly/followers","following_url":"https://api.github.com/users/Frankonly/following{/other_user}","gists_url":"https://api.github.com/users/Frankonly/gists{/gist_id}","starred_url":"https://api.github.com/users/Frankonly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frankonly/subscriptions","organizations_url":"https://api.github.com/users/Frankonly/orgs","repos_url":"https://api.github.com/users/Frankonly/repos","events_url":"https://api.github.com/users/Frankonly/events{/privacy}","received_events_url":"https://api.github.com/users/Frankonly/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Frankonly/iotex-core","description":"Official Go implementation of the IoTeX protocol","fork":true,"url":"https://api.github.com/repos/Frankonly/iotex-core","forks_url":"https://api.github.com/repos/Frankonly/iotex-core/forks","keys_url":"https://api.github.com/repos/Frankonly/iotex-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Frankonly/iotex-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Frankonly/iotex-core/teams","hooks_url":"https://api.github.com/repos/Frankonly/iotex-core/hooks","issue_events_url":"https://api.github.com/repos/Frankonly/iotex-core/issues/events{/number}","events_url":"https://api.github.com/repos/Frankonly/iotex-core/events","assignees_url":"https://api.github.com/repos/Frankonly/iotex-core/assignees{/user}","branches_url":"https://api.github.com/repos/Frankonly/iotex-core/branches{/branch}","tags_url":"https://api.github.com/repos/Frankonly/iotex-core/tags","blobs_url":"https://api.github.com/repos/Frankonly/iotex-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Frankonly/iotex-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Frankonly/iotex-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/Frankonly/iotex-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Frankonly/iotex-core/statuses/{sha}","languages_url":"https://api.github.com/repos/Frankonly/iotex-core/languages","stargazers_url":"https://api.github.com/repos/Frankonly/iotex-core/stargazers","contributors_url":"https://api.github.com/repos/Frankonly/iotex-core/contributors","subscribers_url":"https://api.github.com/repos/Frankonly/iotex-core/subscribers","subscription_url":"https://api.github.com/repos/Frankonly/iotex-core/subscription","commits_url":"https://api.github.com/repos/Frankonly/iotex-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/Frankonly/iotex-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/Frankonly/iotex-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/Frankonly/iotex-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/Frankonly/iotex-core/contents/{+path}","compare_url":"https://api.github.com/repos/Frankonly/iotex-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Frankonly/iotex-core/merges","archive_url":"https://api.github.com/repos/Frankonly/iotex-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Frankonly/iotex-core/downloads","issues_url":"https://api.github.com/repos/Frankonly/iotex-core/issues{/number}","pulls_url":"https://api.github.com/repos/Frankonly/iotex-core/pulls{/number}","milestones_url":"https://api.github.com/repos/Frankonly/iotex-core/milestones{/number}","notifications_url":"https://api.github.com/repos/Frankonly/iotex-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Frankonly/iotex-core/labels{/name}","releases_url":"https://api.github.com/repos/Frankonly/iotex-core/releases{/id}","deployments_url":"https://api.github.com/repos/Frankonly/iotex-core/deployments","created_at":"2019-03-05T21:25:42Z","updated_at":"2019-03-05T21:25:46Z","pushed_at":"2019-03-08T03:03:45Z","git_url":"git://github.com/Frankonly/iotex-core.git","ssh_url":"git@github.com:Frankonly/iotex-core.git","clone_url":"https://github.com/Frankonly/iotex-core.git","svn_url":"https://github.com/Frankonly/iotex-core","homepage":"https://iotex.io","size":62081,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"iotexproject:master","ref":"master","sha":"78083baa84bf248efcda72b6b0be3965606b7dd7","user":{"login":"iotexproject","id":34317526,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MzE3NTI2","avatar_url":"https://avatars3.githubusercontent.com/u/34317526?v=4","gravatar_id":"","url":"https://api.github.com/users/iotexproject","html_url":"https://github.com/iotexproject","followers_url":"https://api.github.com/users/iotexproject/followers","following_url":"https://api.github.com/users/iotexproject/following{/other_user}","gists_url":"https://api.github.com/users/iotexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/iotexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iotexproject/subscriptions","organizations_url":"https://api.github.com/users/iotexproject/orgs","repos_url":"https://api.github.com/users/iotexproject/repos","events_url":"https://api.github.com/users/iotexproject/events{/privacy}","received_events_url":"https://api.github.com/users/iotexproject/received_events","type":"Organization","site_admin":false},"repo":{"id":130281002,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAyODEwMDI=","name":"iotex-core","full_name":"iotexproject/iotex-core","private":false,"owner":{"login":"iotexproject","id":34317526,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MzE3NTI2","avatar_url":"https://avatars3.githubusercontent.com/u/34317526?v=4","gravatar_id":"","url":"https://api.github.com/users/iotexproject","html_url":"https://github.com/iotexproject","followers_url":"https://api.github.com/users/iotexproject/followers","following_url":"https://api.github.com/users/iotexproject/following{/other_user}","gists_url":"https://api.github.com/users/iotexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/iotexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iotexproject/subscriptions","organizations_url":"https://api.github.com/users/iotexproject/orgs","repos_url":"https://api.github.com/users/iotexproject/repos","events_url":"https://api.github.com/users/iotexproject/events{/privacy}","received_events_url":"https://api.github.com/users/iotexproject/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/iotexproject/iotex-core","description":"Official Go implementation of the IoTeX protocol","fork":false,"url":"https://api.github.com/repos/iotexproject/iotex-core","forks_url":"https://api.github.com/repos/iotexproject/iotex-core/forks","keys_url":"https://api.github.com/repos/iotexproject/iotex-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iotexproject/iotex-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iotexproject/iotex-core/teams","hooks_url":"https://api.github.com/repos/iotexproject/iotex-core/hooks","issue_events_url":"https://api.github.com/repos/iotexproject/iotex-core/issues/events{/number}","events_url":"https://api.github.com/repos/iotexproject/iotex-core/events","assignees_url":"https://api.github.com/repos/iotexproject/iotex-core/assignees{/user}","branches_url":"https://api.github.com/repos/iotexproject/iotex-core/branches{/branch}","tags_url":"https://api.github.com/repos/iotexproject/iotex-core/tags","blobs_url":"https://api.github.com/repos/iotexproject/iotex-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iotexproject/iotex-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iotexproject/iotex-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/iotexproject/iotex-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iotexproject/iotex-core/statuses/{sha}","languages_url":"https://api.github.com/repos/iotexproject/iotex-core/languages","stargazers_url":"https://api.github.com/repos/iotexproject/iotex-core/stargazers","contributors_url":"https://api.github.com/repos/iotexproject/iotex-core/contributors","subscribers_url":"https://api.github.com/repos/iotexproject/iotex-core/subscribers","subscription_url":"https://api.github.com/repos/iotexproject/iotex-core/subscription","commits_url":"https://api.github.com/repos/iotexproject/iotex-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/iotexproject/iotex-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/iotexproject/iotex-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/iotexproject/iotex-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/iotexproject/iotex-core/contents/{+path}","compare_url":"https://api.github.com/repos/iotexproject/iotex-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iotexproject/iotex-core/merges","archive_url":"https://api.github.com/repos/iotexproject/iotex-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iotexproject/iotex-core/downloads","issues_url":"https://api.github.com/repos/iotexproject/iotex-core/issues{/number}","pulls_url":"https://api.github.com/repos/iotexproject/iotex-core/pulls{/number}","milestones_url":"https://api.github.com/repos/iotexproject/iotex-core/milestones{/number}","notifications_url":"https://api.github.com/repos/iotexproject/iotex-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iotexproject/iotex-core/labels{/name}","releases_url":"https://api.github.com/repos/iotexproject/iotex-core/releases{/id}","deployments_url":"https://api.github.com/repos/iotexproject/iotex-core/deployments","created_at":"2018-04-19T22:56:20Z","updated_at":"2019-03-08T00:20:53Z","pushed_at":"2019-03-08T03:04:52Z","git_url":"git://github.com/iotexproject/iotex-core.git","ssh_url":"git@github.com:iotexproject/iotex-core.git","clone_url":"https://github.com/iotexproject/iotex-core.git","svn_url":"https://github.com/iotexproject/iotex-core","homepage":"https://iotex.io","size":62104,"stargazers_count":876,"watchers_count":876,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":116,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":116,"open_issues":26,"watchers":876,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697"},"html":{"href":"https://github.com/iotexproject/iotex-core/pull/697"},"issue":{"href":"https://api.github.com/repos/iotexproject/iotex-core/issues/697"},"comments":{"href":"https://api.github.com/repos/iotexproject/iotex-core/issues/697/comments"},"review_comments":{"href":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697/comments"},"review_comment":{"href":"https://api.github.com/repos/iotexproject/iotex-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iotexproject/iotex-core/pulls/697/commits"},"statuses":{"href":"https://api.github.com/repos/iotexproject/iotex-core/statuses/8c3e91ad6cebd3fc564c9191bab8b406b7ea8e72"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"golangcibot"}}