From e154a4716037c2eb1106e133fc4ba48b7453a2a9 Mon Sep 17 00:00:00 2001 From: Miguel Rojo Date: Wed, 17 Aug 2022 17:38:27 +0100 Subject: [PATCH] solidity contracts changed so they use bytes instead of bytes32 Signed-off-by: Miguel Rojo --- .../group/FlexibleGroupManagement.java | 8 ++--- .../ethereum/privacy/FlexibleUtilTest.java | 27 +++++++++++++++++ ...lexiblePrivacyGroupManagementContract.java | 19 +++++++----- ...exiblePrivacyGroupManagementInterface.java | 14 +++++---- .../FlexiblePrivacyGroupManagementProxy.java | 20 ++++++++----- ...FlexiblePrivacyGroupManagementContract.sol | 29 ++++++++++--------- ...lexiblePrivacyGroupManagementInterface.sol | 10 ++++--- .../FlexiblePrivacyGroupManagementProxy.sol | 16 +++++----- .../src/main/solidity/generateWrappers.sh | 2 +- 9 files changed, 92 insertions(+), 53 deletions(-) diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/privacy/group/FlexibleGroupManagement.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/privacy/group/FlexibleGroupManagement.java index 30d6a704a12..9dcec02c81a 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/privacy/group/FlexibleGroupManagement.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/privacy/group/FlexibleGroupManagement.java @@ -19,17 +19,17 @@ public class FlexibleGroupManagement { public static final Bytes PROXY_RUNTIME_BYTECODE = Bytes.fromHexString( - "608060405234801561001057600080fd5b506004361061009e5760003560e01c80639738968c116100665780639738968c146101b8578063a69df4b5146101d8578063b4926e25146101e2578063f83d08ba146102b0578063fd017797146102ba5761009e565b80630d8e6e2c146100a35780633659cfe6146100c15780635aa68ac0146101055780635c60da1b1461016457806378b9033714610198575b600080fd5b6100ab6102fe565b6040518082815260200191505060405180910390f35b610103600480360360208110156100d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103ab565b005b61010d61083e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610150578082015181840152602081019050610135565b505050509050019250505060405180910390f35b61016c610987565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a06109ab565b60405180821515815260200191505060405180910390f35b6101c0610a58565b60405180821515815260200191505060405180910390f35b6101e0610b07565b005b610298600480360360208110156101f857600080fd5b810190808035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184602083028401116401000000008311171561024957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610b90565b60405180821515815260200191505060405180910390f35b6102b8610c8d565b005b6102e6600480360360208110156102d057600080fd5b8101908080359060200190929190505050610d16565b60405180821515815260200191505060405180910390f35b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16630d8e6e2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b810190808051906020019092919050505091505090565b3073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b815260040160206040518083038186803b1580156103f157600080fd5b505afa158015610405573d6000803e3d6000fd5b505050506040513d602081101561041b57600080fd5b810190808051906020019092919050505061049e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f54686520636f6e7472616374206973206c6f636b65642e00000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610543576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526054815260200180610e5a6054913960600191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561058b57600080fd5b505af115801561059f573d6000803e3d6000fd5b505050506040513d60208110156105b557600080fd5b810190808051906020019092919050505061061b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610eae602f913960400191505060405180910390fd5b60603073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b815260040160006040518083038186803b15801561066357600080fd5b505afa158015610677573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156106a157600080fd5b81019080805160405193929190846401000000008211156106c157600080fd5b838201915060208201858111156106d757600080fd5b82518660208202830111640100000000821117156106f457600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561072b578082015181840152602081019050610710565b50505050905001604052505050905061074382610e16565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663b4926e25836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b838110156107d85780820151818401526020810190506107bd565b5050505090500192505050602060405180830381600087803b1580156107fd57600080fd5b505af1158015610811573d6000803e3d6000fd5b505050506040513d602081101561082757600080fd5b810190808051906020019092919050505050505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b815260040160006040518083038186803b1580156108ac57600080fd5b505afa1580156108c0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156108ea57600080fd5b810190808051604051939291908464010000000082111561090a57600080fd5b8382019150602082018581111561092057600080fd5b825186602082028301116401000000008211171561093d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015610974578082015181840152602081019050610959565b5050505090500160405250505091505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1757600080fd5b505afa158015610a2b573d6000803e3d6000fd5b505050506040513d6020811015610a4157600080fd5b810190808051906020019092919050505091505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610ac657600080fd5b505af1158015610ada573d6000803e3d6000fd5b505050506040513d6020811015610af057600080fd5b810190808051906020019092919050505091505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a69df4b56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b7557600080fd5b505af1158015610b89573d6000803e3d6000fd5b5050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663b4926e25846040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015610c25578082015181840152602081019050610c0a565b5050505090500192505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b8101908080519060200190929190505050915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f83d08ba6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610cfb57600080fd5b505af1158015610d0f573d6000803e3d6000fd5b5050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff1663fd017797856040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015610d9157600080fd5b505af1158015610da5573d6000803e3d6000fd5b505050506040513d6020811015610dbb57600080fd5b810190808051906020019092919050505090508015610e0c577fef2df0cc0f44b5a36a7de9951ef49ba4d861649244ff89bcf7ffaa1ac7291e89846040518082815260200191505060405180910390a15b8092505050919050565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe54686520636f6e747261637420746f207570677261646520746f2068617320746f20626520646966666572656e742066726f6d207468652063757272656e74206d616e6167656d656e7420636f6e74726163742e4e6f7420616c6c6f77656420746f207570677261646520746865206d616e6167656d656e7420636f6e74726163742ea26469706673582212203cacc7680fcd907639c87ed995ee91e1de9ef4d7da7437f854fb3a8fbab9b0db64736f6c634300060c0033"); + "60806040523480156200001157600080fd5b5060405162001575380380620015758339818101604052810190620000379190620000e8565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011a565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000b08262000083565b9050919050565b620000c281620000a3565b8114620000ce57600080fd5b50565b600081519050620000e281620000b7565b92915050565b6000602082840312156200010157620001006200007e565b5b60006200011184828501620000d1565b91505092915050565b61144b806200012a6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806378b903371161006657806378b9033714610149578063965a25ef146101675780639738968c14610197578063a69df4b5146101b5578063f83d08ba146101bf5761009e565b80630d8e6e2c146100a35780631f52a8ee146100c15780633659cfe6146100f15780635aa68ac01461010d5780635c60da1b1461012b575b600080fd5b6100ab6101c9565b6040516100b89190610a7e565b60405180910390f35b6100db60048036038101906100d69190610bf3565b610264565b6040516100e89190610c57565b60405180910390f35b61010b60048036038101906101069190610cd0565b610352565b005b610115610668565b6040516101229190610e47565b60405180910390f35b61013361070a565b6040516101409190610e78565b60405180910390f35b61015161072e565b60405161015e9190610c57565b60405180910390f35b610181600480360381019061017c9190610f79565b6107c9565b60405161018e9190610c57565b60405180910390f35b61019f610873565b6040516101ac9190610c57565b60405180910390f35b6101bd610910565b005b6101c7610999565b005b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16630d8e6e2c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561023a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025e9190610fee565b91505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16631f52a8ee856040518263ffffffff1660e01b81526004016102c59190611065565b6020604051808303816000875af11580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030891906110b3565b90508015610348577f52213552a930e6de0c0d7df74ece31dac1306b2c7e200ceded7a4442853189b58460405161033f9190611065565b60405180910390a15b8092505050919050565b3073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c191906110b3565b610400576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f79061113d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561048f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610486906111f5565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050091906110b3565b61053f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053690611287565b60405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b8152600401600060405180830381865afa15801561058c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105b591906113cc565b90506105c082610a22565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663965a25ef836040518263ffffffff1660e01b815260040161061f9190610e47565b6020604051808303816000875af115801561063e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066291906110b3565b50505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b8152600401600060405180830381865afa1580156106db573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061070491906113cc565b91505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b8152600401602060405180830381865afa15801561079f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c391906110b3565b91505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663965a25ef846040518263ffffffff1660e01b81526004016108289190610e47565b6020604051808303816000875af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b91906110b3565b915050919050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156108e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090a91906110b3565b91505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a69df4b56040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561097e57600080fd5b505af1158015610992573d6000803e3d6000fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f83d08ba6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a0757600080fd5b505af1158015610a1b573d6000803e3d6000fd5b5050505050565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000819050919050565b610a7881610a65565b82525050565b6000602082019050610a936000830184610a6f565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b0082610ab7565b810181811067ffffffffffffffff82111715610b1f57610b1e610ac8565b5b80604052505050565b6000610b32610a99565b9050610b3e8282610af7565b919050565b600067ffffffffffffffff821115610b5e57610b5d610ac8565b5b610b6782610ab7565b9050602081019050919050565b82818337600083830152505050565b6000610b96610b9184610b43565b610b28565b905082815260208101848484011115610bb257610bb1610ab2565b5b610bbd848285610b74565b509392505050565b600082601f830112610bda57610bd9610aad565b5b8135610bea848260208601610b83565b91505092915050565b600060208284031215610c0957610c08610aa3565b5b600082013567ffffffffffffffff811115610c2757610c26610aa8565b5b610c3384828501610bc5565b91505092915050565b60008115159050919050565b610c5181610c3c565b82525050565b6000602082019050610c6c6000830184610c48565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c9d82610c72565b9050919050565b610cad81610c92565b8114610cb857600080fd5b50565b600081359050610cca81610ca4565b92915050565b600060208284031215610ce657610ce5610aa3565b5b6000610cf484828501610cbb565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d63578082015181840152602081019050610d48565b83811115610d72576000848401525b50505050565b6000610d8382610d29565b610d8d8185610d34565b9350610d9d818560208601610d45565b610da681610ab7565b840191505092915050565b6000610dbd8383610d78565b905092915050565b6000602082019050919050565b6000610ddd82610cfd565b610de78185610d08565b935083602082028501610df985610d19565b8060005b85811015610e355784840389528151610e168582610db1565b9450610e2183610dc5565b925060208a01995050600181019050610dfd565b50829750879550505050505092915050565b60006020820190508181036000830152610e618184610dd2565b905092915050565b610e7281610c92565b82525050565b6000602082019050610e8d6000830184610e69565b92915050565b600067ffffffffffffffff821115610eae57610ead610ac8565b5b602082029050602081019050919050565b600080fd5b6000610ed7610ed284610e93565b610b28565b90508083825260208201905060208402830185811115610efa57610ef9610ebf565b5b835b81811015610f4157803567ffffffffffffffff811115610f1f57610f1e610aad565b5b808601610f2c8982610bc5565b85526020850194505050602081019050610efc565b5050509392505050565b600082601f830112610f6057610f5f610aad565b5b8135610f70848260208601610ec4565b91505092915050565b600060208284031215610f8f57610f8e610aa3565b5b600082013567ffffffffffffffff811115610fad57610fac610aa8565b5b610fb984828501610f4b565b91505092915050565b610fcb81610a65565b8114610fd657600080fd5b50565b600081519050610fe881610fc2565b92915050565b60006020828403121561100457611003610aa3565b5b600061101284828501610fd9565b91505092915050565b600082825260208201905092915050565b600061103782610d29565b611041818561101b565b9350611051818560208601610d45565b61105a81610ab7565b840191505092915050565b6000602082019050818103600083015261107f818461102c565b905092915050565b61109081610c3c565b811461109b57600080fd5b50565b6000815190506110ad81611087565b92915050565b6000602082840312156110c9576110c8610aa3565b5b60006110d78482850161109e565b91505092915050565b600082825260208201905092915050565b7f54686520636f6e7472616374206973206c6f636b65642e000000000000000000600082015250565b60006111276017836110e0565b9150611132826110f1565b602082019050919050565b600060208201905081810360008301526111568161111a565b9050919050565b7f54686520636f6e747261637420746f207570677261646520746f20686173207460008201527f6f20626520646966666572656e742066726f6d207468652063757272656e742060208201527f6d616e6167656d656e7420636f6e74726163742e000000000000000000000000604082015250565b60006111df6054836110e0565b91506111ea8261115d565b606082019050919050565b6000602082019050818103600083015261120e816111d2565b9050919050565b7f4e6f7420616c6c6f77656420746f207570677261646520746865206d616e616760008201527f656d656e7420636f6e74726163742e0000000000000000000000000000000000602082015250565b6000611271602f836110e0565b915061127c82611215565b604082019050919050565b600060208201905081810360008301526112a081611264565b9050919050565b60006112ba6112b584610b43565b610b28565b9050828152602081018484840111156112d6576112d5610ab2565b5b6112e1848285610d45565b509392505050565b600082601f8301126112fe576112fd610aad565b5b815161130e8482602086016112a7565b91505092915050565b600061132a61132584610e93565b610b28565b9050808382526020820190506020840283018581111561134d5761134c610ebf565b5b835b8181101561139457805167ffffffffffffffff81111561137257611371610aad565b5b80860161137f89826112e9565b8552602085019450505060208101905061134f565b5050509392505050565b600082601f8301126113b3576113b2610aad565b5b81516113c3848260208601611317565b91505092915050565b6000602082840312156113e2576113e1610aa3565b5b600082015167ffffffffffffffff811115611400576113ff610aa8565b5b61140c8482850161139e565b9150509291505056fea2646970667358221220d54ecb8e4ca08873c605adc0cfacb86344b94513c5134d9d2d13330e4ecc39b964736f6c634300080c0033"); public static final Bytes DEFAULT_GROUP_MANAGEMENT_RUNTIME_BYTECODE = Bytes.fromHexString( - "608060405234801561001057600080fd5b50600436106100885760003560e01c8063a69df4b51161005b578063a69df4b51461014a578063b4926e2514610154578063f83d08ba14610222578063fd0177971461022c57610088565b80630d8e6e2c1461008d5780635aa68ac0146100ab57806378b903371461010a5780639738968c1461012a575b600080fd5b610095610270565b6040518082815260200191505060405180910390f35b6100b361027a565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156100f65780820151818401526020810190506100db565b505050509050019250505060405180910390f35b6101126102d2565b60405180821515815260200191505060405180910390f35b6101326102e8565b60405180821515815260200191505060405180910390f35b61015261033f565b005b61020a6004803603602081101561016a57600080fd5b810190808035906020019064010000000081111561018757600080fd5b82018360208201111561019957600080fd5b803590602001918460208302840111640100000000831117156101bb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610437565b60405180821515815260200191505060405180910390f35b61022a6105e3565b005b6102586004803603602081101561024257600080fd5b81019080803590602001909291905050506106d9565b60405180821515815260200191505060405180910390f35b6000600154905090565b606060028054806020026020016040519081016040528092919081815260200182805480156102c857602002820191906000526020600020905b8154815260200190600101908083116102b4575b5050505050905090565b60008060149054906101000a900460ff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905090565b600060149054906101000a900460ff161561035957600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461041a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550565b60008060149054906101000a900460ff161561045257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156104e857326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146105a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b60006105b4836107d3565b90506001600060146101000a81548160ff0219169083151502179055506105d9610a0c565b5080915050919050565b600060149054906101000a900460ff166105fc57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146106bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff021916908315150217905550565b60008060149054906101000a900460ff166106f357600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146107b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b60006107bf83610a96565b90506107c9610a0c565b5080915050919050565b6000806001905060005b8351811015610a02576108028482815181106107f557fe5b6020026020010151610b81565b156108a7577fcc7365305ae5f16c463d1383713d699f43c5548bbda5537ee61373ceb9aaf213600085838151811061083657fe5b6020026020010151604051808315158152602001828152602001806020018281038252601b8152602001807f4163636f756e7420697320616c72656164792061204d656d6265720000000000815250602001935050505060405180910390a18180156108a0575060005b91506109f5565b60006108c58583815181106108b857fe5b6020026020010151610ba1565b9050606081610909576040518060400160405280601b81526020017f4163636f756e7420697320616c72656164792061204d656d6265720000000000815250610923565b604051806060016040528060218152602001610c18602191395b90507fcc7365305ae5f16c463d1383713d699f43c5548bbda5537ee61373ceb9aaf2138287858151811061095357fe5b60200260200101518360405180841515815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156109aa57808201518184015260208101905061098f565b50505050905090810190601f1680156109d75780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18380156109f05750815b935050505b80806001019150506107dd565b5080915050919050565b60006001430340416002604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b81526014018280548015610a7057602002820191906000526020600020905b815481526020019060010190808311610a5c575b505093505050506040516020818303038152906040528051906020012060018190555090565b60008060036000848152602001908152602001600020549050600081118015610ac457506002805490508111155b15610b76576002805490508114610b32576000600260016002805490500381548110610aec57fe5b906000526020600020015490508060026001840381548110610b0a57fe5b9060005260206000200181905550816003600083815260200190815260200160002081905550505b6002805480610b3d57fe5b60019003818190600052602060002001600090559055600060036000858152602001908152602001600020819055506001915050610b7c565b60009150505b919050565b600080600360008481526020019081526020016000205414159050919050565b60008060036000848152602001908152602001600020541415610c0d576002829080600181540180825580915050600190039060005260206000200160009091909190915055600280549050600360008481526020019081526020016000208190555060019050610c12565b600090505b91905056fe4d656d626572206163636f756e74206164646564207375636365737366756c6c79a26469706673582212208c78668851cd6fd2c8c66c0f57ff99c07d7fa22aaac6e0806def9d467f320ecf64736f6c634300060c0033"); + "608060405234801561001057600080fd5b5061166b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063965a25ef1161005b578063965a25ef146101175780639738968c14610147578063a69df4b514610165578063f83d08ba1461016f57610088565b80630d8e6e2c1461008d5780631f52a8ee146100ab5780635aa68ac0146100db57806378b90337146100f9575b600080fd5b610095610179565b6040516100a29190610c15565b60405180910390f35b6100c560048036038101906100c09190610d8a565b610183565b6040516100d29190610dee565b60405180910390f35b6100e361024a565b6040516100f09190610f53565b60405180910390f35b610101610323565b60405161010e9190610dee565b60405180910390f35b610131600480360381019061012c919061105b565b610339565b60405161013e9190610dee565b60405180910390f35b61014f6104b2565b60405161015c9190610dee565b60405180910390f35b61016d610509565b005b6101776105ce565b005b6000600154905090565b60008060149054906101000a900460ff1661019d57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461022b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022290611101565b60405180910390fd5b600061023683610691565b9050610240610864565b5080915050919050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101561031a57838290600052602060002001805461028d90611150565b80601f01602080910402602001604051908101604052809291908181526020018280546102b990611150565b80156103065780601f106102db57610100808354040283529160200191610306565b820191906000526020600020905b8154815290600101906020018083116102e957829003601f168201915b50505050508152602001906001019061026e565b50505050905090565b60008060149054906101000a900460ff16905090565b60008060149054906101000a900460ff161561035457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156103ea57326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046f90611101565b60405180910390fd5b6000610483836108a8565b90506001600060146101000a81548160ff0219169083151502179055506104a8610864565b5080915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905090565b600060149054906101000a900460ff161561052357600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146105b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a890611101565b60405180910390fd5b6001600060146101000a81548160ff021916908315150217905550565b600060149054906101000a900460ff166105e757600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066c90611101565b60405180910390fd5b60008060146101000a81548160ff021916908315150217905550565b6000806003836040516106a491906111be565b90815260200160405180910390205490506000811180156106ca57506002805490508111155b156108595760028054905081146107fb576000600260016002805490506106f1919061120e565b8154811061070257610701611242565b5b90600052602060002001805461071790611150565b80601f016020809104026020016040519081016040528092919081815260200182805461074390611150565b80156107905780601f1061076557610100808354040283529160200191610790565b820191906000526020600020905b81548152906001019060200180831161077357829003601f168201915b505050505090508060026001846107a7919061120e565b815481106107b8576107b7611242565b5b9060005260206000200190805190602001906107d5929190610b19565b50816003826040516107e791906111be565b908152602001604051809103902081905550505b600280548061080d5761080c611271565b5b6001900381819060005260206000200160006108299190610b9f565b9055600060038460405161083d91906111be565b908152602001604051809103902081905550600191505061085f565b60009150505b919050565b6000600143610873919061120e565b404160026040516020016108899392919061142b565b6040516020818303038152906040528051906020012060018190555090565b6000806001905060005b8351811015610a45576108de8482815181106108d1576108d0611242565b5b6020026020010151610a4f565b15610949577f1673b13ca99fc5f5d54f8ebc163339b3c03f5f661cec3f5dfe506fdbd2602de6600085838151811061091957610918611242565b5b602002602001015160405161092f9291906114ff565b60405180910390a1818015610942575060005b9150610a32565b600061096e85838151811061096157610960611242565b5b6020026020010151610a7a565b90506000816109b2576040518060400160405280601b81526020017f4163636f756e7420697320616c72656164792061204d656d62657200000000008152506109cc565b604051806060016040528060218152602001611615602191395b90507f1673b13ca99fc5f5d54f8ebc163339b3c03f5f661cec3f5dfe506fdbd2602de682878581518110610a0357610a02611242565b5b602002602001015183604051610a1b93929190611586565b60405180910390a1838015610a2d5750815b935050505b8080610a3d906115cb565b9150506108b2565b5080915050919050565b600080600383604051610a6291906111be565b90815260200160405180910390205414159050919050565b600080600383604051610a8d91906111be565b9081526020016040518091039020541415610b0f57600282908060018154018082558091505060019003906000526020600020016000909190919091509080519060200190610add929190610b19565b50600280549050600383604051610af491906111be565b90815260200160405180910390208190555060019050610b14565b600090505b919050565b828054610b2590611150565b90600052602060002090601f016020900481019282610b475760008555610b8e565b82601f10610b6057805160ff1916838001178555610b8e565b82800160010185558215610b8e579182015b82811115610b8d578251825591602001919060010190610b72565b5b509050610b9b9190610bdf565b5090565b508054610bab90611150565b6000825580601f10610bbd5750610bdc565b601f016020900490600052602060002090810190610bdb9190610bdf565b5b50565b5b80821115610bf8576000816000905550600101610be0565b5090565b6000819050919050565b610c0f81610bfc565b82525050565b6000602082019050610c2a6000830184610c06565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610c9782610c4e565b810181811067ffffffffffffffff82111715610cb657610cb5610c5f565b5b80604052505050565b6000610cc9610c30565b9050610cd58282610c8e565b919050565b600067ffffffffffffffff821115610cf557610cf4610c5f565b5b610cfe82610c4e565b9050602081019050919050565b82818337600083830152505050565b6000610d2d610d2884610cda565b610cbf565b905082815260208101848484011115610d4957610d48610c49565b5b610d54848285610d0b565b509392505050565b600082601f830112610d7157610d70610c44565b5b8135610d81848260208601610d1a565b91505092915050565b600060208284031215610da057610d9f610c3a565b5b600082013567ffffffffffffffff811115610dbe57610dbd610c3f565b5b610dca84828501610d5c565b91505092915050565b60008115159050919050565b610de881610dd3565b82525050565b6000602082019050610e036000830184610ddf565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610e6f578082015181840152602081019050610e54565b83811115610e7e576000848401525b50505050565b6000610e8f82610e35565b610e998185610e40565b9350610ea9818560208601610e51565b610eb281610c4e565b840191505092915050565b6000610ec98383610e84565b905092915050565b6000602082019050919050565b6000610ee982610e09565b610ef38185610e14565b935083602082028501610f0585610e25565b8060005b85811015610f415784840389528151610f228582610ebd565b9450610f2d83610ed1565b925060208a01995050600181019050610f09565b50829750879550505050505092915050565b60006020820190508181036000830152610f6d8184610ede565b905092915050565b600067ffffffffffffffff821115610f9057610f8f610c5f565b5b602082029050602081019050919050565b600080fd5b6000610fb9610fb484610f75565b610cbf565b90508083825260208201905060208402830185811115610fdc57610fdb610fa1565b5b835b8181101561102357803567ffffffffffffffff81111561100157611000610c44565b5b80860161100e8982610d5c565b85526020850194505050602081019050610fde565b5050509392505050565b600082601f83011261104257611041610c44565b5b8135611052848260208601610fa6565b91505092915050565b60006020828403121561107157611070610c3a565b5b600082013567ffffffffffffffff81111561108f5761108e610c3f565b5b61109b8482850161102d565b91505092915050565b600082825260208201905092915050565b7f4f726967696e206e6f7420746865206f776e65722e0000000000000000000000600082015250565b60006110eb6015836110a4565b91506110f6826110b5565b602082019050919050565b6000602082019050818103600083015261111a816110de565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061116857607f821691505b6020821081141561117c5761117b611121565b5b50919050565b600081905092915050565b600061119882610e35565b6111a28185611182565b93506111b2818560208601610e51565b80840191505092915050565b60006111ca828461118d565b915081905092915050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611219826111d5565b9150611224836111d5565b925082821015611237576112366111df565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006112cb826112a0565b9050919050565b6112db816112c0565b82525050565b600081549050919050565b60008190508160005260206000209050919050565b60008190508160005260206000209050919050565b6000815461132381611150565b61132d8186610e40565b94506001821660008114611348576001811461135a5761138d565b60ff198316865260208601935061138d565b61136385611301565b60005b8381101561138557815481890152600182019150602081019050611366565b808801955050505b50505092915050565b60006113a28383611316565b905092915050565b6000600182019050919050565b60006113c2826112e1565b6113cc8185610e14565b9350836020820285016113de856112ec565b8060005b85811015611419578484038952816113fa8582611396565b9450611405836113aa565b925060208a019950506001810190506113e2565b50829750879550505050505092915050565b60006060820190506114406000830186610c06565b61144d60208301856112d2565b818103604083015261145f81846113b7565b9050949350505050565b600082825260208201905092915050565b600061148582610e35565b61148f8185611469565b935061149f818560208601610e51565b6114a881610c4e565b840191505092915050565b7f4163636f756e7420697320616c72656164792061204d656d6265720000000000600082015250565b60006114e9601b836110a4565b91506114f4826114b3565b602082019050919050565b60006060820190506115146000830185610ddf565b8181036020830152611526818461147a565b90508181036040830152611539816114dc565b90509392505050565b600081519050919050565b600061155882611542565b61156281856110a4565b9350611572818560208601610e51565b61157b81610c4e565b840191505092915050565b600060608201905061159b6000830186610ddf565b81810360208301526115ad818561147a565b905081810360408301526115c1818461154d565b9050949350505050565b60006115d6826111d5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611609576116086111df565b5b60018201905091905056fe4d656d626572206163636f756e74206164646564207375636365737366756c6c79a26469706673582212207351f098afc65d666780043ebc448a988b12410e057b511aeda8d6dd9dacb93064736f6c634300080c0033"); - public static final Bytes ADD_PARTICIPANTS_METHOD_SIGNATURE = Bytes.fromHexString("0xb4926e25"); + public static final Bytes ADD_PARTICIPANTS_METHOD_SIGNATURE = Bytes.fromHexString("0x965a25ef"); public static final Bytes CAN_EXECUTE_METHOD_SIGNATURE = Bytes.fromHexString("0x78b90337"); public static final Bytes GET_PARTICIPANTS_METHOD_SIGNATURE = Bytes.fromHexString("0x5aa68ac0"); public static final Bytes GET_VERSION_METHOD_SIGNATURE = Bytes.fromHexString("0x0d8e6e2c"); public static final Bytes LOCK_GROUP_METHOD_SIGNATURE = Bytes.fromHexString("0xf83d08ba"); - public static final Bytes REMOVE_PARTICIPANT_METHOD_SIGNATURE = Bytes.fromHexString("0xfd017797"); + public static final Bytes REMOVE_PARTICIPANT_METHOD_SIGNATURE = Bytes.fromHexString("0x1f52a8ee"); public static final Bytes UNLOCK_GROUP_METHOD_SIGNATURE = Bytes.fromHexString("0xa69df4b5"); } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/privacy/FlexibleUtilTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/privacy/FlexibleUtilTest.java index 2be977188e1..ec46ce1bf7d 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/privacy/FlexibleUtilTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/privacy/FlexibleUtilTest.java @@ -1,7 +1,22 @@ +/* + * Copyright ConsenSys AG. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ package org.hyperledger.besu.ethereum.privacy; import static org.assertj.core.api.Assertions.assertThat; +import java.util.Arrays; import java.util.List; import org.apache.tuweni.bytes.Bytes; @@ -40,4 +55,16 @@ public void testGetParticipantsFromParameter() { assertThat(actualParticipants.get(0)).isEqualTo(expectedECParticipant1); assertThat(actualParticipants.get(1)).isEqualTo(expectedECParticipant2); } + + @Test + public void testDecodeList() { + // FIXME review this test when the encoded list is correct for EC enclave pub keys + Bytes bytes = + Bytes.fromBase64String( + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEvJwuKk"); + + List salida = FlexiblePrivacyGroupContract.decodeList(bytes); + + assertThat(salida).isEqualTo(Arrays.asList("")); + } } diff --git a/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/DefaultFlexiblePrivacyGroupManagementContract.java b/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/DefaultFlexiblePrivacyGroupManagementContract.java index 73bfd458687..37f529cbc9f 100644 --- a/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/DefaultFlexiblePrivacyGroupManagementContract.java +++ b/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/DefaultFlexiblePrivacyGroupManagementContract.java @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ + package org.hyperledger.besu.privacy.contracts.generated; import java.math.BigInteger; @@ -27,6 +28,7 @@ import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Bool; import org.web3j.abi.datatypes.DynamicArray; +import org.web3j.abi.datatypes.DynamicBytes; import org.web3j.abi.datatypes.Event; import org.web3j.abi.datatypes.Type; import org.web3j.abi.datatypes.Utf8String; @@ -53,12 +55,12 @@ * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the codegen module to update. * - *

Generated with web3j version 4.5.16. + *

Generated with web3j version 1.4.1. */ @SuppressWarnings("rawtypes") public class DefaultFlexiblePrivacyGroupManagementContract extends Contract { public static final String BINARY = - "608060405234801561001057600080fd5b50610c6e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063a69df4b51161005b578063a69df4b51461014a578063b4926e2514610154578063f83d08ba14610222578063fd0177971461022c57610088565b80630d8e6e2c1461008d5780635aa68ac0146100ab57806378b903371461010a5780639738968c1461012a575b600080fd5b610095610270565b6040518082815260200191505060405180910390f35b6100b361027a565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156100f65780820151818401526020810190506100db565b505050509050019250505060405180910390f35b6101126102d2565b60405180821515815260200191505060405180910390f35b6101326102e8565b60405180821515815260200191505060405180910390f35b61015261033f565b005b61020a6004803603602081101561016a57600080fd5b810190808035906020019064010000000081111561018757600080fd5b82018360208201111561019957600080fd5b803590602001918460208302840111640100000000831117156101bb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610437565b60405180821515815260200191505060405180910390f35b61022a6105e3565b005b6102586004803603602081101561024257600080fd5b81019080803590602001909291905050506106d9565b60405180821515815260200191505060405180910390f35b6000600154905090565b606060028054806020026020016040519081016040528092919081815260200182805480156102c857602002820191906000526020600020905b8154815260200190600101908083116102b4575b5050505050905090565b60008060149054906101000a900460ff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905090565b600060149054906101000a900460ff161561035957600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461041a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550565b60008060149054906101000a900460ff161561045257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156104e857326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146105a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b60006105b4836107d3565b90506001600060146101000a81548160ff0219169083151502179055506105d9610a0c565b5080915050919050565b600060149054906101000a900460ff166105fc57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146106bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff021916908315150217905550565b60008060149054906101000a900460ff166106f357600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146107b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f726967696e206e6f7420746865206f776e65722e000000000000000000000081525060200191505060405180910390fd5b60006107bf83610a96565b90506107c9610a0c565b5080915050919050565b6000806001905060005b8351811015610a02576108028482815181106107f557fe5b6020026020010151610b81565b156108a7577fcc7365305ae5f16c463d1383713d699f43c5548bbda5537ee61373ceb9aaf213600085838151811061083657fe5b6020026020010151604051808315158152602001828152602001806020018281038252601b8152602001807f4163636f756e7420697320616c72656164792061204d656d6265720000000000815250602001935050505060405180910390a18180156108a0575060005b91506109f5565b60006108c58583815181106108b857fe5b6020026020010151610ba1565b9050606081610909576040518060400160405280601b81526020017f4163636f756e7420697320616c72656164792061204d656d6265720000000000815250610923565b604051806060016040528060218152602001610c18602191395b90507fcc7365305ae5f16c463d1383713d699f43c5548bbda5537ee61373ceb9aaf2138287858151811061095357fe5b60200260200101518360405180841515815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156109aa57808201518184015260208101905061098f565b50505050905090810190601f1680156109d75780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18380156109f05750815b935050505b80806001019150506107dd565b5080915050919050565b60006001430340416002604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b81526014018280548015610a7057602002820191906000526020600020905b815481526020019060010190808311610a5c575b505093505050506040516020818303038152906040528051906020012060018190555090565b60008060036000848152602001908152602001600020549050600081118015610ac457506002805490508111155b15610b76576002805490508114610b32576000600260016002805490500381548110610aec57fe5b906000526020600020015490508060026001840381548110610b0a57fe5b9060005260206000200181905550816003600083815260200190815260200160002081905550505b6002805480610b3d57fe5b60019003818190600052602060002001600090559055600060036000858152602001908152602001600020819055506001915050610b7c565b60009150505b919050565b600080600360008481526020019081526020016000205414159050919050565b60008060036000848152602001908152602001600020541415610c0d576002829080600181540180825580915050600190039060005260206000200160009091909190915055600280549050600360008481526020019081526020016000208190555060019050610c12565b600090505b91905056fe4d656d626572206163636f756e74206164646564207375636365737366756c6c79a2646970667358221220aaa2dd79ed65e1a55d25832a79d0bd9f47b1b0bae7b719d96723f776987a93b264736f6c634300060c0033"; + "608060405234801561001057600080fd5b5061166b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063965a25ef1161005b578063965a25ef146101175780639738968c14610147578063a69df4b514610165578063f83d08ba1461016f57610088565b80630d8e6e2c1461008d5780631f52a8ee146100ab5780635aa68ac0146100db57806378b90337146100f9575b600080fd5b610095610179565b6040516100a29190610c15565b60405180910390f35b6100c560048036038101906100c09190610d8a565b610183565b6040516100d29190610dee565b60405180910390f35b6100e361024a565b6040516100f09190610f53565b60405180910390f35b610101610323565b60405161010e9190610dee565b60405180910390f35b610131600480360381019061012c919061105b565b610339565b60405161013e9190610dee565b60405180910390f35b61014f6104b2565b60405161015c9190610dee565b60405180910390f35b61016d610509565b005b6101776105ce565b005b6000600154905090565b60008060149054906101000a900460ff1661019d57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461022b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022290611101565b60405180910390fd5b600061023683610691565b9050610240610864565b5080915050919050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101561031a57838290600052602060002001805461028d90611150565b80601f01602080910402602001604051908101604052809291908181526020018280546102b990611150565b80156103065780601f106102db57610100808354040283529160200191610306565b820191906000526020600020905b8154815290600101906020018083116102e957829003601f168201915b50505050508152602001906001019061026e565b50505050905090565b60008060149054906101000a900460ff16905090565b60008060149054906101000a900460ff161561035457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156103ea57326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046f90611101565b60405180910390fd5b6000610483836108a8565b90506001600060146101000a81548160ff0219169083151502179055506104a8610864565b5080915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905090565b600060149054906101000a900460ff161561052357600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146105b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a890611101565b60405180910390fd5b6001600060146101000a81548160ff021916908315150217905550565b600060149054906101000a900460ff166105e757600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066c90611101565b60405180910390fd5b60008060146101000a81548160ff021916908315150217905550565b6000806003836040516106a491906111be565b90815260200160405180910390205490506000811180156106ca57506002805490508111155b156108595760028054905081146107fb576000600260016002805490506106f1919061120e565b8154811061070257610701611242565b5b90600052602060002001805461071790611150565b80601f016020809104026020016040519081016040528092919081815260200182805461074390611150565b80156107905780601f1061076557610100808354040283529160200191610790565b820191906000526020600020905b81548152906001019060200180831161077357829003601f168201915b505050505090508060026001846107a7919061120e565b815481106107b8576107b7611242565b5b9060005260206000200190805190602001906107d5929190610b19565b50816003826040516107e791906111be565b908152602001604051809103902081905550505b600280548061080d5761080c611271565b5b6001900381819060005260206000200160006108299190610b9f565b9055600060038460405161083d91906111be565b908152602001604051809103902081905550600191505061085f565b60009150505b919050565b6000600143610873919061120e565b404160026040516020016108899392919061142b565b6040516020818303038152906040528051906020012060018190555090565b6000806001905060005b8351811015610a45576108de8482815181106108d1576108d0611242565b5b6020026020010151610a4f565b15610949577f1673b13ca99fc5f5d54f8ebc163339b3c03f5f661cec3f5dfe506fdbd2602de6600085838151811061091957610918611242565b5b602002602001015160405161092f9291906114ff565b60405180910390a1818015610942575060005b9150610a32565b600061096e85838151811061096157610960611242565b5b6020026020010151610a7a565b90506000816109b2576040518060400160405280601b81526020017f4163636f756e7420697320616c72656164792061204d656d62657200000000008152506109cc565b604051806060016040528060218152602001611615602191395b90507f1673b13ca99fc5f5d54f8ebc163339b3c03f5f661cec3f5dfe506fdbd2602de682878581518110610a0357610a02611242565b5b602002602001015183604051610a1b93929190611586565b60405180910390a1838015610a2d5750815b935050505b8080610a3d906115cb565b9150506108b2565b5080915050919050565b600080600383604051610a6291906111be565b90815260200160405180910390205414159050919050565b600080600383604051610a8d91906111be565b9081526020016040518091039020541415610b0f57600282908060018154018082558091505060019003906000526020600020016000909190919091509080519060200190610add929190610b19565b50600280549050600383604051610af491906111be565b90815260200160405180910390208190555060019050610b14565b600090505b919050565b828054610b2590611150565b90600052602060002090601f016020900481019282610b475760008555610b8e565b82601f10610b6057805160ff1916838001178555610b8e565b82800160010185558215610b8e579182015b82811115610b8d578251825591602001919060010190610b72565b5b509050610b9b9190610bdf565b5090565b508054610bab90611150565b6000825580601f10610bbd5750610bdc565b601f016020900490600052602060002090810190610bdb9190610bdf565b5b50565b5b80821115610bf8576000816000905550600101610be0565b5090565b6000819050919050565b610c0f81610bfc565b82525050565b6000602082019050610c2a6000830184610c06565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610c9782610c4e565b810181811067ffffffffffffffff82111715610cb657610cb5610c5f565b5b80604052505050565b6000610cc9610c30565b9050610cd58282610c8e565b919050565b600067ffffffffffffffff821115610cf557610cf4610c5f565b5b610cfe82610c4e565b9050602081019050919050565b82818337600083830152505050565b6000610d2d610d2884610cda565b610cbf565b905082815260208101848484011115610d4957610d48610c49565b5b610d54848285610d0b565b509392505050565b600082601f830112610d7157610d70610c44565b5b8135610d81848260208601610d1a565b91505092915050565b600060208284031215610da057610d9f610c3a565b5b600082013567ffffffffffffffff811115610dbe57610dbd610c3f565b5b610dca84828501610d5c565b91505092915050565b60008115159050919050565b610de881610dd3565b82525050565b6000602082019050610e036000830184610ddf565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610e6f578082015181840152602081019050610e54565b83811115610e7e576000848401525b50505050565b6000610e8f82610e35565b610e998185610e40565b9350610ea9818560208601610e51565b610eb281610c4e565b840191505092915050565b6000610ec98383610e84565b905092915050565b6000602082019050919050565b6000610ee982610e09565b610ef38185610e14565b935083602082028501610f0585610e25565b8060005b85811015610f415784840389528151610f228582610ebd565b9450610f2d83610ed1565b925060208a01995050600181019050610f09565b50829750879550505050505092915050565b60006020820190508181036000830152610f6d8184610ede565b905092915050565b600067ffffffffffffffff821115610f9057610f8f610c5f565b5b602082029050602081019050919050565b600080fd5b6000610fb9610fb484610f75565b610cbf565b90508083825260208201905060208402830185811115610fdc57610fdb610fa1565b5b835b8181101561102357803567ffffffffffffffff81111561100157611000610c44565b5b80860161100e8982610d5c565b85526020850194505050602081019050610fde565b5050509392505050565b600082601f83011261104257611041610c44565b5b8135611052848260208601610fa6565b91505092915050565b60006020828403121561107157611070610c3a565b5b600082013567ffffffffffffffff81111561108f5761108e610c3f565b5b61109b8482850161102d565b91505092915050565b600082825260208201905092915050565b7f4f726967696e206e6f7420746865206f776e65722e0000000000000000000000600082015250565b60006110eb6015836110a4565b91506110f6826110b5565b602082019050919050565b6000602082019050818103600083015261111a816110de565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061116857607f821691505b6020821081141561117c5761117b611121565b5b50919050565b600081905092915050565b600061119882610e35565b6111a28185611182565b93506111b2818560208601610e51565b80840191505092915050565b60006111ca828461118d565b915081905092915050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611219826111d5565b9150611224836111d5565b925082821015611237576112366111df565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006112cb826112a0565b9050919050565b6112db816112c0565b82525050565b600081549050919050565b60008190508160005260206000209050919050565b60008190508160005260206000209050919050565b6000815461132381611150565b61132d8186610e40565b94506001821660008114611348576001811461135a5761138d565b60ff198316865260208601935061138d565b61136385611301565b60005b8381101561138557815481890152600182019150602081019050611366565b808801955050505b50505092915050565b60006113a28383611316565b905092915050565b6000600182019050919050565b60006113c2826112e1565b6113cc8185610e14565b9350836020820285016113de856112ec565b8060005b85811015611419578484038952816113fa8582611396565b9450611405836113aa565b925060208a019950506001810190506113e2565b50829750879550505050505092915050565b60006060820190506114406000830186610c06565b61144d60208301856112d2565b818103604083015261145f81846113b7565b9050949350505050565b600082825260208201905092915050565b600061148582610e35565b61148f8185611469565b935061149f818560208601610e51565b6114a881610c4e565b840191505092915050565b7f4163636f756e7420697320616c72656164792061204d656d6265720000000000600082015250565b60006114e9601b836110a4565b91506114f4826114b3565b602082019050919050565b60006060820190506115146000830185610ddf565b8181036020830152611526818461147a565b90508181036040830152611539816114dc565b90509392505050565b600081519050919050565b600061155882611542565b61156281856110a4565b9350611572818560208601610e51565b61157b81610c4e565b840191505092915050565b600060608201905061159b6000830186610ddf565b81810360208301526115ad818561147a565b905081810360408301526115c1818461154d565b9050949350505050565b60006115d6826111d5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611609576116086111df565b5b60018201905091905056fe4d656d626572206163636f756e74206164646564207375636365737366756c6c79a26469706673582212207351f098afc65d666780043ebc448a988b12410e057b511aeda8d6dd9dacb93064736f6c634300080c0033"; public static final String FUNC_ADDPARTICIPANTS = "addParticipants"; @@ -81,8 +83,9 @@ public class DefaultFlexiblePrivacyGroupManagementContract extends Contract { "ParticipantAdded", Arrays.>asList( new TypeReference() {}, - new TypeReference() {}, + new TypeReference() {}, new TypeReference() {})); + ; @Deprecated protected DefaultFlexiblePrivacyGroupManagementContract( @@ -171,10 +174,10 @@ public RemoteFunctionCall addParticipants(List _publ new org.web3j.abi.datatypes.Function( FUNC_ADDPARTICIPANTS, Arrays.asList( - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes32.class, + new org.web3j.abi.datatypes.DynamicArray( + org.web3j.abi.datatypes.DynamicBytes.class, org.web3j.abi.Utils.typeMap( - _publicEnclaveKeys, org.web3j.abi.datatypes.generated.Bytes32.class))), + _publicEnclaveKeys, org.web3j.abi.datatypes.DynamicBytes.class))), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -200,7 +203,7 @@ public RemoteFunctionCall getParticipants() { new org.web3j.abi.datatypes.Function( FUNC_GETPARTICIPANTS, Arrays.asList(), - Arrays.>asList(new TypeReference>() {})); + Arrays.>asList(new TypeReference>() {})); return new RemoteFunctionCall( function, new Callable() { @@ -233,7 +236,7 @@ public RemoteFunctionCall removeParticipant(byte[] _particip final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_REMOVEPARTICIPANT, - Arrays.asList(new org.web3j.abi.datatypes.generated.Bytes32(_participant)), + Arrays.asList(new org.web3j.abi.datatypes.DynamicBytes(_participant)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } diff --git a/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementInterface.java b/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementInterface.java index 76738026cd8..a1be9d2ae40 100644 --- a/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementInterface.java +++ b/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementInterface.java @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ + package org.hyperledger.besu.privacy.contracts.generated; import java.math.BigInteger; @@ -23,6 +24,7 @@ import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Bool; import org.web3j.abi.datatypes.DynamicArray; +import org.web3j.abi.datatypes.DynamicBytes; import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.Type; import org.web3j.abi.datatypes.generated.Bytes32; @@ -44,7 +46,7 @@ * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the codegen module to update. * - *

Generated with web3j version 4.5.16. + *

Generated with web3j version 1.4.1. */ @SuppressWarnings("rawtypes") public class FlexiblePrivacyGroupManagementInterface extends Contract { @@ -107,10 +109,10 @@ public RemoteFunctionCall addParticipants(List publi new Function( FUNC_ADDPARTICIPANTS, Arrays.asList( - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes32.class, + new org.web3j.abi.datatypes.DynamicArray( + org.web3j.abi.datatypes.DynamicBytes.class, org.web3j.abi.Utils.typeMap( - publicEnclaveKeys, org.web3j.abi.datatypes.generated.Bytes32.class))), + publicEnclaveKeys, org.web3j.abi.datatypes.DynamicBytes.class))), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -136,7 +138,7 @@ public RemoteFunctionCall getParticipants() { new Function( FUNC_GETPARTICIPANTS, Arrays.asList(), - Arrays.>asList(new TypeReference>() {})); + Arrays.>asList(new TypeReference>() {})); return new RemoteFunctionCall( function, new Callable() { @@ -168,7 +170,7 @@ public RemoteFunctionCall removeParticipant(byte[] participa final Function function = new Function( FUNC_REMOVEPARTICIPANT, - Arrays.asList(new org.web3j.abi.datatypes.generated.Bytes32(participant)), + Arrays.asList(new org.web3j.abi.datatypes.DynamicBytes(participant)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } diff --git a/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementProxy.java b/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementProxy.java index 96b22afe95c..61ed524afd0 100644 --- a/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementProxy.java +++ b/privacy-contracts/src/main/java/org/hyperledger/besu/privacy/contracts/generated/FlexiblePrivacyGroupManagementProxy.java @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ + package org.hyperledger.besu.privacy.contracts.generated; import java.math.BigInteger; @@ -29,6 +30,7 @@ import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Bool; import org.web3j.abi.datatypes.DynamicArray; +import org.web3j.abi.datatypes.DynamicBytes; import org.web3j.abi.datatypes.Event; import org.web3j.abi.datatypes.Type; import org.web3j.abi.datatypes.generated.Bytes32; @@ -54,12 +56,12 @@ * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the codegen module to update. * - *

Generated with web3j version 4.5.16. + *

Generated with web3j version 1.4.1. */ @SuppressWarnings("rawtypes") public class FlexiblePrivacyGroupManagementProxy extends Contract { public static final String BINARY = - "608060405234801561001057600080fd5b50604051610fa6380380610fa68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610f12806100946000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80639738968c116100665780639738968c146101b8578063a69df4b5146101d8578063b4926e25146101e2578063f83d08ba146102b0578063fd017797146102ba5761009e565b80630d8e6e2c146100a35780633659cfe6146100c15780635aa68ac0146101055780635c60da1b1461016457806378b9033714610198575b600080fd5b6100ab6102fe565b6040518082815260200191505060405180910390f35b610103600480360360208110156100d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103ab565b005b61010d61083e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610150578082015181840152602081019050610135565b505050509050019250505060405180910390f35b61016c610987565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a06109ab565b60405180821515815260200191505060405180910390f35b6101c0610a58565b60405180821515815260200191505060405180910390f35b6101e0610b07565b005b610298600480360360208110156101f857600080fd5b810190808035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184602083028401116401000000008311171561024957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610b90565b60405180821515815260200191505060405180910390f35b6102b8610c8d565b005b6102e6600480360360208110156102d057600080fd5b8101908080359060200190929190505050610d16565b60405180821515815260200191505060405180910390f35b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16630d8e6e2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b810190808051906020019092919050505091505090565b3073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b815260040160206040518083038186803b1580156103f157600080fd5b505afa158015610405573d6000803e3d6000fd5b505050506040513d602081101561041b57600080fd5b810190808051906020019092919050505061049e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f54686520636f6e7472616374206973206c6f636b65642e00000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610543576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526054815260200180610e5a6054913960600191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561058b57600080fd5b505af115801561059f573d6000803e3d6000fd5b505050506040513d60208110156105b557600080fd5b810190808051906020019092919050505061061b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610eae602f913960400191505060405180910390fd5b60603073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b815260040160006040518083038186803b15801561066357600080fd5b505afa158015610677573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156106a157600080fd5b81019080805160405193929190846401000000008211156106c157600080fd5b838201915060208201858111156106d757600080fd5b82518660208202830111640100000000821117156106f457600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561072b578082015181840152602081019050610710565b50505050905001604052505050905061074382610e16565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663b4926e25836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b838110156107d85780820151818401526020810190506107bd565b5050505090500192505050602060405180830381600087803b1580156107fd57600080fd5b505af1158015610811573d6000803e3d6000fd5b505050506040513d602081101561082757600080fd5b810190808051906020019092919050505050505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b815260040160006040518083038186803b1580156108ac57600080fd5b505afa1580156108c0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156108ea57600080fd5b810190808051604051939291908464010000000082111561090a57600080fd5b8382019150602082018581111561092057600080fd5b825186602082028301116401000000008211171561093d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015610974578082015181840152602081019050610959565b5050505090500160405250505091505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1757600080fd5b505afa158015610a2b573d6000803e3d6000fd5b505050506040513d6020811015610a4157600080fd5b810190808051906020019092919050505091505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610ac657600080fd5b505af1158015610ada573d6000803e3d6000fd5b505050506040513d6020811015610af057600080fd5b810190808051906020019092919050505091505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a69df4b56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b7557600080fd5b505af1158015610b89573d6000803e3d6000fd5b5050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663b4926e25846040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015610c25578082015181840152602081019050610c0a565b5050505090500192505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b8101908080519060200190929190505050915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f83d08ba6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610cfb57600080fd5b505af1158015610d0f573d6000803e3d6000fd5b5050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff1663fd017797856040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015610d9157600080fd5b505af1158015610da5573d6000803e3d6000fd5b505050506040513d6020811015610dbb57600080fd5b810190808051906020019092919050505090508015610e0c577fef2df0cc0f44b5a36a7de9951ef49ba4d861649244ff89bcf7ffaa1ac7291e89846040518082815260200191505060405180910390a15b8092505050919050565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe54686520636f6e747261637420746f207570677261646520746f2068617320746f20626520646966666572656e742066726f6d207468652063757272656e74206d616e6167656d656e7420636f6e74726163742e4e6f7420616c6c6f77656420746f207570677261646520746865206d616e6167656d656e7420636f6e74726163742ea26469706673582212207d77b2288fb78b354ca3a252d7513de3d808fcaa42e73f475b95f412c24a314f64736f6c634300060c0033"; + "60806040523480156200001157600080fd5b5060405162001575380380620015758339818101604052810190620000379190620000e8565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011a565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000b08262000083565b9050919050565b620000c281620000a3565b8114620000ce57600080fd5b50565b600081519050620000e281620000b7565b92915050565b6000602082840312156200010157620001006200007e565b5b60006200011184828501620000d1565b91505092915050565b61144b806200012a6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806378b903371161006657806378b9033714610149578063965a25ef146101675780639738968c14610197578063a69df4b5146101b5578063f83d08ba146101bf5761009e565b80630d8e6e2c146100a35780631f52a8ee146100c15780633659cfe6146100f15780635aa68ac01461010d5780635c60da1b1461012b575b600080fd5b6100ab6101c9565b6040516100b89190610a7e565b60405180910390f35b6100db60048036038101906100d69190610bf3565b610264565b6040516100e89190610c57565b60405180910390f35b61010b60048036038101906101069190610cd0565b610352565b005b610115610668565b6040516101229190610e47565b60405180910390f35b61013361070a565b6040516101409190610e78565b60405180910390f35b61015161072e565b60405161015e9190610c57565b60405180910390f35b610181600480360381019061017c9190610f79565b6107c9565b60405161018e9190610c57565b60405180910390f35b61019f610873565b6040516101ac9190610c57565b60405180910390f35b6101bd610910565b005b6101c7610999565b005b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16630d8e6e2c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561023a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025e9190610fee565b91505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16631f52a8ee856040518263ffffffff1660e01b81526004016102c59190611065565b6020604051808303816000875af11580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030891906110b3565b90508015610348577f52213552a930e6de0c0d7df74ece31dac1306b2c7e200ceded7a4442853189b58460405161033f9190611065565b60405180910390a15b8092505050919050565b3073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c191906110b3565b610400576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f79061113d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561048f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610486906111f5565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050091906110b3565b61053f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053690611287565b60405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b8152600401600060405180830381865afa15801561058c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105b591906113cc565b90506105c082610a22565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663965a25ef836040518263ffffffff1660e01b815260040161061f9190610e47565b6020604051808303816000875af115801561063e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066291906110b3565b50505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b8152600401600060405180830381865afa1580156106db573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061070491906113cc565b91505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b8152600401602060405180830381865afa15801561079f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c391906110b3565b91505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663965a25ef846040518263ffffffff1660e01b81526004016108289190610e47565b6020604051808303816000875af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b91906110b3565b915050919050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156108e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090a91906110b3565b91505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a69df4b56040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561097e57600080fd5b505af1158015610992573d6000803e3d6000fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f83d08ba6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a0757600080fd5b505af1158015610a1b573d6000803e3d6000fd5b5050505050565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000819050919050565b610a7881610a65565b82525050565b6000602082019050610a936000830184610a6f565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b0082610ab7565b810181811067ffffffffffffffff82111715610b1f57610b1e610ac8565b5b80604052505050565b6000610b32610a99565b9050610b3e8282610af7565b919050565b600067ffffffffffffffff821115610b5e57610b5d610ac8565b5b610b6782610ab7565b9050602081019050919050565b82818337600083830152505050565b6000610b96610b9184610b43565b610b28565b905082815260208101848484011115610bb257610bb1610ab2565b5b610bbd848285610b74565b509392505050565b600082601f830112610bda57610bd9610aad565b5b8135610bea848260208601610b83565b91505092915050565b600060208284031215610c0957610c08610aa3565b5b600082013567ffffffffffffffff811115610c2757610c26610aa8565b5b610c3384828501610bc5565b91505092915050565b60008115159050919050565b610c5181610c3c565b82525050565b6000602082019050610c6c6000830184610c48565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c9d82610c72565b9050919050565b610cad81610c92565b8114610cb857600080fd5b50565b600081359050610cca81610ca4565b92915050565b600060208284031215610ce657610ce5610aa3565b5b6000610cf484828501610cbb565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d63578082015181840152602081019050610d48565b83811115610d72576000848401525b50505050565b6000610d8382610d29565b610d8d8185610d34565b9350610d9d818560208601610d45565b610da681610ab7565b840191505092915050565b6000610dbd8383610d78565b905092915050565b6000602082019050919050565b6000610ddd82610cfd565b610de78185610d08565b935083602082028501610df985610d19565b8060005b85811015610e355784840389528151610e168582610db1565b9450610e2183610dc5565b925060208a01995050600181019050610dfd565b50829750879550505050505092915050565b60006020820190508181036000830152610e618184610dd2565b905092915050565b610e7281610c92565b82525050565b6000602082019050610e8d6000830184610e69565b92915050565b600067ffffffffffffffff821115610eae57610ead610ac8565b5b602082029050602081019050919050565b600080fd5b6000610ed7610ed284610e93565b610b28565b90508083825260208201905060208402830185811115610efa57610ef9610ebf565b5b835b81811015610f4157803567ffffffffffffffff811115610f1f57610f1e610aad565b5b808601610f2c8982610bc5565b85526020850194505050602081019050610efc565b5050509392505050565b600082601f830112610f6057610f5f610aad565b5b8135610f70848260208601610ec4565b91505092915050565b600060208284031215610f8f57610f8e610aa3565b5b600082013567ffffffffffffffff811115610fad57610fac610aa8565b5b610fb984828501610f4b565b91505092915050565b610fcb81610a65565b8114610fd657600080fd5b50565b600081519050610fe881610fc2565b92915050565b60006020828403121561100457611003610aa3565b5b600061101284828501610fd9565b91505092915050565b600082825260208201905092915050565b600061103782610d29565b611041818561101b565b9350611051818560208601610d45565b61105a81610ab7565b840191505092915050565b6000602082019050818103600083015261107f818461102c565b905092915050565b61109081610c3c565b811461109b57600080fd5b50565b6000815190506110ad81611087565b92915050565b6000602082840312156110c9576110c8610aa3565b5b60006110d78482850161109e565b91505092915050565b600082825260208201905092915050565b7f54686520636f6e7472616374206973206c6f636b65642e000000000000000000600082015250565b60006111276017836110e0565b9150611132826110f1565b602082019050919050565b600060208201905081810360008301526111568161111a565b9050919050565b7f54686520636f6e747261637420746f207570677261646520746f20686173207460008201527f6f20626520646966666572656e742066726f6d207468652063757272656e742060208201527f6d616e6167656d656e7420636f6e74726163742e000000000000000000000000604082015250565b60006111df6054836110e0565b91506111ea8261115d565b606082019050919050565b6000602082019050818103600083015261120e816111d2565b9050919050565b7f4e6f7420616c6c6f77656420746f207570677261646520746865206d616e616760008201527f656d656e7420636f6e74726163742e0000000000000000000000000000000000602082015250565b6000611271602f836110e0565b915061127c82611215565b604082019050919050565b600060208201905081810360008301526112a081611264565b9050919050565b60006112ba6112b584610b43565b610b28565b9050828152602081018484840111156112d6576112d5610ab2565b5b6112e1848285610d45565b509392505050565b600082601f8301126112fe576112fd610aad565b5b815161130e8482602086016112a7565b91505092915050565b600061132a61132584610e93565b610b28565b9050808382526020820190506020840283018581111561134d5761134c610ebf565b5b835b8181101561139457805167ffffffffffffffff81111561137257611371610aad565b5b80860161137f89826112e9565b8552602085019450505060208101905061134f565b5050509392505050565b600082601f8301126113b3576113b2610aad565b5b81516113c3848260208601611317565b91505092915050565b6000602082840312156113e2576113e1610aa3565b5b600082015167ffffffffffffffff811115611400576113ff610aa8565b5b61140c8482850161139e565b9150509291505056fea2646970667358221220d54ecb8e4ca08873c605adc0cfacb86344b94513c5134d9d2d13330e4ecc39b964736f6c634300080c0033"; public static final String FUNC_ADDPARTICIPANTS = "addParticipants"; @@ -83,7 +85,9 @@ public class FlexiblePrivacyGroupManagementProxy extends Contract { public static final Event PARTICIPANTREMOVED_EVENT = new Event( - "ParticipantRemoved", Arrays.>asList(new TypeReference() {})); + "ParticipantRemoved", + Arrays.>asList(new TypeReference() {})); + ; @Deprecated protected FlexiblePrivacyGroupManagementProxy( @@ -168,10 +172,10 @@ public RemoteFunctionCall addParticipants(List _publ new org.web3j.abi.datatypes.Function( FUNC_ADDPARTICIPANTS, Arrays.asList( - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes32.class, + new org.web3j.abi.datatypes.DynamicArray( + org.web3j.abi.datatypes.DynamicBytes.class, org.web3j.abi.Utils.typeMap( - _publicEnclaveKeys, org.web3j.abi.datatypes.generated.Bytes32.class))), + _publicEnclaveKeys, org.web3j.abi.datatypes.DynamicBytes.class))), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -197,7 +201,7 @@ public RemoteFunctionCall getParticipants() { new org.web3j.abi.datatypes.Function( FUNC_GETPARTICIPANTS, Arrays.asList(), - Arrays.>asList(new TypeReference>() {})); + Arrays.>asList(new TypeReference>() {})); return new RemoteFunctionCall( function, new Callable() { @@ -239,7 +243,7 @@ public RemoteFunctionCall removeParticipant(byte[] _particip final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_REMOVEPARTICIPANT, - Arrays.asList(new org.web3j.abi.datatypes.generated.Bytes32(_participant)), + Arrays.asList(new org.web3j.abi.datatypes.DynamicBytes(_participant)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } diff --git a/privacy-contracts/src/main/solidity/DefaultFlexiblePrivacyGroupManagementContract.sol b/privacy-contracts/src/main/solidity/DefaultFlexiblePrivacyGroupManagementContract.sol index 2ca8a511ece..9353a5ca5fd 100644 --- a/privacy-contracts/src/main/solidity/DefaultFlexiblePrivacyGroupManagementContract.sol +++ b/privacy-contracts/src/main/solidity/DefaultFlexiblePrivacyGroupManagementContract.sol @@ -12,7 +12,8 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.6.0; +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; import "./FlexiblePrivacyGroupManagementInterface.sol"; contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupManagementInterface { @@ -20,8 +21,8 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa address private _owner; bool private _canExecute; bytes32 private _version; - bytes32[] private distributionList; - mapping(bytes32 => uint256) private distributionIndexOf; + bytes[] private distributionList; + mapping(bytes => uint256) private distributionIndexOf; function getVersion() external view override returns (bytes32) { return _version; @@ -43,10 +44,10 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa _canExecute = true; } - function addParticipants(bytes32[] memory _publicEnclaveKeys) public override returns (bool) { + function addParticipants(bytes[] memory _publicEnclaveKeys) public override returns (bool) { require(!_canExecute); if (_owner == address(0x0)) { - // The account creating this group is set to be the owner + // The account creating this group is set to be the owner _owner = tx.origin; } require(tx.origin == _owner, "Origin not the owner."); @@ -56,7 +57,7 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa return result; } - function removeParticipant(bytes32 _participant) public override returns (bool) { + function removeParticipant(bytes memory _participant) public override returns (bool) { require(_canExecute); require(tx.origin == _owner, "Origin not the owner."); bool result = removeInternal(_participant); @@ -64,7 +65,7 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa return result; } - function getParticipants() public view override returns (bytes32[] memory) { + function getParticipants() public view override returns (bytes[] memory) { return distributionList; } @@ -74,7 +75,7 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa //internal functions - function addAll(bytes32[] memory _publicEnclaveKeys) internal returns (bool) { + function addAll(bytes[] memory _publicEnclaveKeys) internal returns (bool) { bool allAdded = true; for (uint i = 0; i < _publicEnclaveKeys.length; i++) { if (isMember(_publicEnclaveKeys[i])) { @@ -90,11 +91,11 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa return allAdded; } - function isMember(bytes32 _publicEnclaveKey) internal view returns (bool) { + function isMember(bytes memory _publicEnclaveKey) internal view returns (bool) { return distributionIndexOf[_publicEnclaveKey] != 0; } - function addParticipant(bytes32 _publicEnclaveKey) internal returns (bool) { + function addParticipant(bytes memory _publicEnclaveKey) internal returns (bool) { if (distributionIndexOf[_publicEnclaveKey] == 0) { distributionList.push(_publicEnclaveKey); distributionIndexOf[_publicEnclaveKey] = distributionList.length; @@ -103,12 +104,12 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa return false; } - function removeInternal(bytes32 _participant) internal returns (bool) { + function removeInternal(bytes memory _participant) internal returns (bool) { uint256 index = distributionIndexOf[_participant]; if (index > 0 && index <= distributionList.length) { //move last address into index being vacated (unless we are dealing with last index) if (index != distributionList.length) { - bytes32 lastPublicKey = distributionList[distributionList.length - 1]; + bytes memory lastPublicKey = distributionList[distributionList.length - 1]; distributionList[index - 1] = lastPublicKey; distributionIndexOf[lastPublicKey] = index; } @@ -120,12 +121,12 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa } function updateVersion() internal returns (int) { - _version = keccak256(abi.encodePacked(blockhash(block.number-1), block.coinbase, distributionList)); + _version = keccak256(abi.encode(blockhash(block.number-1), block.coinbase, distributionList)); } event ParticipantAdded( bool success, - bytes32 publicEnclaveKey, + bytes publicEnclaveKey, string message ); } diff --git a/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementInterface.sol b/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementInterface.sol index 45a4104347e..0b3131bef9f 100644 --- a/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementInterface.sol +++ b/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementInterface.sol @@ -12,14 +12,16 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.6.0; +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + interface FlexiblePrivacyGroupManagementInterface { - function addParticipants(bytes32[] calldata publicEnclaveKeys) external returns (bool); + function addParticipants(bytes[] calldata publicEnclaveKeys) external returns (bool); - function removeParticipant(bytes32 participant) external returns (bool); + function removeParticipant(bytes calldata participant) external returns (bool); - function getParticipants() external view returns (bytes32[] memory); + function getParticipants() external view returns (bytes[] memory); function lock() external; diff --git a/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementProxy.sol b/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementProxy.sol index 28f47c973ff..1f0f33e9c0f 100644 --- a/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementProxy.sol +++ b/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementProxy.sol @@ -12,7 +12,8 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.6.0; +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; import "./FlexiblePrivacyGroupManagementInterface.sol"; contract FlexiblePrivacyGroupManagementProxy is FlexiblePrivacyGroupManagementInterface { @@ -27,23 +28,23 @@ contract FlexiblePrivacyGroupManagementProxy is FlexiblePrivacyGroupManagementIn implementation = _newImp; } - function addParticipants(bytes32[] memory _publicEnclaveKeys) public override returns (bool) { + function addParticipants(bytes[] memory _publicEnclaveKeys) public override returns (bool) { FlexiblePrivacyGroupManagementInterface privacyInterface = FlexiblePrivacyGroupManagementInterface(implementation); return privacyInterface.addParticipants(_publicEnclaveKeys); } - function getParticipants() view public override returns (bytes32[] memory) { + function getParticipants() view public override returns (bytes[] memory) { FlexiblePrivacyGroupManagementInterface privacyInterface = FlexiblePrivacyGroupManagementInterface(implementation); return privacyInterface.getParticipants(); } - function removeParticipant(bytes32 _participant) public override returns (bool) { + function removeParticipant(bytes memory _participant) public override returns (bool) { FlexiblePrivacyGroupManagementInterface privacyInterface = FlexiblePrivacyGroupManagementInterface(implementation); bool result = privacyInterface.removeParticipant(_participant); if (result) { emit ParticipantRemoved(_participant); } - return result; + return result; } function lock() public override { @@ -75,15 +76,14 @@ contract FlexiblePrivacyGroupManagementProxy is FlexiblePrivacyGroupManagementIn require(this.canExecute(), "The contract is locked."); require(implementation != _newImplementation, "The contract to upgrade to has to be different from the current management contract."); require(this.canUpgrade(), "Not allowed to upgrade the management contract."); - bytes32[] memory participants = this.getParticipants(); + bytes[] memory participants = this.getParticipants(); _setImplementation(_newImplementation); FlexiblePrivacyGroupManagementInterface privacyInterface = FlexiblePrivacyGroupManagementInterface(implementation); privacyInterface.addParticipants(participants); } event ParticipantRemoved( - bytes32 publicEnclaveKey + bytes publicEnclaveKey ); - } diff --git a/privacy-contracts/src/main/solidity/generateWrappers.sh b/privacy-contracts/src/main/solidity/generateWrappers.sh index a78f3781c24..068d7a1e3ac 100755 --- a/privacy-contracts/src/main/solidity/generateWrappers.sh +++ b/privacy-contracts/src/main/solidity/generateWrappers.sh @@ -16,7 +16,7 @@ done for target in ${targets}; do - web3j solidity generate \ + web3j generate solidity \ -b build/${target}.bin \ -a build/${target}.abi \ -o ../java \