Smart Contract Generation via DSL Tokenization and Template Mapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems for generating smart contracts for blockchain platforms are time-consuming, require significant technical expertise, and are prone to human error, making them complex, costly, and difficult to deploy across multiple platforms.

Innovation Solution

A system and method for automatically generating smart contracts using a Domain Specific Language (DSL) input, which converts natural language user stories into platform-agnostic code templates, eliminating the need for platform-specific coding and reducing the complexity and cost of development.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If manual code writing is used for each blockchain platform, then platform-specific functionality is achieved, but development time and complexity increase significantly

Engineering Contradiction:
Improveplatform-specific functionalityVSAvoiddevelopment time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent uses template-based code generation where pre-defined smart contract templates are copied and adapted for different blockchain platforms. Instead of writing code from scratch for each platform, the system copies templates and automatically substitutes platform-specific parameters, dramatically reducing development time while maintaining platform-specific functionality.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent creates a universal code generation system that can generate smart contracts for multiple blockchain platforms (Ethereum, Hyperledger, Corda, etc.) using a single template repository. The system performs multi-functionality by adapting the same template framework to different platforms through parameter substitution, eliminating the need for separate manual coding processes for each platform.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Adaptability or versatility

If manual code writing is used for each blockchain platform, then platform-specific functionality is achieved, but development complexity and skill requirements increase

Engineering Contradiction:
Improveplatform-specific functionalityVSAvoiddevelopment complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent uses template-based code generation where pre-defined smart contract templates are copied and adapted for different blockchain platforms. Instead of writing code from scratch for each platform, the system copies templates and automatically substitutes platform-specific parameters, dramatically reducing development time while maintaining platform-specific functionality.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent creates a universal code generation system that can generate smart contracts for multiple blockchain platforms (Ethereum, Hyperledger, Corda, etc.) using a single template repository. The system performs multi-functionality by adapting the same template framework to different platforms through parameter substitution, eliminating the need for separate manual coding processes for each platform.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Extent of automation

If existing mark-up language tools are used, then code generation is enabled, but technical expertise is still required and platform-specific mark-up must be written for each platform

Engineering Contradiction:
Improvecode generation capabilityVSAvoidtechnical expertise requirement
Core Design Contradiction:
Extent of automationVSEase of operation

Solution Approach 1:

The patent uses template-based code generation where pre-defined smart contract templates are copied and adapted for different blockchain platforms. Instead of writing code from scratch for each platform, the system copies templates and automatically substitutes platform-specific parameters, dramatically reducing development time while maintaining platform-specific functionality.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent creates a universal code generation system that can generate smart contracts for multiple blockchain platforms (Ethereum, Hyperledger, Corda, etc.) using a single template repository. The system performs multi-functionality by adapting the same template framework to different platforms through parameter substitution, eliminating the need for separate manual coding processes for each platform.

Inventive Principle:
Principle #6Universality (Multi-functionality)

4Adaptability or versatility

If manual code writing and testing is performed for each platform, then platform-specific deployment is achieved, but development cost and time increase

Engineering Contradiction:
Improveplatform-specific deploymentVSAvoidtesting and deployment time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by pre-defining smart contract templates with platform-agnostic logic before deployment. The templates are prepared in advance with all necessary structure and functionality, so that during deployment only platform-specific parameter substitution is needed. This eliminates the need for time-consuming manual coding and testing for each platform, as the templates are already validated and ready for deployment.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP4145761B1A system and a method for automatic generation of smart contracts across blockchain platforms
Publication Date: 2025.01.29 MPHASIS
  • EP4145761B1 patent drawingFigure 1
  • EP4145761B1 patent drawingFigure 2
  • EP4145761B1 patent drawingFigure 3

AI summary

The present invention provides for a system (100) and a method for generating smart contracts for blockchain platforms. An input received as natural language text is processed into a first parameter to generate a Domain Specific Language (DSL) construct. DSL construct is disintegrated into a stream of tokens and a syntax analysis is performed on the stream of tokens to check if the syntax of the DSL construct matches with a grammar file defined for the DSL construct. Each of the marked lines of the stream of tokens is read and the read marked lines are transformed into an organized structure. A file specific to a target blockchain platform is generated based on a second parameter and the organized structure is mapped with the generated file associated with the target blockchain platform to generate a target code template for generating a deployable target smart contract for the target blockchain platform.