chore: switching to cdt-cpp

This commit is contained in:
dafuga
2023-11-28 22:21:19 -08:00
parent fd380bde02
commit 17f1ce6e3b
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ node_modules:
yarn install --non-interactive --frozen-lockfile
contract/%.abi: contract/%.cpp contract/%.contracts.md
eosio-cpp -R contract -contract=$(notdir $(basename $<)) \
cdt-cpp -R contract -contract=$(notdir $(basename $<)) \
-abigen -abigen_output=$@ -o $(basename $<).wasm -O3 $<
src/contract-types.ts: contract/$(CONTRACT).abi
@@ -21,7 +21,7 @@ src/contract-types.ts: contract/$(CONTRACT).abi
contract: contract/$(CONTRACT).abi
.PHONY: deploy-contract
deploy-contract: contract
deploy-contract:
cleos -u $(NODE_URL) set contract \
$(CONTRACT_ACCOUNT) contract/ ${CONTRACT}.wasm ${CONTRACT}.abi
+2 -2
View File
@@ -55,7 +55,7 @@ public:
require_auth(author);
todos_table todos(_self, author.value);
auto itr = todos.find(id);
check(itr != todos.end(), "Todo not found");
check(itr != todos.end(), "Todo was not found");
check(itr->author == author, "You are not the author");
todos.erase(itr);
}
@@ -65,7 +65,7 @@ public:
require_auth(author);
todos_table todos(_self, author.value);
auto itr = todos.find(id);
check(itr != todos.end(), "Todo not found");
check(itr != todos.end(), "Todo was not found");
check(itr->author == author, "You are not the author");
todos.modify(itr, _self, [&](todo_row &row) { // Contract pays for RAM
row.completed = complete ? 1 : 0; // Set the todo as completed (1) or incomplete (0) based on the boolean value