Keith  Evans

Keith Evans

1673527140

Web3j Sokt: A Kotlin Wrapper for The Solidity Compiler (solc)

Sokt

Sokt is a Kotlin wrapper for the Solidity compiler (solc). Given a solidity file, it can identify the ideal compiler version to use from the pragma statement at the top of the file. It can then download, install and invoke the compiler. Rather than using Dockerized versions of Solc, Sokt uses native builds and is compatible with Mac, Windows and Linux (x86/64 only). This means that the only dependency is a Java installation. Sokt also plays nicely with GraalVM, eliminating the Java dependency if necessary.

Sokt is currently under active development. You can use it in one of your own projects by adding the following dependency to your build.gradle:

dependencies {
    compile group: 'org.web3j', name: 'web3j-sokt', version: '0.2.1'
}

For other build systems, see here.

Example usage:

val fileName = filePath.substringAfterLast("/")
println("sokt Processing $fileName")
val solidityFile = SolidityFile(filePath)

println("Resolving compiler version for $fileName")
val compilerInstance = solidityFile.getCompilerInstance()

println("Resolved ${compilerInstance.solcRelease.version} for $fileName")

val result = compilerInstance.execute(
    SolcArguments.OUTPUT_DIR.param { "/tmp" },
    SolcArguments.BIN,
    SolcArguments.OVERWRITE
)

println("Solc exited with code: ${result.exitCode}")
println("Solc standard output:\n${result.stdOut}")
println("Solc standard error:\n${result.stdErr}")

.gitignore


# Created by https://www.gitignore.io/api/kotlin
# Edit at https://www.gitignore.io/?templates=kotlin

### Kotlin ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# End of https://www.gitignore.io/api/kotlin

# Created by https://www.gitignore.io/api/gradle
# Edit at https://www.gitignore.io/?templates=gradle

### Gradle ###
.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Gradle Patch ###
**/build/

# End of https://www.gitignore.io/api/gradle

*.asc
*.project
*.settings
.idea

build.gradle

buildscript {
    ext.kotlin_version = '1.3.61'
    repositories { jcenter() }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    }
}

plugins {
    id 'org.jetbrains.kotlin.jvm' version "1.3.61"
    id 'idea'
    id 'jacoco'
    id "com.jfrog.bintray" version "1.8.4"
    id "com.diffplug.gradle.spotless" version "3.25.0"
    id 'io.codearte.nexus-staging' version '0.21.1'
    id "de.marcphilipp.nexus-publish" version "0.4.0"
    id "de.undercouch.download" version "4.0.0"
}

description 'web3j-sokt - Kotlin-based wrapper for multiple installations of the solidity compiler (solc)'

apply {
    [
        'bintray',
        'jacoco',
        'java',
        'javadoc',
        'repositories',
        'publish',
        'spotless',
        'junit'
    ].each { buildScript ->
        download {
            src "https://raw.githubusercontent.com/web3j/build-tools/master/gradle/$buildScript/build.gradle"
            dest "$rootDir/gradle/$buildScript/build.gradle"
            overwrite false
            quiet true
            onlyIfModified true
        }
        from("$rootDir/gradle/$buildScript/build.gradle")
    }
}


apply plugin: 'kotlinx-serialization'

group 'org.web3j'

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8",
            "org.apache.commons:commons-lang3:3.0",
            "com.github.zafarkhaja:java-semver:0.9.0",
            "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.14.0"
    testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion",
            "org.junit.jupiter:junit-jupiter-api:$junitVersion",
            "org.junit.jupiter:junit-jupiter-params:$junitVersion"
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

Download details:

Author: web3j
Source code: https://github.com/web3j/web3j-sokt

#web3 #blockchain #solidity 

What is GEEK

Buddha Community

Web3j Sokt: A Kotlin Wrapper for The Solidity Compiler (solc)

Juned Ghanchi

1621508255

Kotlin App Development Company in India, Hire Kotlin Developers

We are a prime Kotlin app developer in India. We build and provide the best personalized Android apps, migration services, ongoing maintenance, and management.

We have the most efficient Kotlin developers that build ultramodern, interactive, and secure mobile apps. The technologies we use to create the most advanced Kotlin apps are AR/VR, AI/ML, IoT, etc.

Hire Kotlin app developers in India. Meet us, and we will help you meet all of your technology requirements.

#kotlin app development company india #hire kotlin developers india #kotlin app development company #hire kotlin developers #kotlin development agency #kotlin app programmers

Keith  Evans

Keith Evans

1673527140

Web3j Sokt: A Kotlin Wrapper for The Solidity Compiler (solc)

Sokt

Sokt is a Kotlin wrapper for the Solidity compiler (solc). Given a solidity file, it can identify the ideal compiler version to use from the pragma statement at the top of the file. It can then download, install and invoke the compiler. Rather than using Dockerized versions of Solc, Sokt uses native builds and is compatible with Mac, Windows and Linux (x86/64 only). This means that the only dependency is a Java installation. Sokt also plays nicely with GraalVM, eliminating the Java dependency if necessary.

Sokt is currently under active development. You can use it in one of your own projects by adding the following dependency to your build.gradle:

