MCPcopy Create free account
hub / github.com/DNAProject/DNA / allowance

Function allowance

wasmtest/contracts-cplus/test_oep4.py:265–273  ·  view source on GitHub ↗

check how many token the spender is allowed to spend from owner account :param owner: token owner :param spender: token spender :return: the allowed amount of tokens

(owner,spender)

Source from the content-addressed store, hash-verified

263
264
265def allowance(owner,spender):
266 """
267 check how many token the spender is allowed to spend from owner account
268 :param owner: token owner
269 :param spender: token spender
270 :return: the allowed amount of tokens
271 """
272 key = concat(concat(APPROVE_PREFIX,owner),spender)
273 return Get(ctx,key)
274
275
276def testcase():

Callers 3

MainFunction · 0.85
test_native_ontMethod · 0.85
invokeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected