Skip to content

Commit 71a9080

Browse files
committed
Update create and update actions
1 parent 1931f37 commit 71a9080

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

community/community.abi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@
264264
{
265265
"name": "has_kyc",
266266
"type": "uint8"
267+
},
268+
{
269+
"name": "auto_invite",
270+
"type": "uint8"
271+
},
272+
{
273+
"name": "subdomain",
274+
"type": "string"
267275
}
268276
]
269277
},
@@ -612,6 +620,18 @@
612620
{
613621
"name": "has_shop",
614622
"type": "uint8"
623+
},
624+
{
625+
"name": "has_kyc",
626+
"type": "uint8"
627+
},
628+
{
629+
"name": "auto_invite",
630+
"type": "uint8"
631+
},
632+
{
633+
"name": "subdomain",
634+
"type": "string"
615635
}
616636
]
617637
},

community/community.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ inline void verify_sha256_prefix(const std::string &value, const std::string &co
2525
void cambiatus::create(eosio::asset cmm_asset, eosio::name creator, std::string logo,
2626
std::string name, std::string description,
2727
eosio::asset inviter_reward, eosio::asset invited_reward,
28-
std::uint8_t has_objectives, std::uint8_t has_shop, std::uint8_t has_kyc)
28+
std::uint8_t has_objectives, std::uint8_t has_shop, std::uint8_t has_kyc,
29+
std::uint8_t auto_invite, std::string subdomain)
2930
{
3031
require_auth(creator);
3132

@@ -77,7 +78,8 @@ void cambiatus::create(eosio::asset cmm_asset, eosio::name creator, std::string
7778

7879
void cambiatus::update(eosio::asset cmm_asset, std::string logo, std::string name,
7980
std::string description, eosio::asset inviter_reward, eosio::asset invited_reward,
80-
std::uint8_t has_objectives, std::uint8_t has_shop)
81+
std::uint8_t has_objectives, std::uint8_t has_shop, std::uint8_t has_kyc,
82+
std::uint8_t auto_invite, std::string subdomain)
8183
{
8284
communities community(_self, _self.value);
8385
const auto &cmm = community.get(cmm_asset.symbol.raw(), "can't find any community with given asset");
@@ -96,6 +98,7 @@ void cambiatus::update(eosio::asset cmm_asset, std::string logo, std::string nam
9698
row.invited_reward = invited_reward;
9799
row.has_objectives = has_objectives;
98100
row.has_shop = has_shop;
101+
row.has_kyc = has_kyc;
99102
});
100103
}
101104

community/community.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,15 @@ class [[eosio::contract("community")]] cambiatus : public eosio::contract
164164
/// Creates a cambiatus community
165165
ACTION create(eosio::asset cmm_asset, eosio::name creator, std::string logo, std::string name,
166166
std::string description, eosio::asset inviter_reward, eosio::asset invited_reward,
167-
std::uint8_t has_objectives, std::uint8_t has_shop, std::uint8_t has_kyc);
167+
std::uint8_t has_objectives, std::uint8_t has_shop, std::uint8_t has_kyc,
168+
std::uint8_t auto_invite, std::string subdomain);
168169

169170
/// @abi action
170171
/// Updates community attributes
171172
ACTION update(eosio::asset cmm_asset, std::string logo, std::string name,
172173
std::string description, eosio::asset inviter_reward, eosio::asset invited_reward,
173-
std::uint8_t has_objectives, std::uint8_t has_shop);
174+
std::uint8_t has_objectives, std::uint8_t has_shop, std::uint8_t has_kyc,
175+
std::uint8_t auto_invite, std::string subdomain);
174176

175177
/// @abi action
176178
/// Adds a user to a community

community/community.wasm

1.13 KB
Binary file not shown.

0 commit comments

Comments
 (0)