mirror of
https://github.com/fluencelabs/hackethberlin
synced 2025-04-25 09:22:21 +00:00
Merge branch 'publisher'
This commit is contained in:
commit
618f4175f8
15
build.sbt
15
build.sbt
@ -19,13 +19,17 @@ val commons = Seq(
|
|||||||
resolvers += Resolver.sonatypeRepo("releases"),
|
resolvers += Resolver.sonatypeRepo("releases"),
|
||||||
scalafmtOnCompile := true,
|
scalafmtOnCompile := true,
|
||||||
// see good explanation https://gist.github.com/djspiewak/7a81a395c461fd3a09a6941d4cd040f2
|
// see good explanation https://gist.github.com/djspiewak/7a81a395c461fd3a09a6941d4cd040f2
|
||||||
scalacOptions += "-Ypartial-unification"
|
scalacOptions += "-Ypartial-unification",
|
||||||
|
organization := "one.fluence",
|
||||||
|
bintrayOrganization := Some("fluencelabs"),
|
||||||
)
|
)
|
||||||
|
|
||||||
commons
|
commons
|
||||||
|
|
||||||
lazy val core = project.settings(
|
lazy val crotalinae = project.in(file("core")).settings(
|
||||||
commons,
|
commons,
|
||||||
|
artifact := Artifact("crotalinae"),
|
||||||
|
version := "0.0.4",
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"org.typelevel" %% "cats-core" % "1.2.0",
|
"org.typelevel" %% "cats-core" % "1.2.0",
|
||||||
"org.typelevel" %% "cats-free" % "1.2.0",
|
"org.typelevel" %% "cats-free" % "1.2.0",
|
||||||
@ -38,9 +42,10 @@ lazy val core = project.settings(
|
|||||||
|
|
||||||
lazy val root = project
|
lazy val root = project
|
||||||
.in(file("."))
|
.in(file("."))
|
||||||
.dependsOn(core)
|
.dependsOn(crotalinae)
|
||||||
.aggregate(core)
|
.aggregate(crotalinae)
|
||||||
.settings(
|
.settings(
|
||||||
libraryDependencies ++= Seq("com.chuusai" %% "shapeless" % "2.3.3"),
|
libraryDependencies ++= Seq("com.chuusai" %% "shapeless" % "2.3.3"),
|
||||||
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full)
|
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full),
|
||||||
|
publishArtifact := false
|
||||||
)
|
)
|
||||||
|
@ -1 +1,3 @@
|
|||||||
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.4.0")
|
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.4.0")
|
||||||
|
|
||||||
|
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")
|
11
scastie-settings.sbt_
Normal file
11
scastie-settings.sbt_
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// use https://scastie.scala-lang.org/
|
||||||
|
scalacOptions ++= Seq(
|
||||||
|
"-deprecation",
|
||||||
|
"-encoding", "UTF-8",
|
||||||
|
"-feature",
|
||||||
|
"-unchecked"
|
||||||
|
)
|
||||||
|
resolvers += Resolver.bintrayRepo("fluencelabs", "maven")
|
||||||
|
libraryDependencies += "org.typelevel" %% "cats-core" % "1.2.0"
|
||||||
|
libraryDependencies += "one.fluence" %% "crotalinae" % "0.0.4"
|
||||||
|
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.3"
|
@ -1,7 +1,7 @@
|
|||||||
package fluence
|
package fluence
|
||||||
|
|
||||||
import hackethberlin._
|
import fluence.hackethberlin._
|
||||||
import hackethberlin.types._
|
import fluence.hackethberlin.types._
|
||||||
import shapeless._
|
import shapeless._
|
||||||
import Decorator._
|
import Decorator._
|
||||||
import syntax.singleton._
|
import syntax.singleton._
|
||||||
@ -51,8 +51,7 @@ object Auction extends App {
|
|||||||
for {
|
for {
|
||||||
_ <- `assert`(`<<`(`block.timestamp`, auction_end))
|
_ <- `assert`(`<<`(`block.timestamp`, auction_end))
|
||||||
_ <- `assert`(`>>`(`msg.value`, highest_bid))
|
_ <- `assert`(`>>`(`msg.value`, highest_bid))
|
||||||
_ <- `if`(`not`(`:===:`(highest_bid, `msg.value`)), {
|
_ <- `if`(`not`(`:===:`(highest_bid, `msg.value`)), { () =>
|
||||||
() =>
|
|
||||||
send(highest_bidder :: highest_bid :: HNil).liftF.map(_ => Void)
|
send(highest_bidder :: highest_bid :: HNil).liftF.map(_ => Void)
|
||||||
})
|
})
|
||||||
_ <- highest_bidder :=: `msg.sender`
|
_ <- highest_bidder :=: `msg.sender`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user