コード例 #1
0
        public static GenericExtrinsicCall RemoveClaim(string mogwaicoinAddress, string account)
        {
            var address = new Vec <U8>();

            address.Create(
                Encoding.ASCII.GetBytes(mogwaicoinAddress).ToList().Select(p => {
                var u = new U8(); u.Create(p); return(u);
            }).ToList()
                );

            var accountId = new RawAccountId();

            accountId.Create(Utils.GetPublicKeyFrom(account));

            return(RemoveClaim(address, accountId));
        }
コード例 #2
0
        public static GenericExtrinsicCall UpdateClaim(string mogwaicoinAddress, string account, ClaimState claimState, RawBalance balanceAmount)
        {
            var address = new Vec <U8>();

            address.Create(
                Encoding.ASCII.GetBytes(mogwaicoinAddress).ToList().Select(p => {
                var u = new U8(); u.Create(p); return(u);
            }).ToList()
                );

            var accountId = new RawAccountId();

            accountId.Create(Utils.GetPublicKeyFrom(account));

            var state = new EnumType <ClaimState>();

            state.Create(claimState);

            return(UpdateClaim(address, accountId, state, balanceAmount));
        }