Пример #1
0
        public AddressGroupTest()
        {
            this.contractRegistry = new ContractRegistry();
            var tokenTagger = new FungibleTokenTagger();
            var tokenPicker = new FungibleTokenPicker();

            this.permissionManager = new ContractExecutor(this.addressFactory.Create());
            this.addressGroup      = new AddressGroup(this.addressFactory.Create(), this.contractRegistry,
                                                      this.permissionManager.Address);

            this.contractRegistry.RegisterContract(this.permissionManager);
            this.contractRegistry.RegisterContract(this.addressGroup);
        }
        public MemberRegistryTest()
        {
            this.contractRegistry = new ContractRegistry();
            var tokenTagger = new FungibleTokenTagger();
            var tokenPicker = new FungibleTokenPicker();

            this.permissionManager = new ContractExecutor(this.addressFactory.Create());
            this.membersRegistry   = new MembersRegistry(this.addressFactory.Create(), contractRegistry,
                                                         this.permissionManager.Address);

            this.contractRegistry.RegisterContract(this.permissionManager);
            this.contractRegistry.RegisterContract(this.membersRegistry);
        }
        public MembersTest()
        {
            this.contractRegistry = new ContractRegistry();
            var tokenTagger = new FungibleTokenTagger();
            var tokenPicker = new FungibleTokenPicker();

            this.permissionManager = new ContractExecutor(this.addressFactory.Create());
            this.tokenManager      = new TokenManager(
                this.addressFactory.Create(),
                this.permissionManager.Address,
                this.contractRegistry,
                tokenTagger,
                tokenPicker);
            var addMintPermission = new AddPermissionAction(
                string.Empty,
                this.tokenManager.Address,
                new Permission(typeof(MintAction)),
                this.permissionManager.Address);

            this.contractRegistry.RegisterContract(this.permissionManager);
            this.contractRegistry.RegisterContract(this.tokenManager);
            this.permissionManager.ExecuteAction(addMintPermission);
        }