private static Contribution GetContribution(byte[] userAddress)
        {
            byte[] bytes = GetUserValue(userAddress, APH.Concat(POSTFIX_USER_ASSET_CONTRIBUTED));
            if (bytes.Length != 0)
            {
                return(ContributionFromBytes(bytes));
            }

            // Runtime.Notify("GetContribution() Contribution not found", userAddress);
            Contribution blank = new Contribution();

            blank.UserAddress      = userAddress;
            blank.UnitsContributed = 0;
            return(blank);
        }
 private static void DeleteContribution(Contribution contribution)
 {
     DeleteUserValue(contribution.UserAddress, APH.Concat(POSTFIX_USER_ASSET_CONTRIBUTED));
     Runtime.Notify("deleteContribution", contribution.UserAddress);
 }
 private static void PutContribution(Contribution contribution)
 {
     byte[] bytes = ContributionToBytes(contribution);
     PutUserValue(contribution.UserAddress, APH.Concat(POSTFIX_USER_ASSET_CONTRIBUTED), bytes);
     Runtime.Notify("putContribution", contribution.UserAddress, bytes);
 }