Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33_sdk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
harrylee2015
chain33_sdk
Commits
c8a804dd
Commit
c8a804dd
authored
May 26, 2018
by
lihailei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add orgAddr.
parent
9c8815d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
contract.go
src/controllers/contract.go
+2
-0
No files found.
src/controllers/contract.go
View file @
c8a804dd
...
@@ -6,6 +6,7 @@ import (
...
@@ -6,6 +6,7 @@ import (
jsonrpc
"gitlab.33.cn/chain33/chain33/rpc"
jsonrpc
"gitlab.33.cn/chain33/chain33/rpc"
"gitlab.33.cn/chain33/chain33/types"
"gitlab.33.cn/chain33/chain33/types"
.
"gitlab.33.cn/lihailei/chain33_sdk/src/common"
.
"gitlab.33.cn/lihailei/chain33_sdk/src/common"
.
"gitlab.33.cn/lihailei/chain33_sdk/src/common/crypto"
"encoding/json"
"encoding/json"
...
@@ -33,6 +34,7 @@ func (c *ContractController) Invoke() {
...
@@ -33,6 +34,7 @@ func (c *ContractController) Invoke() {
if
c
.
Ctx
.
Request
.
Method
==
http
.
MethodPost
&&
funcName
==
blacklist
.
FuncName_CreateOrg
{
if
c
.
Ctx
.
Request
.
Method
==
http
.
MethodPost
&&
funcName
==
blacklist
.
FuncName_CreateOrg
{
var
org
blacklist
.
Org
var
org
blacklist
.
Org
json
.
Unmarshal
(
c
.
Ctx
.
Input
.
RequestBody
,
&
org
)
json
.
Unmarshal
(
c
.
Ctx
.
Input
.
RequestBody
,
&
org
)
org
.
OrgAddr
=
GetMd5String
(
UniqueId
())
action
:=
&
blacklist
.
BlackAction
{
Value
:
&
blacklist
.
BlackAction_Or
{
&
org
},
FuncName
:
blacklist
.
FuncName_CreateOrg
}
action
:=
&
blacklist
.
BlackAction
{
Value
:
&
blacklist
.
BlackAction_Or
{
&
org
},
FuncName
:
blacklist
.
FuncName_CreateOrg
}
addr
,
priv
:=
Genaddress
()
addr
,
priv
:=
Genaddress
()
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"user.blacklist"
),
Payload
:
types
.
Encode
(
action
),
Fee
:
1e6
,
To
:
addr
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"user.blacklist"
),
Payload
:
types
.
Encode
(
action
),
Fee
:
1e6
,
To
:
addr
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment