https://medium.com/p/785311f58c2/
-
Telegram chat https://t.me/waves_dev_workshops
-
install
docker
# git install | |
sudo apt-get install git | |
# java install | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
# scala install |
package ex | |
object EP extends App { | |
trait IO[A] { self => | |
def run(): A | |
def _map[B](f: A => B): IO[B] = new IO[B] { override def run(): B = f(self.run()) } | |
def _flatMap[B](f: A => IO[B]): IO[B] = new IO[B] { override def run(): B = f(self.run()).run() } | |
} |
object LCB extends App { | |
def get(url: String) = scala.io.Source.fromURL(url).mkString | |
def blockAt(nodeHttp: String, blockHeight: Int) = get(nodeHttp + "/blocks/at/" + blockHeight) | |
def nodeComparator(node1: String, node2: String)(h: Int): Boolean = blockAt(node1, h) == blockAt(node2, h) | |
val TESTNET1 = "http://52.30.47.67:6869" | |
val TESTNET2 = "http://52.28.66.217:6869" | |
val TESTNET3 = "http://52.77.111.219:6869" | |
val TESTNET4 = "http://52.51.92.182:6869" |
// resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/" | |
// libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0" | |
// libraryDependencies += "org.typelevel" %% "cats" % "0.9.0" | |
// libraryDependencies += "io.github.amrhassan" %% "scalacheck-cats" % "0.3.2" % Test | |
package ex | |
import cats._ |
package ex | |
import scodec.{Codec, codecs} | |
import scodec.codecs.{Discriminated, uint8} | |
object ASD extends App { | |
sealed trait Expr | |
case class INT(i: Int) extends Expr | |
case class SUM(i1: Expr, i2: Expr) extends Expr |
https://medium.com/p/785311f58c2/
Telegram chat https://t.me/waves_dev_workshops
install docker
{-# STDLIB_VERSION 4 #-} | |
{-# CONTENT_TYPE DAPP #-} | |
@Callable(inv) | |
func foo() = { | |
let a = | |
(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'' |
{-# STDLIB_VERSION 4 #-} | |
{-# CONTENT_TYPE DAPP #-} | |
@Callable(inv) | |
func foo() = { | |
let a = | |
(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'')) then 0 else 1)+(if (sigVerify(base64'',base64'',base64'' |
[ | |
{ | |
"blocksize": 688, | |
"signature": "5fKMzzXxVd3x8ZxjAugwBgpB4GavBEkw8Efyy3FsodvXMQ6zvWcZyXro3z87d3i3EYNxr16TueUHVCZnEPNEwLGN", | |
"fee": 0, | |
"generator": "3HPNckeuow7wxh9WEzAwMeyzrknvyVNhxTH", | |
"generatorPublicKey": "2eEUvypDSivnzPiLrbYEW39SM8yMZ1aq4eJuiKfs4sEY", | |
"transactions": [ | |
{ | |
"type": 1, |