From 73d5b95a6cba9271804426e08bc802de7c37fca3 Mon Sep 17 00:00:00 2001 From: Jack Tanner Date: Tue, 16 Jan 2024 18:49:05 +0100 Subject: [PATCH] chore: Removes addperm --- contracts/demo.tmy/src/demo.tmy.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/contracts/demo.tmy/src/demo.tmy.cpp b/contracts/demo.tmy/src/demo.tmy.cpp index 916a841..6c5c295 100644 --- a/contracts/demo.tmy/src/demo.tmy.cpp +++ b/contracts/demo.tmy/src/demo.tmy.cpp @@ -179,22 +179,4 @@ namespace eosio check(it->balance.amount == 0, "Cannot close because the balance is not zero."); acnts.erase(it); } - - void token::addperm(const name &per) - { - require_auth(get_self()); - permission permissions(get_self(), get_self().value); - - auto itr = permissions.find(0); - if (itr == permissions.end()) - { - permissions.emplace(get_self(), [&](auto &row) - { row.permission_name = per; }); - } - else - { - permissions.modify(itr, eosio::same_payer, [&](auto &row) - { row.permission_name = per; }); - } - } } /// namespace eosio