Skip to content

Commit cd50ca8

Browse files
Merge pull request #99 from FigureTechnologies/hyperschwartz/v3.7.1-localtools-upgrade-for-new-msgfees
v3.7.1: Localtools support for Provenance v1.14.0
2 parents 3359915 + c78ce5d commit cd50ca8

File tree

8 files changed

+15
-13
lines changed

8 files changed

+15
-13
lines changed

client/src/main/kotlin/tech/figure/classification/asset/client/domain/model/OnboardingCost.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import java.math.BigInteger
1515
* execution route.
1616
* @param feeDestinations A collection of addresses and fee distribution amounts that dictates how the fee amount is
1717
* distributed to other addresses than the verifier. The amounts of all destinations should never sum to a value
18-
* greater than half the onboarding cost (to account for the 50% MsgFees module community split).
18+
* greater than the onboarding cost.
1919
*/
2020
@JsonNaming(SnakeCaseStrategy::class)
2121
data class OnboardingCost(

client/src/main/kotlin/tech/figure/classification/asset/client/domain/model/VerifierDetail.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import java.math.BigInteger
1919
* onboarding cost to determine a coin required.
2020
* @param feeDestinations A collection of addresses and fee distribution amounts that dictates how the fee amount is
2121
* distributed to other addresses than the verifier. The amounts of all destinations should never sum to a value
22-
* greater than half the onboarding cost (to account for the 50% MsgFees module community split).
22+
* greater than the onboarding cost.
2323
* @param entityDetail An optional set of fields defining the validator in a human-readable way.
2424
* @param retryCost Defines the cost to use in place of the root onboarding cost and fee destination when retrying
2525
* classification for a failed verification. If not present, the original values used for the first verification will

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jackson-protobuf = "0.9.13"
1111
kotlin = "1.7.22"
1212
kotlin-coroutines = "1.6.4"
1313
kotlin-logging = "3.0.4"
14-
logback = "1.4.5"
14+
logback = "1.2.3"
1515
mockk = "1.13.3"
1616
objectstore-gateway = "3.3.0"
1717
okhttp = "4.10.0"

localtools/src/integrationTest/kotlin/testconfiguration/assertions/FeePaymentDetailAssertions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ fun assertFeePaymentDetailValidity(
5151
val expectedOnboardingCost = verifierDetail.retryCost?.cost?.takeIf { isRetry }
5252
?: verifierDetail.subsequentClassificationDetail?.cost?.cost?.takeIf { isSubsequentClassification }
5353
?: verifierDetail.onboardingCost
54-
val expectedVerifierFee = expectedOnboardingCost.divide("2".toBigInteger()).minus(nonVerifierFeesPaid)
54+
val expectedVerifierFee = expectedOnboardingCost - nonVerifierFeesPaid
5555
assertTrue(
5656
actual = expectedVerifierFee >= BigInteger.ZERO,
57-
message = "Non verifier-targeted fees should always sum to a value less or equal to half the verifier detail's onboarding cost [${verifierDetail.onboardingCost}] divided by two, but was [$nonVerifierFeesPaid]",
57+
message = "Non verifier-targeted fees should always sum to a value less or equal to the verifier detail's onboarding cost [${verifierDetail.onboardingCost}], but was [$nonVerifierFeesPaid]",
5858
)
5959
if (expectedVerifierFee > BigInteger.ZERO) {
6060
val verifierFee = feePayments.payments.singleOrNull { it.recipient == verifierDetail.address }

localtools/src/integrationTest/kotlin/testconfiguration/containers/instances/ManagedProvenanceTestContainer.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ class ManagedProvenanceTestContainer : ManagedTestContainer<ProvenanceTestContai
9898
}
9999
}
100100

101-
class ProvenanceTestContainer : GenericContainer<ProvenanceTestContainer>("provenanceio/provenance:v1.12.0") {
102-
private companion object : KLogging()
101+
class ProvenanceTestContainer : GenericContainer<ProvenanceTestContainer>("provenanceio/provenance:$VERSION") {
102+
private companion object : KLogging() {
103+
const val VERSION: String = "v1.14.0"
104+
}
103105

104106
init {
105-
logger.info("Starting Provenance Blockchain container version v1.12.0")
107+
logger.info("Starting Provenance Blockchain container version $VERSION")
106108
}
107109
}
108110

localtools/src/integrationTest/kotlin/testconfiguration/util/AppResources.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object AppResources {
88
// and libs are compatible with. Local testing for unpublished versions of the smart contract's WASM file can be
99
// done by tweaking ManagedProvenanceTestContainer's afterStartup function implementation to fetch the file from local
1010
// resources, if needed.
11-
const val CONTRACT_VERSION = "3.2.0"
11+
const val CONTRACT_VERSION = "3.3.0"
1212
const val ONBOARDING_CUSTOM_FEE_NAME = "Asset Classification Onboarding Fee"
1313

1414
// This account is intended to simulate an account used for verifying assets

localtools/src/integrationTest/resources/data/provenance/config/genesis.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@
443443
"max_validators": 100,
444444
"max_entries": 7,
445445
"historical_entries": 10000,
446-
"bond_denom": "nhash"
446+
"bond_denom": "nhash",
447+
"min_commission_rate": "0.000000000000000000"
447448
},
448449
"last_total_power": "0",
449450
"last_validator_powers": [],
@@ -469,8 +470,7 @@
469470
"permission": "Everybody",
470471
"address": ""
471472
},
472-
"instantiate_default_permission": "Everybody",
473-
"max_wasm_code_size": "1228800"
473+
"instantiate_default_permission": "Everybody"
474474
},
475475
"codes": [],
476476
"contracts": [],

localtools/src/main/kotlin/tech/figure/classification/asset/localtools/tool/SetupACTool.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ object SetupACTool {
174174
).toBase64Msg(OBJECT_MAPPER)
175175
}.build().wrapListAc(),
176176
account = config.contractAdminAccount,
177-
gasAdjustment = 1.1,
177+
gasAdjustment = 1.2,
178178
).getContractAddressAc()
179179
config.logger("Successfully instantiated the asset classification smart contract with address [$contractAddress]")
180180
ACClient.getDefault(

0 commit comments

Comments
 (0)