forked from EOSIO/eosio.contracts
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new contract: personal.bos #66
Merged
Thaipanda
merged 2 commits into
boscore:develop
from
maodaishan:feature_account_personal
Mar 27, 2019
Merged
add new contract: personal.bos #66
Thaipanda
merged 2 commits into
boscore:develop
from
maodaishan:feature_account_personal
Mar 27, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.setpersonal 2.sethomepage this contract has a table "personaldata" ,which's a key-value map to store customized public info for accounts. it has 2 columns: key: the primary key value: the value, should be less than 1024. setpersonal:user can call to set the key-value they wish,and read it via get table. sethomepage:the same with setpersonal, just the key is fixed to "homepage", by supplying homepage, dapp can easily guide user to their homepage. with commits on "boscore/bos",user can also use "cleos set personal ..." and "cleos get account ..." to set personaldata and read homepage. also add an inline interface "getpersonal" in personal.bos.hpp for easily accessing this multi-index for contracts. Deployment: when deploying,you need to create account "personal.bos" and set this contract to it to let it work.
Thaipanda
previously approved these changes
Mar 27, 2019
vlbos
reviewed
Mar 27, 2019
tests/personal.bos_tests.cpp
Outdated
|
||
//sethomepage check | ||
//long url check | ||
string *long_url=new string(257,'a'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no delete long_url,memory leak. use long_url.assign(257,'a');
vlbos
reviewed
Mar 27, 2019
tests/personal.bos_tests.cpp
Outdated
); | ||
|
||
//value length check | ||
string* long_value=new string(1025,'a'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no delete long_value,memory leak. use long_value.assign(1025,'a');
vlbos
reviewed
Mar 27, 2019
vlbos
approved these changes
Mar 27, 2019
Thaipanda
approved these changes
Mar 27, 2019
vlbos
pushed a commit
to vlbos/bos.contracts
that referenced
this pull request
Nov 26, 2019
bumped the version to 1.3.0 and changed wasmsdk to cdt
vlbos
pushed a commit
to vlbos/bos.contracts
that referenced
this pull request
Nov 26, 2019
* add new contract: personal.bos ,which contains actions: 1.setpersonal 2.sethomepage this contract has a table "personaldata" ,which's a key-value map to store customized public info for accounts. it has 2 columns: key: the primary key value: the value, should be less than 1024. setpersonal:user can call to set the key-value they wish,and read it via get table. sethomepage:the same with setpersonal, just the key is fixed to "homepage", by supplying homepage, dapp can easily guide user to their homepage. with commits on "boscore/bos",user can also use "cleos set personal ..." and "cleos get account ..." to set personaldata and read homepage. also add an inline interface "getpersonal" in personal.bos.hpp for easily accessing this multi-index for contracts. Deployment: when deploying,you need to create account "personal.bos" and set this contract to it to let it work. * fix memory leak
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add new contract: personal.bos
Change Description
add new contract: personal.bos , contains actions:
1.setpersonal
2.sethomepage
this contract has a table "personaldata" ,which's a key-value map to store customized public info for accounts. it has 2 columns:
key: the primary key
value: the value, should be less than 1024.
setpersonal:user can call to set the key-value they wish,and read it via get table.
sethomepage:the same with setpersonal, just the key is fixed to "homepage", by supplying homepage, dapp can easily guide user to their homepage.
with commits on "boscore/bos",user can also use "cleos set personal ..." and "cleos get account ..." to set personaldata and read homepage.
also add an inline interface "getpersonal" in personal.bos.hpp for easily accessing this multi-index for contracts.
Deployment Changes
when deploying,you need to create account "personal.bos" and set this contract to it to let it work.
API Changes
abi change:
added new contract : personal.bos, with 2 actions:
1.setpersonal :
2.sethomepage :
and a table, named "personaldata", with columns:
key (name, the primary key)
value (string)
also add an inline interface "getpersonal" in personal.bos.hpp for easily accessing this multi-index for contracts.
Documentation Additions
none