/// <summary>
        /// Generates the solidity code
        /// </summary>
        /// <returns>Solidity code in string</returns>
        public string GenerateSolidity()
        {
            ITemplateContext ctx = new TemplateContext();

            ctx.DefineLocalVariable("contract", solidityContract.ToLiquidString(0));

            return(template.Render(ctx).Result);
        }
Example #2
0
        public string GetSolidityCode()
        {
            ITemplateContext ctx = new TemplateContext();

            ctx.DefineLocalVariable("maincontract", mainSolidityContract.ToLiquidString(0))
            .DefineLocalVariable("tokencontracts", DataModelConverter.TokenContractsToLiquid())
            .DefineLocalVariable("imports", GetDependencies());
            return(template.Render(ctx).Result);
        }