Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 51 additions & 27 deletions contracts/amaci/schema/cw-amaci.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@
"fee_recipient": {
"$ref": "#/definitions/Addr"
},
"max_votes_per_option": {
"default": null,
"anyOf": [
{
"$ref": "#/definitions/Uint256"
},
{
"type": "null"
}
]
},
"message_delay": {
"type": "integer",
"format": "uint64",
Expand Down Expand Up @@ -420,6 +431,27 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"set_max_votes_per_option"
],
"properties": {
"set_max_votes_per_option": {
"type": "object",
"required": [
"max_votes_per_option"
],
"properties": {
"max_votes_per_option": {
"$ref": "#/definitions/Uint256"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down Expand Up @@ -495,33 +527,6 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"upload_deactivate_message"
],
"properties": {
"upload_deactivate_message": {
"type": "object",
"required": [
"deactivate_message"
],
"properties": {
"deactivate_message": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/Uint256"
}
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down Expand Up @@ -1332,6 +1337,19 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"max_votes_per_option"
],
"properties": {
"max_votes_per_option": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down Expand Up @@ -2252,6 +2270,12 @@
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances out of primitive uint types or `new` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::from(258u128); let b = Uint256::new([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); ```",
"type": "string"
},
"max_votes_per_option": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Uint256",
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances out of primitive uint types or `new` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::from(258u128); let b = Uint256::new([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); ```",
"type": "string"
},
"operator": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Addr",
Expand Down
48 changes: 21 additions & 27 deletions contracts/amaci/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,27 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"set_max_votes_per_option"
],
"properties": {
"set_max_votes_per_option": {
"type": "object",
"required": [
"max_votes_per_option"
],
"properties": {
"max_votes_per_option": {
"$ref": "#/definitions/Uint256"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down Expand Up @@ -143,33 +164,6 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"upload_deactivate_message"
],
"properties": {
"upload_deactivate_message": {
"type": "object",
"required": [
"deactivate_message"
],
"properties": {
"deactivate_message": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/Uint256"
}
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down
11 changes: 11 additions & 0 deletions contracts/amaci/schema/raw/instantiate.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@
"fee_recipient": {
"$ref": "#/definitions/Addr"
},
"max_votes_per_option": {
"default": null,
"anyOf": [
{
"$ref": "#/definitions/Uint256"
},
{
"type": "null"
}
]
},
"message_delay": {
"type": "integer",
"format": "uint64",
Expand Down
13 changes: 13 additions & 0 deletions contracts/amaci/schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,19 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"max_votes_per_option"
],
"properties": {
"max_votes_per_option": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Uint256",
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances out of primitive uint types or `new` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::from(258u128); let b = Uint256::new([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); ```",
"type": "string"
}
12 changes: 6 additions & 6 deletions contracts/amaci/src/circuit_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ fn vkeys_2_1_1_5() -> Result<VkeyParams, ContractError> {
vk_alpha1: "2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e214bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d1926".to_string(),
vk_beta_2: "0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a71739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8".to_string(),
vk_gamma_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_delta_2: "14fcf460ec67f39e7604ce59622a530797f70d5dce2cdbfcc6285acb11a091490a51cc6cc5aec73e4b1fcd45f152e8d18d9831efa2ca2d8aba5ec00a5258a86c2588c3053fe7907bd6e3b3b455283a441df9f5e9cc8b1aca6712d37004c28e4311915d144397caf4c4e74e150159574574d84d4a620cc22e1ee695b45f0c09fb".to_string(),
vk_ic0: "152b83fbeccaaf60ff7c47ebcefc9368d1d81271fc47d36e3032f589112849c900ce96219b641b39a390c8fe58b8ff805e21e55257e1437c26285d030fb52a70".to_string(),
vk_ic1: "0722c7bc6aaf03f86fc32096b9ad50fa14a99d113cd02d3a26df629703f7b9b61a19f057b25b77efefe232bb2cc87d9637bca988fc0325bd8c9e4b1febe5eca4".to_string(),
vk_delta_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_ic0: "2109d20e2dfb65b2564cdd873f95f21a9215d9757c6ec62637b8d80373e1e9bb066ef0037b411d062439a5034b5c71bcdc2df0e3999fe5b7afd7cb88a32ceb30".to_string(),
vk_ic1: "05199f9ffa6b1ec953808a3dd750ad9168ae7a1464ddcead6cf31d61530e22a215b34e716a4871c189f25cf43ebc656d3256812cb98179183df2a9da65da34b9".to_string(),
};
let groth16_process_vkeys = format_vkey(&groth16_process_vkey)?;

let groth16_tally_vkey = Groth16VKeyType {
vk_alpha1: "2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e214bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d1926".to_string(),
vk_beta_2: "0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a71739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8".to_string(),
vk_gamma_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_delta_2: "21770a545c0aaa828d45a00c7335a689ac65650edb60d582ae66928eb860ac8811ec3ee19549dc6bf84515db12f782b7c6848fe4d004d32a5d27bce19440c34a173c6f347154f90a6052e1ca1faf89d4940527f248597c340c5c6cdf436225342c0fa0a92e84c22bb553aa427aa53c0f5f3ba7f7d223f6eb89b7d7cba26eb070".to_string(),
vk_delta_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_ic0: "0b20a7584a8679cc6cf8e8cffc41ce9ad79c2cd0086214c3cb1af12146916bb9185b916c9938601b30c6fc4e7f2e1f1a7a94cb81e1774cb1f67b54eb33477e82".to_string(),
vk_ic1: "081919adecf04dd5e1c31a3e34f8907d2ca613df81f99b3aa56c5027cd6416c201ddf039c717b1d29ecc2381db6104506731132f624e60cc09675a100028de25".to_string(),
};
Expand All @@ -64,7 +64,7 @@ fn vkeys_2_1_1_5() -> Result<VkeyParams, ContractError> {
vk_alpha1: "2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e214bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d1926".to_string(),
vk_beta_2: "0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a71739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8".to_string(),
vk_gamma_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_delta_2: "0b2b685a254c97378d11100e45db341efebcc5e3d026fe920fdf1cac04c5feb4135b02f250b191e658c55341d45184bde62cec70444c4f210fdb507d5622dc821fe7bc3e41c31a4e6b7288ca0d519b80b18e722712d24f8786155d683f0bff7101e736bd668785e26ceb252106aaa784c922e2509d37444c711da6b3d8d0c8ad".to_string(),
vk_delta_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_ic0: "141ed95aed8eac95334e6dbaa513736949402fd820920d8e2179d7be54593f60070ffd76988c62dbf2cf4a365da0fbecde7e7ccb39f1e0e0728a6941da3435cd".to_string(),
vk_ic1: "2c1289b05f9093a1d4c7536093702b08d57654fae20ae871de2598565c43c8611d5bc6caad360c2b6f68480aa71efbcc506524104152bb73f79d9cb0f3d12180".to_string(),
};
Expand All @@ -74,7 +74,7 @@ fn vkeys_2_1_1_5() -> Result<VkeyParams, ContractError> {
vk_alpha1: "2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e214bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d1926".to_string(),
vk_beta_2: "0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a71739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8".to_string(),
vk_gamma_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_delta_2: "2b135a96b33686a78339372bd40e3bef10aea0554c15a4770aeecdea0ce74b65265875823bf58d64d42fdf4ab9b8dba0a8b71dc2c1a140c68069d013a661c6a4150290c14390c9f212516d006b2b67012db77104bb20f3b980e924069a27c725119f442673a5ead331dfdfbbb1963ff41eca2f0a518e535f7b6b44cea1efd3df".to_string(),
vk_delta_2: "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa".to_string(),
vk_ic0: "29639aea06acd9b07e36d2456153d4e81581d65efb2fc93f0d54618398be1c471f49496bce6f344badecd9493d07faaaa2d09c7216734488f3ce2e2d0bd25be9".to_string(),
vk_ic1: "20ccb32cbbbb10099ab8ef2bfd196ec22b3c07c8c7eba7076bb8d16be4aa69ad0b0ff4e2a298219ef216024cd65a8b26470a7daa2e8ce55af41038a74d5d589f".to_string(),
};
Expand Down
Loading
Loading