dependencies {
    compile group: 'org.web3j', name: 'web3j-sokt', version: '0.2.1'
}

For other build systems, see here.

Example usage:

val fileName = filePath.substringAfterLast("/")
println("sokt Processing $fileName")
val solidityFile = SolidityFile(filePath)

println("Resolving compiler version for $fileName")
val compilerInstance = solidityFile.getCompilerInstance()

println("Resolved ${compilerInstance.solcRelease.version} for $fileName")

val result = compilerInstance.execute(
    SolcArguments.OUTPUT_DIR.param { "/tmp" },
    SolcArguments.BIN,
    SolcArguments.OVERWRITE
)

println("Solc exited with code: ${result.exitCode}")
println("Solc standard output:\n${result.stdOut}")
println("Solc standard error:\n${result.stdErr}")

.gitignore


# Created by https://www.gitignore.io/api/kotlin
# Edit at https://www.gitignore.io/?templates=kotlin

### Kotlin ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# End of https://www.gitignore.io/api/kotlin

# Created by https://www.gitignore.io/api/gradle
# Edit at https://www.gitignore.io/?templates=gradle

### Gradle ###
.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Gradle Patch ###
**/build/

# End of https://www.gitignore.io/api/gradle

*.asc
*.project
*.settings
.idea

build.gradle

buildscript {
    ext.kotlin_version = '1.3.61'
    repositories { jcenter() }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    }
}

plugins {
    id 'org.jetbrains.kotlin.jvm' version "1.3.61"
    id 'idea'
    id 'jacoco'
    id "com.jfrog.bintray" version "1.8.4"
    id "com.diffplug.gradle.spotless" version "3.25.0"
    id 'io.codearte.nexus-staging' version '0.21.1'
    id "de.marcphilipp.nexus-publish" version "0.4.0"
    id "de.undercouch.download" version "4.0.0"
}

description 'web3j-sokt - Kotlin-based wrapper for multiple installations of the solidity compiler (solc)'

apply {
    [
        'bintray',
        'jacoco',
        'java',
        'javadoc',
        'repositories',
        'publish',
        'spotless',
        'junit'
    ].each { buildScript ->
        download {
            src "https://raw.githubusercontent.com/web3j/build-tools/master/gradle/$buildScript/build.gradle"
            dest "$rootDir/gradle/$buildScript/build.gradle"
            overwrite false
            quiet true
            onlyIfModified true
        }
        from("$rootDir/gradle/$buildScript/build.gradle")
    }
}


apply plugin: 'kotlinx-serialization'

group 'org.web3j'

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8",
            "org.apache.commons:commons-lang3:3.0",
            "com.github.zafarkhaja:java-semver:0.9.0",
            "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.14.0"
    testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion",
            "org.junit.jupiter:junit-jupiter-api:$junitVersion",
            "org.junit.jupiter:junit-jupiter-params:$junitVersion"
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

Download details:

Author: web3j
Source code: https://github.com/web3j/web3j-sokt

#web3 #blockchain #solidity 

Hire Dedicated Kotlin Developer - WebClues Infotech

The most popular language used for Android app development is Kotlin and recently Kotlin also launched its Cross-Platform app development language Kotlin Multiplatform.

So are you looking to launch a mobile using Kotlin as your Programming Language?

Then you are at the right place as WebClues Infotech offers services to Hire a Dedicated Kotlin Developer who can develop an interactive and rich user-experienced mobile app. Also, WebClues has a flexible pricing model that the business can choose according to its most suitable structure.

So what are you waiting for? Hire a dedicated Kotlin developer from a reputed Web & Mobile app development agency that has successfully served more than 600+ clients.

Get in touch with us!!

Book Free Interview: https://bit.ly/3dDShFg

#hire dedicated kotlin developer #hire dedicated kotlin developer #hire kotlin developers #hire kotlin developer #hire dedicated kotlin app developer #hire kotlin app developers india

How to Develop an Android App with Kotlin?

Do you have an idea to develop an android app using Kotlin?

Are you looking for the best Kotlin app development company in the USA? We at AppClues Infotech offering versatile mobile app development services in the USA. We provide custom mobile app development solutions as per your specific business needs with the prevailing market trending technology & features.

Hire our top-notch Kotlin app designers & developers for your project at a cost-effective price.

Our Kotlin App Development Services:
• Custom Android App Development
• Kotlin AR/VR App Development
• Kotlin App UI/UX Design
• Kotlin App QA & Testing- code Optimization
• Kotlin App Migrations
• Kotlin App Maintenance and Upgrades

For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910

#kotlin android app development company #best kotlin android app development usa #kotlin android app development #kotlin for android app development #kotlin mobile app development service #create android app with kotlin

Top Kotlin Android App Development Company in USA

Looking for a top Kotlin Android app development company for creating an Android app project? AppClues Infotech is a top Kotlin Android app development company in USA that delivers the most scalable and efficient Kotlin app development services globally.

For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910

#kotlin android app development company #best kotlin android app development usa #kotlin android app development #kotlin for android app development #kotlin mobile app development service #create android app with kotlin