diff --git a/OEP4Sample/OEP4Sample.py b/OEP4Sample/OEP4Sample.py index 2023603..068b374 100644 --- a/OEP4Sample/OEP4Sample.py +++ b/OEP4Sample/OEP4Sample.py @@ -120,14 +120,14 @@ def decimals(): """ :return: the decimals of the token """ - return DECIMALS + return DECIMALS + 0 def totalSupply(): """ :return: the total supply of the token """ - return Get(ctx, SUPPLY_KEY) + return Get(ctx, SUPPLY_KEY) + 0 def balanceOf(account): @@ -137,7 +137,7 @@ def balanceOf(account): """ if len(account) != 20: raise Exception("address length error") - return Get(ctx,concat(BALANCE_PREFIX,account)) + return Get(ctx,concat(BALANCE_PREFIX,account)) + 0 def transfer(from_acct,to_acct,amount): @@ -265,4 +265,4 @@ def allowance(owner,spender): :return: the allowed amount of tokens """ key = concat(concat(APPROVE_PREFIX,owner),spender) - return Get(ctx,key) \ No newline at end of file + return Get(ctx,key) + 0 diff --git a/OEP4Sample/OEP4Sample_compiler2.0.py b/OEP4Sample/OEP4Sample_compiler2.0.py index 7d559f1..27bfd04 100644 --- a/OEP4Sample/OEP4Sample_compiler2.0.py +++ b/OEP4Sample/OEP4Sample_compiler2.0.py @@ -129,7 +129,7 @@ def totalSupply(): """ :return: the total supply of the token """ - return Get(ctx, SUPPLY_KEY) + return Get(ctx, SUPPLY_KEY) + 0 def balanceOf(account): @@ -139,7 +139,7 @@ def balanceOf(account): """ if len(account) != 20: raise Exception("address length error") - return Get(ctx,concat(BALANCE_PREFIX,account)) + return Get(ctx,concat(BALANCE_PREFIX,account)) + 0 def transfer(from_acct,to_acct,amount): @@ -267,4 +267,4 @@ def allowance(owner,spender): :return: the allowed amount of tokens """ key = concat(concat(APPROVE_PREFIX,owner),spender) - return Get(ctx,key) \ No newline at end of file + return Get(ctx,key) + 0 \ No newline at end of file