コード例 #1
0
        public async Task Deploy_Contract_Success()
        {
            var registration = new SmartContractRegistration
            {
                Category = KernelConstants.DefaultRunnerCategory,
                Code     = Hash.FromString("TestDeployContract").ToByteString(),
                CodeHash = Hash.FromString("TestDeployContract")
            };


            await _smartContractService.DeployContractAsync(Address.Genesis, registration, false, null);
        }
コード例 #2
0
        public async Task Deploy_Contract_Success()
        {
            var registration = new SmartContractRegistration
            {
                Category = KernelConstants.DefaultRunnerCategory,
                Code     = HashHelper.ComputeFrom("TestDeployContract").ToByteString(),
                CodeHash = HashHelper.ComputeFrom("TestDeployContract")
            };


            await _smartContractService.DeployContractAsync(new ContractDto
            {
                BlockHeight               = 1,
                ContractAddress           = SampleAddress.AddressList[0],
                ContractName              = null,
                IsPrivileged              = false,
                SmartContractRegistration = registration
            });
        }