Ejemplo n.º 1
0
        public override void Decode(byte[] byteArray, ref int p)
        {
            var start = p;

            AccountTokenOwnershipLimit = new U32();
            AccountTokenOwnershipLimit.Decode(byteArray, ref p);

            SponsoredDataSize = new U32();
            SponsoredDataSize.Decode(byteArray, ref p);

            SponsoredDataRateLimit = new Option <BlockNumber>();
            SponsoredDataRateLimit.Decode(byteArray, ref p);

            TokenLimit = new U32();
            TokenLimit.Decode(byteArray, ref p);

            SponsorTimeout = new U32();
            SponsorTimeout.Decode(byteArray, ref p);

            OwnerCanTransfer = new Bool();
            OwnerCanTransfer.Decode(byteArray, ref p);

            OwnerCanDestroy = new Bool();
            OwnerCanDestroy.Decode(byteArray, ref p);

            _size = p - start;
        }
Ejemplo n.º 2
0
        public override void Decode(byte[] byteArray, ref int p)
        {
            var start = p;

            Owner = new AccountId();
            Owner.Decode(byteArray, ref p);

            Mode = new EnumType <CollectionMode>();
            Mode.Decode(byteArray, ref p);

            Access = new EnumType <AccessMode>();
            Access.Decode(byteArray, ref p);

            DecimalPoints = new DecimalPoints();
            DecimalPoints.Decode(byteArray, ref p);

            CollectionName = new Vec <U16>();
            CollectionName.Decode(byteArray, ref p);

            Description = new Vec <U16>();
            Description.Decode(byteArray, ref p);

            TokenPrefix = new Vec <U8>();
            TokenPrefix.Decode(byteArray, ref p);

            MintMode = new Bool();
            MintMode.Decode(byteArray, ref p);

            OffchainSchema = new Vec <U8>();
            OffchainSchema.Decode(byteArray, ref p);

            SchemaVersion = new EnumType <SchemaVersion>();
            SchemaVersion.Decode(byteArray, ref p);

            Sponsorship = new EnumType <SponsorshipState>();
            Sponsorship.Decode(byteArray, ref p);

            Limits = new CollectionLimits();
            Limits.Decode(byteArray, ref p);

            VariableOnChainSchema = new Vec <U8>();
            VariableOnChainSchema.Decode(byteArray, ref p);

            ConstOnChainSchema = new Vec <U8>();
            ConstOnChainSchema.Decode(byteArray, ref p);

            _size = p - start;
        }