Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
phearnot committed Sep 2, 2024
1 parent b712c86 commit 9376b24
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
pull: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.IMAGE_NAME}}
Expand Down
12 changes: 9 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ def universalDepMappings(deps: Seq[Attributed[File]]): Seq[(File, String)] =
dep <- deps
} yield dep.data -> ("lib/" + getJarFullFilename(dep))

Universal / mappings += {
val jar = (Compile / packageBin).value
val id = projectID.value
val art = (Compile / packageBin / artifact).value
jar -> ("lib/" + makeJarName(id.organization, id.name, id.revision, art.name, art.classifier))
}
Universal / mappings ++= universalDepMappings((Runtime / dependencyClasspath).value.filterNot { p =>
p.get(AttributeKey[ModuleID]("moduleID")).exists { m =>
m.organization == "org.scala-lang" ||
m.organization.startsWith("com.fasterxml.jackson")
p.get(AttributeKey[ModuleID]("moduleID")).exists { m => false
// m.organization == "org.scala-lang" ||
// m.organization.startsWith("com.fasterxml.jackson")
}
})

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/units/ELUpdater.scala
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class ELUpdater(
Proofs.empty,
blockchain.settings.addressSchemeCharacter.toByte
).signWith(invoker.privateKey)
logger.info(s"Invoking $contractAddress '${fc.function.funcName}' for block ${blockData.hash}->${blockData.parentHash}, txId=${tx.id()}")
logger.info(s"Invoking $contractAddress '${fc.function.funcName}' for block ${blockData.hash}->${blockData.parentHash}, txId=${tx.json()}")
cleanPriorityPool()

broadcastTx(tx).resultE match {
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/units/client/contract/ContractFunction.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import com.wavesplatform.lang.v1.compiler.Terms.{CONST_BYTESTR, CONST_LONG, CONS
import units.{BlockHash, ClientError, Job}
import units.util.HexBytesConverter.toHexNoPrefix
import cats.syntax.either.*
import org.web3j.utils.Numeric.cleanHexPrefix

abstract class ContractFunction(name: String, reference: BlockHash, extraArgs: Either[CommonError, List[EVALUATED]]) {
def toFunctionCall(blockHash: BlockHash, transfersRootHash: Digest, lastClToElTransferIndex: Long): Job[FUNCTION_CALL] = (for {
hash <- CONST_STRING(toHexNoPrefix(blockHash.getBytes))
ref <- CONST_STRING(toHexNoPrefix(reference.getBytes))
hash <- CONST_STRING(cleanHexPrefix(blockHash))
ref <- CONST_STRING(cleanHexPrefix(reference))
trh <- CONST_STRING(toHexNoPrefix(transfersRootHash))
xtra <- extraArgs
} yield FUNCTION_CALL(
Expand Down

0 comments on commit 9376b24

Please sign in to comment.