actualParticipants = FlexibleUtil.decodeList(rlpEncodedOneParticipant);
+
+ assertThat(actualParticipants).isEqualTo(Arrays.asList(EXPECTED_EC_PARTICIPANT_1));
+
+ final Bytes wrongBytes =
+ Bytes.fromBase64String(
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==");
+
+ actualParticipants = FlexibleUtil.decodeList(wrongBytes);
+ assertThat(actualParticipants).isEmpty();
+ }
+}
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..f7e349cb555 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
@@ -27,6 +27,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 +54,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";
+ "608060405234801561001057600080fd5b50611666806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063965a25ef1161005b578063965a25ef146101175780639738968c14610147578063a69df4b514610165578063f83d08ba1461016f57610088565b80630d8e6e2c1461008d5780631f52a8ee146100ab5780635aa68ac0146100db57806378b90337146100f9575b600080fd5b610095610179565b6040516100a29190610c58565b60405180910390f35b6100c560048036038101906100c09190610ce2565b610183565b6040516100d29190610d4a565b60405180910390f35b6100e361024b565b6040516100f09190610ec0565b60405180910390f35b610101610324565b60405161010e9190610d4a565b60405180910390f35b610131600480360381019061012c9190610f38565b61033a565b60405161013e9190610d4a565b60405180910390f35b61014f6104b4565b60405161015c9190610d4a565b60405180910390f35b61016d61050b565b005b6101776105d0565b005b6000600154905090565b60008060149054906101000a900460ff1661019d57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461022b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022290610fe2565b60405180910390fd5b60006102378484610693565b90506102416107e6565b8091505092915050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101561031b57838290600052602060002001805461028e90611031565b80601f01602080910402602001604051908101604052809291908181526020018280546102ba90611031565b80156103075780601f106102dc57610100808354040283529160200191610307565b820191906000526020600020905b8154815290600101906020018083116102ea57829003601f168201915b50505050508152602001906001019061026f565b50505050905090565b60008060149054906101000a900460ff16905090565b60008060149054906101000a900460ff161561035557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156103eb57326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047090610fe2565b60405180910390fd5b60006104858484610827565b90506001600060146101000a81548160ff0219169083151502179055506104aa6107e6565b8091505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905090565b600060149054906101000a900460ff161561052557600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146105b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105aa90610fe2565b60405180910390fd5b6001600060146101000a81548160ff021916908315150217905550565b600060149054906101000a900460ff166105e957600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066e90610fe2565b60405180910390fd5b60008060146101000a81548160ff021916908315150217905550565b600080600384846040516106a89291906110a2565b90815260200160405180910390205490506000811180156106ce57506002805490508111155b156107da57600280549050811461077a576000600260016002805490506106f591906110f4565b8154811061070657610705611128565b5b90600052602060002001905080600260018461072291906110f4565b8154811061073357610732611128565b5b9060005260206000200190805461074990611031565b610754929190610acf565b508160038260405161076691906111eb565b908152602001604051809103902081905550505b600280548061078c5761078b611202565b5b6001900381819060005260206000200160006107a89190610b5c565b90556000600385856040516107be9291906110a2565b90815260200160405180910390208190555060019150506107e0565b60009150505b92915050565b6001436107f391906110f4565b40416002604051602001610809939291906113bc565b60405160208183030381529060405280519060200120600181905550565b6000806001905060005b848490508110156109f05761086985858381811061085257610851611128565b5b90506020028101906108649190611409565b6109fb565b156108df577f1673b13ca99fc5f5d54f8ebc163339b3c03f5f661cec3f5dfe506fdbd2602de660008686848181106108a4576108a3611128565b5b90506020028101906108b69190611409565b6040516108c5939291906114f6565b60405180910390a18180156108d8575060005b91506109dd565b600061090e8686848181106108f7576108f6611128565b5b90506020028101906109099190611409565b610a29565b9050600081610952576040518060400160405280601b81526020017f4163636f756e7420697320616c72656164792061204d656d626572000000000081525061096c565b604051806060016040528060218152602001611610602191395b90507f1673b13ca99fc5f5d54f8ebc163339b3c03f5f661cec3f5dfe506fdbd2602de6828888868181106109a3576109a2611128565b5b90506020028101906109b59190611409565b846040516109c6949392919061157f565b60405180910390a18380156109d85750815b935050505b80806109e8906115c6565b915050610831565b508091505092915050565b60008060038484604051610a109291906110a2565b9081526020016040518091039020541415905092915050565b60008060038484604051610a3e9291906110a2565b9081526020016040518091039020541415610ac4576002838390918060018154018082558091505060019003906000526020600020016000909192909192909192909192509190610a90929190610b9c565b5060028054905060038484604051610aa99291906110a2565b90815260200160405180910390208190555060019050610ac9565b600090505b92915050565b828054610adb90611031565b90600052602060002090601f016020900481019282610afd5760008555610b4b565b82601f10610b0e5780548555610b4b565b82800160010185558215610b4b57600052602060002091601f016020900482015b82811115610b4a578254825591600101919060010190610b2f565b5b509050610b589190610c22565b5090565b508054610b6890611031565b6000825580601f10610b7a5750610b99565b601f016020900490600052602060002090810190610b989190610c22565b5b50565b828054610ba890611031565b90600052602060002090601f016020900481019282610bca5760008555610c11565b82601f10610be357803560ff1916838001178555610c11565b82800160010185558215610c11579182015b82811115610c10578235825591602001919060010190610bf5565b5b509050610c1e9190610c22565b5090565b5b80821115610c3b576000816000905550600101610c23565b5090565b6000819050919050565b610c5281610c3f565b82525050565b6000602082019050610c6d6000830184610c49565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610ca257610ca1610c7d565b5b8235905067ffffffffffffffff811115610cbf57610cbe610c82565b5b602083019150836001820283011115610cdb57610cda610c87565b5b9250929050565b60008060208385031215610cf957610cf8610c73565b5b600083013567ffffffffffffffff811115610d1757610d16610c78565b5b610d2385828601610c8c565b92509250509250929050565b60008115159050919050565b610d4481610d2f565b82525050565b6000602082019050610d5f6000830184610d3b565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610dcb578082015181840152602081019050610db0565b83811115610dda576000848401525b50505050565b6000601f19601f8301169050919050565b6000610dfc82610d91565b610e068185610d9c565b9350610e16818560208601610dad565b610e1f81610de0565b840191505092915050565b6000610e368383610df1565b905092915050565b6000602082019050919050565b6000610e5682610d65565b610e608185610d70565b935083602082028501610e7285610d81565b8060005b85811015610eae5784840389528151610e8f8582610e2a565b9450610e9a83610e3e565b925060208a01995050600181019050610e76565b50829750879550505050505092915050565b60006020820190508181036000830152610eda8184610e4b565b905092915050565b60008083601f840112610ef857610ef7610c7d565b5b8235905067ffffffffffffffff811115610f1557610f14610c82565b5b602083019150836020820283011115610f3157610f30610c87565b5b9250929050565b60008060208385031215610f4f57610f4e610c73565b5b600083013567ffffffffffffffff811115610f6d57610f6c610c78565b5b610f7985828601610ee2565b92509250509250929050565b600082825260208201905092915050565b7f4f726967696e206e6f7420746865206f776e65722e0000000000000000000000600082015250565b6000610fcc601583610f85565b9150610fd782610f96565b602082019050919050565b60006020820190508181036000830152610ffb81610fbf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061104957607f821691505b6020821081141561105d5761105c611002565b5b50919050565b600081905092915050565b82818337600083830152505050565b60006110898385611063565b935061109683858461106e565b82840190509392505050565b60006110af82848661107d565b91508190509392505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006110ff826110bb565b915061110a836110bb565b92508282101561111d5761111c6110c5565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008190508160005260206000209050919050565b6000815461117981611031565b6111838186611063565b9450600182166000811461119e57600181146111af576111e2565b60ff198316865281860193506111e2565b6111b885611157565b60005b838110156111da578154818901526001820191506020810190506111bb565b838801955050505b50505092915050565b60006111f7828461116c565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061125c82611231565b9050919050565b61126c81611251565b82525050565b600081549050919050565b60008190508160005260206000209050919050565b60008190508160005260206000209050919050565b600081546112b481611031565b6112be8186610d9c565b945060018216600081146112d957600181146112eb5761131e565b60ff198316865260208601935061131e565b6112f485611292565b60005b83811015611316578154818901526001820191506020810190506112f7565b808801955050505b50505092915050565b600061133383836112a7565b905092915050565b6000600182019050919050565b600061135382611272565b61135d8185610d70565b93508360208202850161136f8561127d565b8060005b858110156113aa5784840389528161138b8582611327565b94506113968361133b565b925060208a01995050600181019050611373565b50829750879550505050505092915050565b60006060820190506113d16000830186610c49565b6113de6020830185611263565b81810360408301526113f08184611348565b9050949350505050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112611426576114256113fa565b5b80840192508235915067ffffffffffffffff821115611448576114476113ff565b5b60208301925060018202360383131561146457611463611404565b5b509250929050565b600082825260208201905092915050565b6000611489838561146c565b935061149683858461106e565b61149f83610de0565b840190509392505050565b7f4163636f756e7420697320616c72656164792061204d656d6265720000000000600082015250565b60006114e0601b83610f85565b91506114eb826114aa565b602082019050919050565b600060608201905061150b6000830186610d3b565b818103602083015261151e81848661147d565b90508181036040830152611531816114d3565b9050949350505050565b600081519050919050565b60006115518261153b565b61155b8185610f85565b935061156b818560208601610dad565b61157481610de0565b840191505092915050565b60006060820190506115946000830187610d3b565b81810360208301526115a781858761147d565b905081810360408301526115bb8184611546565b905095945050505050565b60006115d1826110bb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611604576116036110c5565b5b60018201905091905056fe4d656d626572206163636f756e74206164646564207375636365737366756c6c79a2646970667358221220d3a7456a07fdf8421729e71e971f6d0cb06adecd41665ab8a87c08377118ad1664736f6c634300080c0033";
public static final String FUNC_ADDPARTICIPANTS = "addParticipants";
@@ -81,8 +82,9 @@ public class DefaultFlexiblePrivacyGroupManagementContract extends Contract {
"ParticipantAdded",
Arrays.>asList(
new TypeReference() {},
- new TypeReference() {},
+ new TypeReference() {},
new TypeReference() {}));
+ ;
@Deprecated
protected DefaultFlexiblePrivacyGroupManagementContract(
@@ -171,10 +173,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);
}
@@ -188,11 +190,13 @@ public RemoteFunctionCall canExecute() {
return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
- public RemoteFunctionCall canUpgrade() {
+ public RemoteFunctionCall canUpgrade() {
final org.web3j.abi.datatypes.Function function =
new org.web3j.abi.datatypes.Function(
- FUNC_CANUPGRADE, Arrays.asList(), Collections.>emptyList());
- return executeRemoteCallTransaction(function);
+ FUNC_CANUPGRADE,
+ Arrays.asList(),
+ Arrays.>asList(new TypeReference() {}));
+ return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
public RemoteFunctionCall getParticipants() {
@@ -200,7 +204,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 +237,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..dff393c2a16 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
@@ -23,6 +23,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 +45,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 +108,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 +137,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 +169,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..4b94feb919d 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
@@ -29,6 +29,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 +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 FlexiblePrivacyGroupManagementProxy extends Contract {
public static final String BINARY =
- "608060405234801561001057600080fd5b50604051610fa6380380610fa68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610f12806100946000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80639738968c116100665780639738968c146101b8578063a69df4b5146101d8578063b4926e25146101e2578063f83d08ba146102b0578063fd017797146102ba5761009e565b80630d8e6e2c146100a35780633659cfe6146100c15780635aa68ac0146101055780635c60da1b1461016457806378b9033714610198575b600080fd5b6100ab6102fe565b6040518082815260200191505060405180910390f35b610103600480360360208110156100d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103ab565b005b61010d61083e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610150578082015181840152602081019050610135565b505050509050019250505060405180910390f35b61016c610987565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a06109ab565b60405180821515815260200191505060405180910390f35b6101c0610a58565b60405180821515815260200191505060405180910390f35b6101e0610b07565b005b610298600480360360208110156101f857600080fd5b810190808035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184602083028401116401000000008311171561024957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610b90565b60405180821515815260200191505060405180910390f35b6102b8610c8d565b005b6102e6600480360360208110156102d057600080fd5b8101908080359060200190929190505050610d16565b60405180821515815260200191505060405180910390f35b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16630d8e6e2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b810190808051906020019092919050505091505090565b3073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b815260040160206040518083038186803b1580156103f157600080fd5b505afa158015610405573d6000803e3d6000fd5b505050506040513d602081101561041b57600080fd5b810190808051906020019092919050505061049e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f54686520636f6e7472616374206973206c6f636b65642e00000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610543576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526054815260200180610e5a6054913960600191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561058b57600080fd5b505af115801561059f573d6000803e3d6000fd5b505050506040513d60208110156105b557600080fd5b810190808051906020019092919050505061061b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610eae602f913960400191505060405180910390fd5b60603073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b815260040160006040518083038186803b15801561066357600080fd5b505afa158015610677573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156106a157600080fd5b81019080805160405193929190846401000000008211156106c157600080fd5b838201915060208201858111156106d757600080fd5b82518660208202830111640100000000821117156106f457600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561072b578082015181840152602081019050610710565b50505050905001604052505050905061074382610e16565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663b4926e25836040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b838110156107d85780820151818401526020810190506107bd565b5050505090500192505050602060405180830381600087803b1580156107fd57600080fd5b505af1158015610811573d6000803e3d6000fd5b505050506040513d602081101561082757600080fd5b810190808051906020019092919050505050505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b815260040160006040518083038186803b1580156108ac57600080fd5b505afa1580156108c0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156108ea57600080fd5b810190808051604051939291908464010000000082111561090a57600080fd5b8382019150602082018581111561092057600080fd5b825186602082028301116401000000008211171561093d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015610974578082015181840152602081019050610959565b5050505090500160405250505091505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1757600080fd5b505afa158015610a2b573d6000803e3d6000fd5b505050506040513d6020811015610a4157600080fd5b810190808051906020019092919050505091505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610ac657600080fd5b505af1158015610ada573d6000803e3d6000fd5b505050506040513d6020811015610af057600080fd5b810190808051906020019092919050505091505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a69df4b56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b7557600080fd5b505af1158015610b89573d6000803e3d6000fd5b5050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663b4926e25846040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019060200280838360005b83811015610c25578082015181840152602081019050610c0a565b5050505090500192505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b8101908080519060200190929190505050915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f83d08ba6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610cfb57600080fd5b505af1158015610d0f573d6000803e3d6000fd5b5050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff1663fd017797856040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015610d9157600080fd5b505af1158015610da5573d6000803e3d6000fd5b505050506040513d6020811015610dbb57600080fd5b810190808051906020019092919050505090508015610e0c577fef2df0cc0f44b5a36a7de9951ef49ba4d861649244ff89bcf7ffaa1ac7291e89846040518082815260200191505060405180910390a15b8092505050919050565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe54686520636f6e747261637420746f207570677261646520746f2068617320746f20626520646966666572656e742066726f6d207468652063757272656e74206d616e6167656d656e7420636f6e74726163742e4e6f7420616c6c6f77656420746f207570677261646520746865206d616e6167656d656e7420636f6e74726163742ea26469706673582212207d77b2288fb78b354ca3a252d7513de3d808fcaa42e73f475b95f412c24a314f64736f6c634300060c0033";
+ "60806040523480156200001157600080fd5b506040516200166d3803806200166d8339818101604052810190620000379190620000e8565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200011a565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000b08262000083565b9050919050565b620000c281620000a3565b8114620000ce57600080fd5b50565b600081519050620000e281620000b7565b92915050565b6000602082840312156200010157620001006200007e565b5b60006200011184828501620000d1565b91505092915050565b611543806200012a6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806378b903371161006657806378b9033714610149578063965a25ef146101675780639738968c14610197578063a69df4b5146101b5578063f83d08ba146101bf5761009e565b80630d8e6e2c146100a35780631f52a8ee146100c15780633659cfe6146100f15780635aa68ac01461010d5780635c60da1b1461012b575b600080fd5b6100ab6101c9565b6040516100b89190610a86565b60405180910390f35b6100db60048036038101906100d69190610b1a565b610264565b6040516100e89190610b82565b60405180910390f35b61010b60048036038101906101069190610bfb565b610357565b005b61011561066d565b6040516101229190610d83565b60405180910390f35b61013361070f565b6040516101409190610db4565b60405180910390f35b610151610733565b60405161015e9190610b82565b60405180910390f35b610181600480360381019061017c9190610e25565b6107ce565b60405161018e9190610b82565b60405180910390f35b61019f61087b565b6040516101ac9190610b82565b60405180910390f35b6101bd610918565b005b6101c76109a1565b005b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16630d8e6e2c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561023a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025e9190610e9e565b91505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16631f52a8ee86866040518363ffffffff1660e01b81526004016102c7929190610f18565b6020604051808303816000875af11580156102e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030a9190610f68565b9050801561034c577f52213552a930e6de0c0d7df74ece31dac1306b2c7e200ceded7a4442853189b58585604051610343929190610f18565b60405180910390a15b809250505092915050565b3073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c69190610f68565b610405576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103fc90610ff2565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610494576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048b906110aa565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156104e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105059190610f68565b610544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053b9061113c565b60405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b8152600401600060405180830381865afa158015610591573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105ba919061135e565b90506105c582610a2a565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663965a25ef836040518263ffffffff1660e01b81526004016106249190610d83565b6020604051808303816000875af1158015610643573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106679190610f68565b50505050565b606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635aa68ac06040518163ffffffff1660e01b8152600401600060405180830381865afa1580156106e0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610709919061135e565b91505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166378b903376040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c89190610f68565b91505090565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663965a25ef85856040518363ffffffff1660e01b815260040161082f9291906114e9565b6020604051808303816000875af115801561084e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108729190610f68565b91505092915050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16639738968c6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156108ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109129190610f68565b91505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a69df4b56040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561098657600080fd5b505af115801561099a573d6000803e3d6000fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f83d08ba6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a0f57600080fd5b505af1158015610a23573d6000803e3d6000fd5b5050505050565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000819050919050565b610a8081610a6d565b82525050565b6000602082019050610a9b6000830184610a77565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610ada57610ad9610ab5565b5b8235905067ffffffffffffffff811115610af757610af6610aba565b5b602083019150836001820283011115610b1357610b12610abf565b5b9250929050565b60008060208385031215610b3157610b30610aab565b5b600083013567ffffffffffffffff811115610b4f57610b4e610ab0565b5b610b5b85828601610ac4565b92509250509250929050565b60008115159050919050565b610b7c81610b67565b82525050565b6000602082019050610b976000830184610b73565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bc882610b9d565b9050919050565b610bd881610bbd565b8114610be357600080fd5b50565b600081359050610bf581610bcf565b92915050565b600060208284031215610c1157610c10610aab565b5b6000610c1f84828501610be6565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610c8e578082015181840152602081019050610c73565b83811115610c9d576000848401525b50505050565b6000601f19601f8301169050919050565b6000610cbf82610c54565b610cc98185610c5f565b9350610cd9818560208601610c70565b610ce281610ca3565b840191505092915050565b6000610cf98383610cb4565b905092915050565b6000602082019050919050565b6000610d1982610c28565b610d238185610c33565b935083602082028501610d3585610c44565b8060005b85811015610d715784840389528151610d528582610ced565b9450610d5d83610d01565b925060208a01995050600181019050610d39565b50829750879550505050505092915050565b60006020820190508181036000830152610d9d8184610d0e565b905092915050565b610dae81610bbd565b82525050565b6000602082019050610dc96000830184610da5565b92915050565b60008083601f840112610de557610de4610ab5565b5b8235905067ffffffffffffffff811115610e0257610e01610aba565b5b602083019150836020820283011115610e1e57610e1d610abf565b5b9250929050565b60008060208385031215610e3c57610e3b610aab565b5b600083013567ffffffffffffffff811115610e5a57610e59610ab0565b5b610e6685828601610dcf565b92509250509250929050565b610e7b81610a6d565b8114610e8657600080fd5b50565b600081519050610e9881610e72565b92915050565b600060208284031215610eb457610eb3610aab565b5b6000610ec284828501610e89565b91505092915050565b600082825260208201905092915050565b82818337600083830152505050565b6000610ef78385610ecb565b9350610f04838584610edc565b610f0d83610ca3565b840190509392505050565b60006020820190508181036000830152610f33818486610eeb565b90509392505050565b610f4581610b67565b8114610f5057600080fd5b50565b600081519050610f6281610f3c565b92915050565b600060208284031215610f7e57610f7d610aab565b5b6000610f8c84828501610f53565b91505092915050565b600082825260208201905092915050565b7f54686520636f6e7472616374206973206c6f636b65642e000000000000000000600082015250565b6000610fdc601783610f95565b9150610fe782610fa6565b602082019050919050565b6000602082019050818103600083015261100b81610fcf565b9050919050565b7f54686520636f6e747261637420746f207570677261646520746f20686173207460008201527f6f20626520646966666572656e742066726f6d207468652063757272656e742060208201527f6d616e6167656d656e7420636f6e74726163742e000000000000000000000000604082015250565b6000611094605483610f95565b915061109f82611012565b606082019050919050565b600060208201905081810360008301526110c381611087565b9050919050565b7f4e6f7420616c6c6f77656420746f207570677261646520746865206d616e616760008201527f656d656e7420636f6e74726163742e0000000000000000000000000000000000602082015250565b6000611126602f83610f95565b9150611131826110ca565b604082019050919050565b6000602082019050818103600083015261115581611119565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61119482610ca3565b810181811067ffffffffffffffff821117156111b3576111b261115c565b5b80604052505050565b60006111c6610aa1565b90506111d2828261118b565b919050565b600067ffffffffffffffff8211156111f2576111f161115c565b5b602082029050602081019050919050565b600080fd5b600067ffffffffffffffff8211156112235761122261115c565b5b61122c82610ca3565b9050602081019050919050565b600061124c61124784611208565b6111bc565b90508281526020810184848401111561126857611267611203565b5b611273848285610c70565b509392505050565b600082601f8301126112905761128f610ab5565b5b81516112a0848260208601611239565b91505092915050565b60006112bc6112b7846111d7565b6111bc565b905080838252602082019050602084028301858111156112df576112de610abf565b5b835b8181101561132657805167ffffffffffffffff81111561130457611303610ab5565b5b808601611311898261127b565b855260208501945050506020810190506112e1565b5050509392505050565b600082601f83011261134557611344610ab5565b5b81516113558482602086016112a9565b91505092915050565b60006020828403121561137457611373610aab565b5b600082015167ffffffffffffffff81111561139257611391610ab0565b5b61139e84828501611330565b91505092915050565b6000819050919050565b60006113bd8385610c5f565b93506113ca838584610edc565b6113d383610ca3565b840190509392505050565b60006113eb8484846113b1565b90509392505050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126114205761141f6113fe565b5b83810192508235915060208301925067ffffffffffffffff821115611448576114476113f4565b5b60018202360384131561145e5761145d6113f9565b5b509250929050565b6000602082019050919050565b600061147f8385610c33565b935083602084028501611491846113a7565b8060005b878110156114d75784840389526114ac8284611403565b6114b78682846113de565b95506114c284611466565b935060208b019a505050600181019050611495565b50829750879450505050509392505050565b60006020820190508181036000830152611504818486611473565b9050939250505056fea2646970667358221220d7eefee8f20c9de5911bbd7081429d08304b75cc59dda600e9adae257a50bdf664736f6c634300080c0033";
public static final String FUNC_ADDPARTICIPANTS = "addParticipants";
@@ -83,7 +84,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 +171,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 +200,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 +242,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..a667a04c35f 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[] calldata _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 calldata _participant) public override returns (bool) {
require(_canExecute);
require(tx.origin == _owner, "Origin not the owner.");
bool result = removeInternal(_participant);
@@ -64,17 +65,17 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa
return result;
}
- function getParticipants() public view override returns (bytes32[] memory) {
+ function getParticipants() public view override returns (bytes[] memory) {
return distributionList;
}
- function canUpgrade() external override returns (bool) {
+ function canUpgrade() external view override returns (bool) {
return tx.origin == _owner;
}
//internal functions
- function addAll(bytes32[] memory _publicEnclaveKeys) internal returns (bool) {
+ function addAll(bytes[] calldata _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 calldata _publicEnclaveKey) internal view returns (bool) {
return distributionIndexOf[_publicEnclaveKey] != 0;
}
- function addParticipant(bytes32 _publicEnclaveKey) internal returns (bool) {
+ function addParticipant(bytes calldata _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 calldata _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 storage lastPublicKey = distributionList[distributionList.length - 1];
distributionList[index - 1] = lastPublicKey;
distributionIndexOf[lastPublicKey] = index;
}
@@ -119,13 +120,13 @@ contract DefaultFlexiblePrivacyGroupManagementContract is FlexiblePrivacyGroupMa
return false;
}
- function updateVersion() internal returns (int) {
- _version = keccak256(abi.encodePacked(blockhash(block.number-1), block.coinbase, distributionList));
+ function updateVersion() internal {
+ _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..b059b618966 100644
--- a/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementProxy.sol
+++ b/privacy-contracts/src/main/solidity/FlexiblePrivacyGroupManagementProxy.sol
@@ -12,14 +12,15 @@
*
* 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 {
address public implementation;
- constructor(address _implementation) public {
+ constructor(address _implementation) {
implementation = _implementation;
}
@@ -27,23 +28,23 @@ contract FlexiblePrivacyGroupManagementProxy is FlexiblePrivacyGroupManagementIn
implementation = _newImp;
}
- function addParticipants(bytes32[] memory _publicEnclaveKeys) public override returns (bool) {
+ function addParticipants(bytes[] calldata _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 calldata _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 \
diff --git a/testutil/src/main/java/org/hyperledger/enclave/testutil/EnclaveKeyConfiguration.java b/testutil/src/main/java/org/hyperledger/enclave/testutil/EnclaveKeyConfiguration.java
index 929f2ac489e..846378995a6 100644
--- a/testutil/src/main/java/org/hyperledger/enclave/testutil/EnclaveKeyConfiguration.java
+++ b/testutil/src/main/java/org/hyperledger/enclave/testutil/EnclaveKeyConfiguration.java
@@ -33,10 +33,6 @@ public EnclaveKeyConfiguration(
this.enclaveEncryptorType = enclaveEncryptorType;
}
- public EnclaveKeyConfiguration(final String[] pubKeyPaths, final String[] privKeyPaths) {
- this(pubKeyPaths, privKeyPaths, EnclaveEncryptorType.NACL);
- }
-
public String[] getPubKeyPaths() {
return pubKeyPaths;
}