Skip to content

Commit

Permalink
Merge branch 'dev' into 'master'
Browse files Browse the repository at this point in the history
Dev

See merge request ergo/rosen-bridge/contract!102
  • Loading branch information
vorujack committed Jul 2, 2024
2 parents de9af99 + 1e44745 commit 391dde0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ libraryDependencies ++= Seq(

name := "contract"
ThisBuild / scalaVersion := "2.12.7"
ThisBuild / version := "3.2.1"
ThisBuild / version := "3.2.2"
ThisBuild / organization := "rosen.bridge"
ThisBuild / organizationName := "rosen-bridge"
ThisBuild / publishMavenStyle := true
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ networks = {
RepoConfigNFT="37aa6c6c414a85912b373ca9a3abe88a29b9c738a9c1b2bf8644c19dedc09ce0"
}
lock-address="addr1v8kqhz5lkdxqm8qtkn4lgd9f4890v0j6advjfmk5k9amu4c535lsu"
cold-address="addr1x8x6ca648w25x085dg8xs6k5e69yemr5hakcnl0gshmal6gahwzvy33q3jhr74lurpr9p0n8derw58fh7snq2zwxe8zsdkcqrj"
cleanup-confirm=21600
}
loen = {
Expand All @@ -57,6 +58,7 @@ networks = {
RepoConfigNFT="abde6d2b51f6e8b85f3040ecccb3087531f0773a6a1d3faaeef043e10390f3eb"
}
lock-address = "addr1v9kmp9flrq8gzh287q4kku8vmad3vkrw0rwqvjas6vyrf9s9at4dn"
cold-address=""
cleanup-confirm = 10
}
idKey = "tokenId"
Expand All @@ -69,6 +71,7 @@ networks = {
AwcNFT="c2bdf69d3fd88c3a82149200fe756bffb850c1433ea8473f26664877cc7188b3"
RepoConfigNFT="c8dea5bd396984a17fc0aefafb11c46188a9a980caf2af12f7c893508db93a5b"
}
cold-address="HNJiaJVyw1qtkiuQYxDTjaA8rmogotVzADinCt5qqavoyoREWM27WAp6f9Y79meFcMoJLt3yr8nsWC5xU5474ojCxE7VweGpd9sLz79VrSiyu7zBjBXPjgGLFZdJAEJhsH8A4y924MVZa7D9te6t3FUiLcpyTbrvTBhD7SpnD6hUjbGszCEGf1fRX1SmWZikeXcJEkfej42dPRimT6Fw423XAc9Tbeih8ZW8x7f5Y7y8frF5kxEdw998JdLU6UzPSwhrDjfKhySqmssQeQxCFwb19PMCB8ZZtx2mGwczr2H12Yi3hnEWn9ArqRqKWip24pJgm6e4Ky7n7BzGRRTmDtcA2EGH3zEVzpRH6aNSHE1MJ51dbCZSNFnRJfk3vxenkSevCfvEMfn5KyQP9wPU5foZACuHX8TQXvVUe1va3HXJFwCm74gxRssBy61GcYdwVbtxykPrw3t6aDX7c46BejsXvEaz5Ydcu7U8MJCoYia9pZ6zkjAj8d7Su12DMK1aLkBxw4vY2zQYc"
cleanup-confirm = 21600
}
loen = {
Expand All @@ -78,6 +81,7 @@ networks = {
AwcNFT="852ccfce6b0b060f81153cd1994d5f42e5e59d7f092adbadab2b5e1ca2c34b63"
RepoConfigNFT="99016d570b66c7188957cb72acbf131ab0be7611e011ba47c783a3c3f5773daf"
}
cold-address=""
cleanup-confirm = 10
}
idKey = "tokenId"
Expand All @@ -91,6 +95,7 @@ networks = {
RepoConfigNFT="92d61d0717853b1b6f85758c5e92c7aa946b24051323c12598df9a53f6684df6"
}
lock-address="bc1qs0852en99dfctv0egj2qxnmc79mhjgn9ap975t"
cold-address=""
cleanup-confirm = 21600
}
loen = {
Expand All @@ -101,6 +106,7 @@ networks = {
RepoConfigNFT="1c589bcb108a4408e65ef1d68766b102b7c2dedc11161c618e413225110ffc6a"
}
lock-address="bc1qt58qyyqw8yezp7g0lnjyshuqnhj07amuerhj93"
cold-address=""
cleanup-confirm = 10
}
idKey = "tokenId"
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/helpers/Configs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ object Configs extends ConfigHelper {
readKeyDynamic(networkTokensConfig, "RepoConfigNFT"),
)
val lockAddress = if (networkName != "ergo") readKeyDynamic(networkDataConfig, "lock-address", "PLEASE SET LOCK_ADDRESS MANUALLY") else ""
val coldAddress = readKeyDynamic(networkDataConfig, "cold-address", "PLEASE SET COLD_ADDRESS MANUALLY")
allNetworksToken((networkName, networkType.toString)) = Network(
tokens,
lockAddress,
coldAddress,
readKeyDynamic(networkDataConfig, "cleanup-confirm").toInt
)
})
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/helpers/Models.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ case class Tokens(CleanupNFT: String, RWTId: String, AwcNFT: String, RepoConfigN
}
}

case class Network(tokens: Tokens, lockAddress: String, cleanupConfirm: Int)
case class Network(tokens: Tokens, lockAddress: String, coldAddress: String, cleanupConfirm: Int)

case class NetworkGeneral(ergoNetwork: ErgoNetwork, mainTokens: MainTokens)
1 change: 1 addition & 0 deletions src/main/scala/rosen/bridge/Contracts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Contracts(networkGeneral: NetworkGeneral, networkConfig: Network) {
("WatcherPermit", Json.fromString(WatcherPermit._2)),
("Fraud", Json.fromString(Fraud._2)),
("lock", Json.fromString(lockAddress)),
("cold", Json.fromString(networkConfig.coldAddress)),
("guardSign", Json.fromString(GuardSign._2)),
("Commitment", Json.fromString(Commitment._2)),
("WatcherTriggerEvent", Json.fromString(WatcherTriggerEvent._2)),
Expand Down

0 comments on commit 391dde0

Please sign in to comment.