diff --git a/src/java/commiteth/eth/contracts/ERC20.java b/src/java/commiteth/eth/contracts/ERC20.java index 87c61f6..e561631 100644 --- a/src/java/commiteth/eth/contracts/ERC20.java +++ b/src/java/commiteth/eth/contracts/ERC20.java @@ -5,9 +5,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.concurrent.Future; import org.web3j.abi.EventEncoder; -import org.web3j.abi.EventValues; import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Event; @@ -17,6 +15,7 @@ import org.web3j.abi.datatypes.generated.Uint256; import org.web3j.crypto.Credentials; import org.web3j.protocol.Web3j; import org.web3j.protocol.core.DefaultBlockParameter; +import org.web3j.protocol.core.RemoteCall; import org.web3j.protocol.core.methods.request.EthFilter; import org.web3j.protocol.core.methods.response.Log; import org.web3j.protocol.core.methods.response.TransactionReceipt; @@ -26,20 +25,22 @@ import rx.Observable; import rx.functions.Func1; /** - * Auto generated code.
- * Do not modify!
- * Please use the web3j command line tools, or {@link org.web3j.codegen.SolidityFunctionWrapperGenerator} to update. + *

Auto generated code. + *

Do not modify! + *

Please use the web3j command line tools, + * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the + * codegen module to update. * - *

Generated with web3j version 2.3.0. + *

Generated with web3j version 3.3.1. */ -public final class ERC20 extends Contract { +public class ERC20 extends Contract { private static final String BINARY = ""; - private ERC20(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + protected ERC20(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); } - private ERC20(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + protected ERC20(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); } @@ -47,13 +48,14 @@ public final class ERC20 extends Contract { final Event event = new Event("Transfer", Arrays.>asList(new TypeReference

() {}, new TypeReference
() {}), Arrays.>asList(new TypeReference() {})); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { TransferEventResponse typedResponse = new TransferEventResponse(); - typedResponse.from = (Address) eventValues.getIndexedValues().get(0); - typedResponse.to = (Address) eventValues.getIndexedValues().get(1); - typedResponse.value = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse.from = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.to = (String) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -68,11 +70,12 @@ public final class ERC20 extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public TransferEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); TransferEventResponse typedResponse = new TransferEventResponse(); - typedResponse.from = (Address) eventValues.getIndexedValues().get(0); - typedResponse.to = (Address) eventValues.getIndexedValues().get(1); - typedResponse.value = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = log; + typedResponse.from = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.to = (String) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -82,13 +85,14 @@ public final class ERC20 extends Contract { final Event event = new Event("Approval", Arrays.>asList(new TypeReference
() {}, new TypeReference
() {}), Arrays.>asList(new TypeReference() {})); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { ApprovalEventResponse typedResponse = new ApprovalEventResponse(); - typedResponse.owner = (Address) eventValues.getIndexedValues().get(0); - typedResponse.spender = (Address) eventValues.getIndexedValues().get(1); - typedResponse.value = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.spender = (String) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -103,58 +107,73 @@ public final class ERC20 extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public ApprovalEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); ApprovalEventResponse typedResponse = new ApprovalEventResponse(); - typedResponse.owner = (Address) eventValues.getIndexedValues().get(0); - typedResponse.spender = (Address) eventValues.getIndexedValues().get(1); - typedResponse.value = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = log; + typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.spender = (String) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); return typedResponse; } }); } - public Future approve(Address spender, Uint256 value) { - Function function = new Function("approve", Arrays.asList(spender, value), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall approve(String spender, BigInteger value) { + final Function function = new Function( + "approve", + Arrays.asList(new org.web3j.abi.datatypes.Address(spender), + new org.web3j.abi.datatypes.generated.Uint256(value)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future totalSupply() { - Function function = new Function("totalSupply", + public RemoteCall totalSupply() { + final Function function = new Function("totalSupply", Arrays.asList(), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future transferFrom(Address from, Address to, Uint256 value) { - Function function = new Function("transferFrom", Arrays.asList(from, to, value), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall transferFrom(String from, String to, BigInteger value) { + final Function function = new Function( + "transferFrom", + Arrays.asList(new org.web3j.abi.datatypes.Address(from), + new org.web3j.abi.datatypes.Address(to), + new org.web3j.abi.datatypes.generated.Uint256(value)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future balanceOf(Address who) { - Function function = new Function("balanceOf", - Arrays.asList(who), + public RemoteCall balanceOf(String who) { + final Function function = new Function("balanceOf", + Arrays.asList(new org.web3j.abi.datatypes.Address(who)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future transfer(Address to, Uint256 value) { - Function function = new Function("transfer", Arrays.asList(to, value), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall transfer(String to, BigInteger value) { + final Function function = new Function( + "transfer", + Arrays.asList(new org.web3j.abi.datatypes.Address(to), + new org.web3j.abi.datatypes.generated.Uint256(value)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future allowance(Address owner, Address spender) { - Function function = new Function("allowance", - Arrays.asList(owner, spender), + public RemoteCall allowance(String owner, String spender) { + final Function function = new Function("allowance", + Arrays.asList(new org.web3j.abi.datatypes.Address(owner), + new org.web3j.abi.datatypes.Address(spender)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public static Future deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(ERC20.class, web3j, credentials, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(ERC20.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); } - public static Future deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(ERC20.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(ERC20.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); } public static ERC20 load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { @@ -166,18 +185,22 @@ public final class ERC20 extends Contract { } public static class TransferEventResponse { - public Address from; + public Log log; - public Address to; + public String from; - public Uint256 value; + public String to; + + public BigInteger value; } public static class ApprovalEventResponse { - public Address owner; + public Log log; - public Address spender; + public String owner; - public Uint256 value; + public String spender; + + public BigInteger value; } } diff --git a/src/java/commiteth/eth/contracts/MultiSigTokenWallet.java b/src/java/commiteth/eth/contracts/MultiSigTokenWallet.java index 21f9d79..3665e33 100644 --- a/src/java/commiteth/eth/contracts/MultiSigTokenWallet.java +++ b/src/java/commiteth/eth/contracts/MultiSigTokenWallet.java @@ -5,9 +5,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.concurrent.Future; +import java.util.concurrent.Callable; import org.web3j.abi.EventEncoder; -import org.web3j.abi.EventValues; import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Bool; @@ -20,29 +19,33 @@ import org.web3j.abi.datatypes.generated.Uint256; import org.web3j.crypto.Credentials; import org.web3j.protocol.Web3j; import org.web3j.protocol.core.DefaultBlockParameter; +import org.web3j.protocol.core.RemoteCall; import org.web3j.protocol.core.methods.request.EthFilter; import org.web3j.protocol.core.methods.response.Log; import org.web3j.protocol.core.methods.response.TransactionReceipt; +import org.web3j.tuples.generated.Tuple4; import org.web3j.tx.Contract; import org.web3j.tx.TransactionManager; import rx.Observable; import rx.functions.Func1; /** - * Auto generated code.
- * Do not modify!
- * Please use the web3j command line tools, or {@link org.web3j.codegen.SolidityFunctionWrapperGenerator} to update. + *

Auto generated code. + *

Do not modify! + *

Please use the web3j command line tools, + * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the + * codegen module to update. * - *

Generated with web3j version 2.3.0. + *

Generated with web3j version 3.3.1. */ -public final class MultiSigTokenWallet extends Contract { - private static final String BINARY = "6060604052341561000f57600080fd5b5b6127718061001f6000396000f300606060405236156101bc5763ffffffff60e060020a60003504166301e336678114610207578063025e7c2714610231578063173825d91461026357806320ea8d8614610284578063273cbaa01461029c5780632f54bf6e146103035780633411c81c14610336578063342b7e711461036c57806336756a23146103bd5780634f383934146104105780634f64b2be146104615780635143a9fe14610493578063523fba7f14610501578063547415251461053257806358e2cd76146105615780637065cb4814610582578063784547a7146105a35780638b51d13f146105cd5780638f4ffcb1146105f55780639ace38c214610663578063a0e67e2b14610722578063a878aee614610789578063a8abe69a146107aa578063affed0e014610821578063b5dc40c314610846578063b77bf600146108b0578063b97fd9e1146108d5578063ba51a6df146108f6578063c01a8c841461090e578063c0ee0b8a14610926578063c64274741461098d578063cd49952314610a04578063d74f8edd14610a42578063dc8452cd14610a67578063e20056e614610a8c578063e3004b5714610ab3578063ee22610b14610b14578063f750aaa614610b2c575b5b60003411156102045733600160a060020a03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405190815260200160405180910390a25b5b005b341561021257600080fd5b610204600160a060020a0360043581169060243516604435610b4d565b005b341561023c57600080fd5b610247600435610c5c565b604051600160a060020a03909116815260200160405180910390f35b341561026e57600080fd5b610204600160a060020a0360043516610c8e565b005b341561028f57600080fd5b610204600435610e43565b005b34156102a757600080fd5b6102af610f25565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b341561030e57600080fd5b610322600160a060020a0360043516610f8e565b604051901515815260200160405180910390f35b341561034157600080fd5b610322600435600160a060020a0360243516610fa3565b604051901515815260200160405180910390f35b341561037757600080fd5b6102046004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650610fc395505050505050565b005b34156103c857600080fd5b61020460046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505093359350610ffc92505050565b005b341561041b57600080fd5b610204600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061113a95505050505050565b005b341561046c57600080fd5b610247600435611168565b604051600160a060020a03909116815260200160405180910390f35b341561049e57600080fd5b61020460048035600160a060020a0390811691602480359260443516919060849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061119a95505050505050565b005b341561050c57600080fd5b610520600160a060020a0360043516611270565b60405190815260200160405180910390f35b341561053d57600080fd5b61052060043515156024351515611282565b60405190815260200160405180910390f35b341561056c57600080fd5b610204600160a060020a03600435166112f1565b005b341561058d57600080fd5b610204600160a060020a03600435166113e0565b005b34156105ae57600080fd5b61032260043561151a565b604051901515815260200160405180910390f35b34156105d857600080fd5b6105206004356115ae565b60405190815260200160405180910390f35b341561060057600080fd5b61020460048035600160a060020a0390811691602480359260443516919060849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061162d95505050505050565b005b341561066e57600080fd5b610679600435611640565b604051600160a060020a03851681526020810184905281151560608201526080604082018181528454600260001961010060018416150201909116049183018290529060a0830190859080156107105780601f106106e557610100808354040283529160200191610710565b820191906000526020600020905b8154815290600101906020018083116106f357829003601f168201915b50509550505050505060405180910390f35b341561072d57600080fd5b6102af611673565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b341561079457600080fd5b610204600160a060020a03600435166116dc565b005b34156107b557600080fd5b6102af60043560243560443515156064351515611911565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b341561082c57600080fd5b610520611a3f565b60405190815260200160405180910390f35b341561085157600080fd5b6102af600435611a45565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b34156108bb57600080fd5b610520611bc5565b60405190815260200160405180910390f35b34156108e057600080fd5b610204600160a060020a0360043516611bcb565b005b341561090157600080fd5b610204600435611ce1565b005b341561091957600080fd5b610204600435611d77565b005b341561093157600080fd5b61020460048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611e6895505050505050565b005b341561099857600080fd5b61052060048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611e7a95505050505050565b60405190815260200160405180910390f35b3415610a0f57600080fd5b610247600160a060020a0360043516602435611e9a565b604051600160a060020a03909116815260200160405180910390f35b3415610a4d57600080fd5b610520611edc565b60405190815260200160405180910390f35b3415610a7257600080fd5b610520611ee1565b60405190815260200160405180910390f35b3415610a9757600080fd5b610204600160a060020a0360043581169060243516611ee7565b005b3415610abe57600080fd5b61020460048035600160a060020a03169060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506120a895505050505050565b005b3415610b1f57600080fd5b610204600435612139565b005b3415610b3757600080fd5b610204600160a060020a036004351661229a565b005b60008083600160a060020a0381161515610b6657600080fd5b30600160a060020a031633600160a060020a0316141515610b8657600080fd5b60008411610b9357600080fd5b600160a060020a038616600090815260056020526040902054925082841115610bbb57600080fd5b600160a060020a038616600081815260056020526040808220878703905563a9059cbb918891889190516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610c2c57600080fd5b6102c65a03f11515610c3d57600080fd5b5050506040518051925050811515610c5157fe5b5b5b5b505050505050565b6000805482908110610c6a57fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b60008030600160a060020a031633600160a060020a0316141515610cb157600080fd5b600160a060020a038316600090815260066020526040902054839060ff161515610cda57600080fd5b600160a060020a0384166000908152600660205260408120805460ff19169055805460001901935091505b82821015610dd75783600160a060020a0316600083815481101515610d2657fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a03161415610dcb57600080546000198101908110610d6757fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600083815481101515610d9657fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a03160217905550610dd7565b5b600190910190610d05565b600080546000190190610dea9082612580565b506000546008541115610e0357600054610e0390611ce1565b5b83600160a060020a03167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a25b5b505b505050565b33600160a060020a03811660009081526006602052604090205460ff161515610e6b57600080fd5b600082815260036020908152604080832033600160a060020a038116855292529091205483919060ff161515610ea057600080fd5b600084815260026020526040902060030154849060ff1615610ec157600080fd5b6000858152600360209081526040808320600160a060020a033316808552925291829020805460ff1916905586917ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e9905160405180910390a35b5b505b50505b5050565b610f2d6125aa565b6001805480602002602001604051908101604052809291908181526020018280548015610f8357602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610f65575b505050505090505b90565b60066020526000908152604090205460ff1681565b600360209081526000928352604080842090915290825290205460ff1681565b30600160a060020a031633600160a060020a0316141515610fe357600080fd5b6001818051610f219291602001906125bc565b505b5b50565b6000825182603282111580156110125750818111155b801561101d57508015155b801561102857508115155b151561103357600080fd5b6000541580156110435750600854155b151561104e57600080fd5b600092505b8451831015611118576006600086858151811061106c57fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff161580156110bd57508483815181106110a757fe5b90602001906020020151600160a060020a031615155b15156110c857600080fd5b6001600660008786815181106110da57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff19169115159190911790555b600190920191611053565b600085805161112b9291602001906125bc565b5060088490555b5b5050505050565b600160a060020a0333166000908152600760205260409020818051610f219291602001906125bc565b505b50565b6001805482908110610c6a57fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b60008030600160a060020a031686600160a060020a031614156111bc57610c51565b600954915083600160a060020a03166323b872dd87308860006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561122b57600080fd5b6102c65a03f1151561123c57600080fd5b505050604051805191505080151561125057fe5b816009541415610c5157610c518686868661231d565b5b5b505050505050565b60056020526000908152604090205481565b6000805b6004548110156112e9578380156112af575060008181526002602052604090206003015460ff16155b806112d357508280156112d3575060008181526002602052604090206003015460ff165b5b156112e0576001820191505b5b600101611286565b5b5092915050565b33600160a060020a0381166000908152600660205260408120549091829160ff16151561131d57600080fd5b600160a060020a0384166000818152600560205260408082205495506370a08231913091516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561138457600080fd5b6102c65a03f1151561139557600080fd5b505050604051805192505082821115610e3b57610e3b60008484038660006040518059106113c05750595b908082528060200260200182016040525b5061231d565b5b5b5b50505050565b30600160a060020a031633600160a060020a031614151561140057600080fd5b600160a060020a038116600090815260066020526040902054819060ff161561142857600080fd5b81600160a060020a038116151561143e57600080fd5b6000805490506001016008546032821115801561145b5750818111155b801561146657508015155b801561147157508115155b151561147c57600080fd5b600160a060020a0385166000908152600660205260408120805460ff1916600190811790915581549081016114b18382612580565b916000526020600020900160005b8154600160a060020a03808a166101009390930a8381029102199091161790915590507ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b50505b505b505b50565b600080805b6000548110156115a6576000848152600360205260408120815490919081908490811061154857fe5b906000526020600020900160005b9054600160a060020a036101009290920a900416815260208101919091526040016000205460ff161561158a576001820191505b60085482141561159d57600192506115a6565b5b60010161151f565b5b5050919050565b6000805b60005481101561162657600083815260036020526040812081549091908190849081106115db57fe5b906000526020600020900160005b9054600160a060020a036101009290920a900416815260208101919091526040016000205460ff161561161d576001820191505b5b6001016115b2565b5b50919050565b610e3b8484848461119a565b5b50505050565b6002602081905260009182526040909120805460018201546003830154600160a060020a03909216939092019060ff1684565b61167b6125aa565b6000805480602002602001604051908101604052809291908181526020018280548015610f8357602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610f65575b505050505090505b90565b6116e46125aa565b600080808085600160a060020a03811615156116ff57600080fd5b30600160a060020a031633600160a060020a031614151561171f57600080fd5b600160a060020a03871660009081526007602052604081205411156117c3576007600088600160a060020a0316600160a060020a031681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156117b757602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611799575b50505050509550611821565b600180548060200260200160405190810160405280929190818152602001828054801561181957602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116117fb575b505050505095505b85519450600093505b848410156119055785848151811061183e57fe5b90602001906020020151600160a060020a0381166000908152600560205260408120549194509092508211156118f957600160a060020a03831660008181526005602052604080822082905563a9059cbb918a91869190516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156118dd57600080fd5b6102c65a03f115156118ee57600080fd5b505050604051805150505b5b60019093019261182a565b5b5b5b50505050505050565b6119196125aa565b6119216125aa565b6000806004546040518059106119345750595b908082528060200260200182016040525b50925060009150600090505b6004548110156119cc5785801561197a575060008181526002602052604090206003015460ff16155b8061199e575084801561199e575060008181526002602052604090206003015460ff165b5b156119c357808383815181106119b157fe5b60209081029091010152600191909101905b5b600101611951565b8787036040518059106119dc5750595b908082528060200260200182016040525b5093508790505b86811015611a3357828181518110611a0857fe5b906020019060200201518489830381518110611a2057fe5b602090810290910101525b6001016119f4565b5b505050949350505050565b60095481565b611a4d6125aa565b611a556125aa565b600080548190604051805910611a685750595b908082528060200260200182016040525b50925060009150600090505b600054811015611b4b5760008581526003602052604081208154909190819084908110611aae57fe5b906000526020600020900160005b9054600160a060020a036101009290920a900416815260208101919091526040016000205460ff1615611b42576000805482908110611af757fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316838381518110611b2357fe5b600160a060020a03909216602092830290910190910152600191909101905b5b600101611a85565b81604051805910611b595750595b908082528060200260200182016040525b509350600090505b81811015611bbc57828181518110611b8657fe5b90602001906020020151848281518110611b9c57fe5b600160a060020a039092166020928302909101909101525b600101611b72565b5b505050919050565b60045481565b611bd36125aa565b60008083600160a060020a0381161515611bec57600080fd5b600160a060020a038516600090815260066020526040902054859060ff1615611c1457600080fd5b30600160a060020a031633600160a060020a0316141515611c3457600080fd5b6000805480602002602001604051908101604052809291908181526020018280548015611c8a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611c6c575b5050505050945084519350611c9e866113e0565b600092505b83831015610c5157611cc9858481518110611cba57fe5b90602001906020020151610c8e565b5b600190920191611ca3565b5b5b5b505b5050505050565b30600160a060020a031633600160a060020a0316141515611d0157600080fd5b6000548160328211801590611d165750818111155b8015611d2157508015155b8015611d2c57508115155b1515611d3757600080fd5b60088390557fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a8360405190815260200160405180910390a15b5b50505b50565b33600160a060020a03811660009081526006602052604090205460ff161515611d9f57600080fd5b6000828152600260205260409020548290600160a060020a03161515611dc457600080fd5b600083815260036020908152604080832033600160a060020a038116855292529091205484919060ff1615611df857600080fd5b6000858152600360209081526040808320600160a060020a033316808552925291829020805460ff1916600117905586917f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef905160405180910390a3610f1b85612139565b5b5b50505b505b5050565b610e3e8383338461231d565b5b505050565b6000611e87848484612480565b9050611e9281611d77565b5b9392505050565b600760205281600052604060002081815481101515611eb557fe5b906000526020600020900160005b915091509054906101000a9004600160a060020a031681565b603281565b60085481565b600030600160a060020a031633600160a060020a0316141515611f0957600080fd5b600160a060020a038316600090815260066020526040902054839060ff161515611f3257600080fd5b600160a060020a038316600090815260066020526040902054839060ff1615611f5a57600080fd5b600092505b6000548310156120025784600160a060020a0316600084815481101515611f8257fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a03161415611ff65783600084815481101515611fc157fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a03160217905550612002565b5b600190920191611f5f565b600160a060020a03808616600081815260066020526040808220805460ff199081169091559388168252908190208054909316600117909255907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b90905160405180910390a283600160a060020a03167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b505b505b505050565b336000600160a060020a03841663dd62ed3e8330846040516020015260405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561210957600080fd5b6102c65a03f1151561211a57600080fd5b505050604051805190509050610e3b8282868661119a565b5b50505050565b600081815260026020526040812060030154829060ff161561215a57600080fd5b6121638361151a565b15610e3e5760008381526002602081905260409182902060038101805460ff19166001908117909155815490820154919550600160a060020a03169290918501905180828054600181600116156101000203166002900480156122075780601f106121dc57610100808354040283529160200191612207565b820191906000526020600020905b8154815290600101906020018083116121ea57829003601f168201915b505091505060006040518083038185876187965a03f1925050501561225857827f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405160405180910390a2610e3e565b827f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405160405180910390a260038201805460ff191690555b5b5b5b505050565b80600160a060020a03811615156122b057600080fd5b30600160a060020a031633600160a060020a03161415156122d057600080fd5b6122d9826116dc565b81600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f193505050501515610f2157600080fd5b5b5b5b5050565b83600160a060020a03167f98c09d9949722bae4bd0d988d4050091c3ae7ec6d51d3c6bbfe4233593944e9e8385604051600160a060020a03909216825260208201526040908101905180910390a2600980546001019055600160a060020a038216600090815260056020526040902054151561245a57600180548082016123a48382612580565b916000526020600020900160005b8154600160a060020a038087166101009390930a8381029102199091161790915590506370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561242257600080fd5b6102c65a03f1151561243357600080fd5b5050506040518051600160a060020a03841660009081526005602052604090205550610e3b565b600160a060020a03821660009081526005602052604090208054840190555b5b50505050565b600083600160a060020a038116151561249857600080fd5b600454915060806040519081016040908152600160a060020a038716825260208083018790528183018690526000606084018190528581526002909152208151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151816001015560408201518160020190805161252492916020019061266d565b506060820151600391909101805460ff191691151591909117905550600480546001019055817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405160405180910390a25b5b509392505050565b815481835581811511610e3e57600083815260209020610e3e9181019083016126ec565b5b505050565b60206040519081016040526000815290565b828054828255906000526020600020908101928215612620579160200282015b82811115612620578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0391909116178255602092909201916001909101906125dc565b5b5061262d92915061270d565b5090565b815481835581811511610e3e57600083815260209020610e3e9181019083016126ec565b5b505050565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106126ae57805160ff19168380011785556126db565b828001600101855582156126db579182015b828111156126db5782518255916020019190600101906126c0565b5b5061262d9291506126ec565b5090565b610f8b91905b8082111561262d57600081556001016126f2565b5090565b90565b610f8b91905b8082111561262d57805473ffffffffffffffffffffffffffffffffffffffff19168155600101612713565b5090565b905600a165627a7a723058200786c077331fb9b692c0f2a7255efbc0c5d18913e1e95b4e28e8fb5cc1d324930029"; +public class MultiSigTokenWallet extends Contract { + private static final String BINARY = "6060604052341561000f57600080fd5b6124068061001e6000396000f3006060604052600436106101be5763ffffffff60e060020a60003504166301e336678114610207578063025e7c271461022f578063173825d91461026157806320ea8d8614610280578063273cbaa0146102965780632f54bf6e146102fc5780633411c81c1461032f578063342b7e711461035157806336756a23146103a05780634f383934146103f15780634f64b2be146104405780635143a9fe14610456578063523fba7f146104c257806354741525146104f357806358e2cd76146105105780637065cb481461052f578063784547a71461054e5780638b51d13f146105645780638f4ffcb11461057a5780639ace38c2146105e6578063a0e67e2b14610694578063a878aee6146106a7578063a8abe69a146106c6578063affed0e0146106e9578063b5dc40c3146106fc578063b77bf60014610712578063b97fd9e114610725578063ba51a6df14610744578063c01a8c841461075a578063c0ee0b8a14610770578063c6427474146107d5578063cd4995231461083a578063d74f8edd1461085c578063dc8452cd1461086f578063e20056e614610882578063e3004b57146108a7578063ee22610b14610906578063f750aaa61461091c575b60003411156102055733600160a060020a03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405190815260200160405180910390a25b005b341561021257600080fd5b610205600160a060020a036004358116906024351660443561093b565b341561023a57600080fd5b610245600435610a3c565b604051600160a060020a03909116815260200160405180910390f35b341561026c57600080fd5b610205600160a060020a0360043516610a64565b341561028b57600080fd5b610205600435610bee565b34156102a157600080fd5b6102a9610ccc565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102e85780820151838201526020016102d0565b505050509050019250505060405180910390f35b341561030757600080fd5b61031b600160a060020a0360043516610d35565b604051901515815260200160405180910390f35b341561033a57600080fd5b61031b600435600160a060020a0360243516610d4a565b341561035c57600080fd5b6102056004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650610d6a95505050505050565b34156103ab57600080fd5b61020560046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505093359350610da192505050565b34156103fc57600080fd5b6102056004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650610edd95505050505050565b341561044b57600080fd5b610245600435610f06565b341561046157600080fd5b61020560048035600160a060020a0390811691602480359260443516919060849060643590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610f1495505050505050565b34156104cd57600080fd5b6104e1600160a060020a0360043516610fd3565b60405190815260200160405180910390f35b34156104fe57600080fd5b6104e160043515156024351515610fe5565b341561051b57600080fd5b610205600160a060020a0360043516611051565b341561053a57600080fd5b610205600160a060020a0360043516611136565b341561055957600080fd5b61031b600435611262565b341561056f57600080fd5b6104e16004356112e6565b341561058557600080fd5b61020560048035600160a060020a0390811691602480359260443516919060849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061135595505050505050565b34156105f157600080fd5b6105fc600435611361565b604051600160a060020a038516815260208101849052811515606082015260806040820181815290820184818151815260200191508051906020019080838360005b8381101561065657808201518382015260200161063e565b50505050905090810190601f1680156106835780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b341561069f57600080fd5b6102a961143f565b34156106b257600080fd5b610205600160a060020a03600435166114a5565b34156106d157600080fd5b6102a9600435602435604435151560643515156116cb565b34156106f457600080fd5b6104e16117f3565b341561070757600080fd5b6102a96004356117f9565b341561071d57600080fd5b6104e161195b565b341561073057600080fd5b610205600160a060020a0360043516611961565b341561074f57600080fd5b610205600435611a6a565b341561076557600080fd5b610205600435611afd565b341561077b57600080fd5b61020560048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611bea95505050505050565b34156107e057600080fd5b6104e160048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611bfb95505050505050565b341561084557600080fd5b610245600160a060020a0360043516602435611c1a565b341561086757600080fd5b6104e1611c51565b341561087a57600080fd5b6104e1611c56565b341561088d57600080fd5b610205600160a060020a0360043581169060243516611c5c565b34156108b257600080fd5b61020560048035600160a060020a03169060446024803590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611dfd95505050505050565b341561091157600080fd5b610205600435611e7b565b341561092757600080fd5b610205600160a060020a0360043516611fd2565b60008083600160a060020a038116151561095457600080fd5b30600160a060020a031633600160a060020a031614151561097457600080fd5b6000841161098157600080fd5b600160a060020a0386166000908152600560205260409020549250828411156109a957600080fd5b600160a060020a03861660008181526005602052604090819020868603905563a9059cbb90879087905160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610a1357600080fd5b5af11515610a2057600080fd5b5050506040518051925050811515610a3457fe5b505050505050565b6000805482908110610a4a57fe5b600091825260209091200154600160a060020a0316905081565b60008030600160a060020a031633600160a060020a0316141515610a8757600080fd5b600160a060020a038316600090815260066020526040902054839060ff161515610ab057600080fd5b600160a060020a0384166000908152600660205260408120805460ff19169055805460001901935091505b82821015610b865783600160a060020a0316600083815481101515610afc57fe5b600091825260209091200154600160a060020a03161415610b7b57600080546000198101908110610b2957fe5b60009182526020822001548154600160a060020a03909116919084908110610b4d57fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055610b86565b600190910190610adb565b600080546000190190610b999082612289565b506000546008541115610bb257600054610bb290611a6a565b83600160a060020a03167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a250505050565b33600160a060020a03811660009081526006602052604090205460ff161515610c1657600080fd5b600082815260036020908152604080832033600160a060020a038116855292529091205483919060ff161515610c4b57600080fd5b600084815260026020526040902060030154849060ff1615610c6c57600080fd5b6000858152600360209081526040808320600160a060020a033316808552925291829020805460ff1916905586917ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e9905160405180910390a35050505050565b610cd46122ad565b6001805480602002602001604051908101604052809291908181526020018280548015610d2a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610d0c575b505050505090505b90565b60066020526000908152604090205460ff1681565b600360209081526000928352604080842090915290825290205460ff1681565b30600160a060020a031633600160a060020a0316141515610d8a57600080fd5b6001818051610d9d9291602001906122bf565b5050565b600082518260328211158015610db75750818111155b8015610dc257508015155b8015610dcd57508115155b1515610dd857600080fd5b600054158015610de85750600854155b1515610df357600080fd5b600092505b8451831015610ebd5760066000868581518110610e1157fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff16158015610e625750848381518110610e4c57fe5b90602001906020020151600160a060020a031615155b1515610e6d57600080fd5b600160066000878681518110610e7f57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff191691151591909117905560019290920191610df8565b6000858051610ed09291602001906122bf565b5050506008919091555050565b600160a060020a0333166000908152600760205260409020818051610d9d9291602001906122bf565b6001805482908110610a4a57fe5b60008030600160a060020a031686600160a060020a03161415610f3657610a34565b600954915083600160a060020a03166323b872dd87308860405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610f9c57600080fd5b5af11515610fa957600080fd5b5050506040518051915050801515610fbd57fe5b816009541415610a3457610a348686868661204e565b60056020526000908152604090205481565b6000805b60045481101561104a57838015611012575060008181526002602052604090206003015460ff16155b806110365750828015611036575060008181526002602052604090206003015460ff165b15611042576001820191505b600101610fe9565b5092915050565b33600160a060020a0381166000908152600660205260408120549091829160ff16151561107d57600080fd5b600160a060020a038416600081815260056020526040908190205494506370a082319030905160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156110de57600080fd5b5af115156110eb57600080fd5b5050506040518051925050828211156111305761113060008484038660006040518059106111165750595b818152601f19601f8301168101602001604052905061204e565b50505050565b30600160a060020a031633600160a060020a031614151561115657600080fd5b600160a060020a038116600090815260066020526040902054819060ff161561117e57600080fd5b81600160a060020a038116151561119457600080fd5b600080549050600101600854603282111580156111b15750818111155b80156111bc57508015155b80156111c757508115155b15156111d257600080fd5b600160a060020a0385166000908152600660205260408120805460ff1916600190811790915581549081016112078382612289565b5060009182526020909120018054600160a060020a031916600160a060020a0387169081179091557ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25050505050565b600080805b6000548110156112df576000848152600360205260408120815490919081908490811061129057fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff16156112c4576001820191505b6008548214156112d757600192506112df565b600101611267565b5050919050565b6000805b60005481101561134f576000838152600360205260408120815490919081908490811061131357fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615611347576001820191505b6001016112ea565b50919050565b61113084848484610f14565b60026020528060005260406000206000915090508060000160009054906101000a9004600160a060020a031690806001015490806002018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561142c5780601f106114015761010080835404028352916020019161142c565b820191906000526020600020905b81548152906001019060200180831161140f57829003601f168201915b5050506003909301549192505060ff1684565b6114476122ad565b6000805480602002602001604051908101604052809291908181526020018280548015610d2a57602002820191906000526020600020908154600160a060020a03168152600190910190602001808311610d0c575050505050905090565b6114ad6122ad565b600080808085600160a060020a03811615156114c857600080fd5b30600160a060020a031633600160a060020a03161415156114e857600080fd5b600160a060020a038716600090815260076020526040812054111561158c576007600088600160a060020a0316600160a060020a0316815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561158057602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611562575b505050505095506115ea565b60018054806020026020016040519081016040528092919081815260200182805480156115e257602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116115c4575b505050505095505b85519450600093505b848410156116c25785848151811061160757fe5b90602001906020020151600160a060020a0381166000908152600560205260408120549194509092508211156116b757600160a060020a0383166000818152600560205260408082209190915563a9059cbb90899085905160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561169f57600080fd5b5af115156116ac57600080fd5b505050604051805150505b6001909301926115f3565b50505050505050565b6116d36122ad565b6116db6122ad565b6000806004546040518059106116ee5750595b9080825280602002602001820160405250925060009150600090505b60045481101561178357858015611733575060008181526002602052604090206003015460ff16155b806117575750848015611757575060008181526002602052604090206003015460ff165b1561177b578083838151811061176957fe5b60209081029091010152600191909101905b60010161170a565b8787036040518059106117935750595b908082528060200260200182016040525093508790505b868110156117e8578281815181106117be57fe5b9060200190602002015184898303815181106117d657fe5b602090810290910101526001016117aa565b505050949350505050565b60095481565b6118016122ad565b6118096122ad565b60008054819060405180591061181c5750595b9080825280602002602001820160405250925060009150600090505b6000548110156118e4576000858152600360205260408120815490919081908490811061186157fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff16156118dc57600080548290811061189c57fe5b600091825260209091200154600160a060020a03168383815181106118bd57fe5b600160a060020a03909216602092830290910190910152600191909101905b600101611838565b816040518059106118f25750595b90808252806020026020018201604052509350600090505b818110156119535782818151811061191e57fe5b9060200190602002015184828151811061193457fe5b600160a060020a0390921660209283029091019091015260010161190a565b505050919050565b60045481565b6119696122ad565b60008083600160a060020a038116151561198257600080fd5b600160a060020a038516600090815260066020526040902054859060ff16156119aa57600080fd5b30600160a060020a031633600160a060020a03161415156119ca57600080fd5b6000805480602002602001604051908101604052809291908181526020018280548015611a2057602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611a02575b5050505050945084519350611a3486611136565b600092505b83831015610a3457611a5f858481518110611a5057fe5b90602001906020020151610a64565b600190920191611a39565b30600160a060020a031633600160a060020a0316141515611a8a57600080fd5b6000548160328211801590611a9f5750818111155b8015611aaa57508015155b8015611ab557508115155b1515611ac057600080fd5b60088390557fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a8360405190815260200160405180910390a1505050565b33600160a060020a03811660009081526006602052604090205460ff161515611b2557600080fd5b6000828152600260205260409020548290600160a060020a03161515611b4a57600080fd5b600083815260036020908152604080832033600160a060020a038116855292529091205484919060ff1615611b7e57600080fd5b6000858152600360209081526040808320600160a060020a033316808552925291829020805460ff1916600117905586917f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef905160405180910390a3611be385611e7b565b5050505050565b611bf68383338461204e565b505050565b6000611c08848484612198565b9050611c1381611afd565b9392505050565b600760205281600052604060002081815481101515611c3557fe5b600091825260209091200154600160a060020a03169150829050565b603281565b60085481565b600030600160a060020a031633600160a060020a0316141515611c7e57600080fd5b600160a060020a038316600090815260066020526040902054839060ff161515611ca757600080fd5b600160a060020a038316600090815260066020526040902054839060ff1615611ccf57600080fd5b600092505b600054831015611d5b5784600160a060020a0316600084815481101515611cf757fe5b600091825260209091200154600160a060020a03161415611d505783600084815481101515611d2257fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055611d5b565b600190920191611cd4565b600160a060020a03808616600081815260066020526040808220805460ff199081169091559388168252908190208054909316600117909255907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b90905160405180910390a283600160a060020a03167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25050505050565b336000600160a060020a03841663dd62ed3e833060405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515611e5657600080fd5b5af11515611e6357600080fd5b50505060405180519050905061113082828686610f14565b600081815260026020526040812060030154829060ff1615611e9c57600080fd5b611ea583611262565b15611bf65760008381526002602081905260409182902060038101805460ff19166001908117909155815490820154919550600160a060020a0316929091850190518082805460018160011615610100020316600290048015611f495780601f10611f1e57610100808354040283529160200191611f49565b820191906000526020600020905b815481529060010190602001808311611f2c57829003601f168201915b505091505060006040518083038185875af19250505015611f9657827f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405160405180910390a2611bf6565b827f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405160405180910390a250600301805460ff1916905550565b80600160a060020a0381161515611fe857600080fd5b30600160a060020a031633600160a060020a031614151561200857600080fd5b612011826114a5565b81600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f193505050501515610d9d57600080fd5b83600160a060020a03167f98c09d9949722bae4bd0d988d4050091c3ae7ec6d51d3c6bbfe4233593944e9e8385604051600160a060020a03909216825260208201526040908101905180910390a2600980546001019055600160a060020a038216600090815260056020526040902054151561217557600180548082016120d58382612289565b5060009182526020909120018054600160a060020a031916600160a060020a0384169081179091556370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561214157600080fd5b5af1151561214e57600080fd5b5050506040518051600160a060020a03841660009081526005602052604090205550611130565b50600160a060020a03166000908152600560205260409020805491909101905550565b600083600160a060020a03811615156121b057600080fd5b600454915060806040519081016040908152600160a060020a0387168252602080830187905281830186905260006060840181905285815260029091522081518154600160a060020a031916600160a060020a03919091161781556020820151816001015560408201518160020190805161222f929160200190612326565b506060820151600391909101805460ff191691151591909117905550600480546001019055817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405160405180910390a2509392505050565b815481835581811511611bf657600083815260209020611bf691810190830161239c565b60206040519081016040526000815290565b828054828255906000526020600020908101928215612316579160200282015b828111156123165782518254600160a060020a031916600160a060020a0391909116178255602092909201916001909101906122df565b506123229291506123b6565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061236757805160ff1916838001178555612394565b82800160010185558215612394579182015b82811115612394578251825591602001919060010190612379565b506123229291505b610d3291905b8082111561232257600081556001016123a2565b610d3291905b80821115612322578054600160a060020a03191681556001016123bc5600a165627a7a72305820093e4169138e9fc8ced5bccbc93372da29d53223deb52ea1f0271f9134e4f56a0029"; - private MultiSigTokenWallet(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + protected MultiSigTokenWallet(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); } - private MultiSigTokenWallet(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + protected MultiSigTokenWallet(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); } @@ -50,12 +53,13 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("Confirmation", Arrays.>asList(new TypeReference

() {}, new TypeReference() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { ConfirmationEventResponse typedResponse = new ConfirmationEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(1); + typedResponse.log = eventValues.getLog(); + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); responses.add(typedResponse); } return responses; @@ -70,10 +74,11 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public ConfirmationEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); ConfirmationEventResponse typedResponse = new ConfirmationEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(1); + typedResponse.log = log; + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); return typedResponse; } }); @@ -83,12 +88,13 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("Revocation", Arrays.>asList(new TypeReference
() {}, new TypeReference() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { RevocationEventResponse typedResponse = new RevocationEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(1); + typedResponse.log = eventValues.getLog(); + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); responses.add(typedResponse); } return responses; @@ -103,10 +109,11 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public RevocationEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); RevocationEventResponse typedResponse = new RevocationEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(1); + typedResponse.log = log; + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); return typedResponse; } }); @@ -116,11 +123,12 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("Submission", Arrays.>asList(new TypeReference() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { SubmissionEventResponse typedResponse = new SubmissionEventResponse(); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -135,9 +143,10 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public SubmissionEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); SubmissionEventResponse typedResponse = new SubmissionEventResponse(); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(0); + typedResponse.log = log; + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -147,11 +156,12 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("Execution", Arrays.>asList(new TypeReference() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { ExecutionEventResponse typedResponse = new ExecutionEventResponse(); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -166,9 +176,10 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public ExecutionEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); ExecutionEventResponse typedResponse = new ExecutionEventResponse(); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(0); + typedResponse.log = log; + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -178,11 +189,12 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("ExecutionFailure", Arrays.>asList(new TypeReference() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { ExecutionFailureEventResponse typedResponse = new ExecutionFailureEventResponse(); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -197,9 +209,10 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public ExecutionFailureEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); ExecutionFailureEventResponse typedResponse = new ExecutionFailureEventResponse(); - typedResponse._transactionId = (Uint256) eventValues.getIndexedValues().get(0); + typedResponse.log = log; + typedResponse._transactionId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -209,12 +222,13 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("Deposit", Arrays.>asList(new TypeReference
() {}), Arrays.>asList(new TypeReference() {})); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { DepositEventResponse typedResponse = new DepositEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._value = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -229,10 +243,11 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public DepositEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); DepositEventResponse typedResponse = new DepositEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._value = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = log; + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -242,13 +257,14 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("TokenDeposit", Arrays.>asList(new TypeReference
() {}), Arrays.>asList(new TypeReference
() {}, new TypeReference() {})); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { TokenDepositEventResponse typedResponse = new TokenDepositEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._token = (Address) eventValues.getNonIndexedValues().get(0); - typedResponse._value = (Uint256) eventValues.getNonIndexedValues().get(1); + typedResponse.log = eventValues.getLog(); + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._token = (String) eventValues.getNonIndexedValues().get(0).getValue(); + typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue(); responses.add(typedResponse); } return responses; @@ -263,11 +279,12 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public TokenDepositEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); TokenDepositEventResponse typedResponse = new TokenDepositEventResponse(); - typedResponse._sender = (Address) eventValues.getIndexedValues().get(0); - typedResponse._token = (Address) eventValues.getNonIndexedValues().get(0); - typedResponse._value = (Uint256) eventValues.getNonIndexedValues().get(1); + typedResponse.log = log; + typedResponse._sender = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse._token = (String) eventValues.getNonIndexedValues().get(0).getValue(); + typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue(); return typedResponse; } }); @@ -277,11 +294,12 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("OwnerAddition", Arrays.>asList(new TypeReference
() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { OwnerAdditionEventResponse typedResponse = new OwnerAdditionEventResponse(); - typedResponse._owner = (Address) eventValues.getIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -296,9 +314,10 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public OwnerAdditionEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); OwnerAdditionEventResponse typedResponse = new OwnerAdditionEventResponse(); - typedResponse._owner = (Address) eventValues.getIndexedValues().get(0); + typedResponse.log = log; + typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -308,11 +327,12 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("OwnerRemoval", Arrays.>asList(new TypeReference
() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { OwnerRemovalEventResponse typedResponse = new OwnerRemovalEventResponse(); - typedResponse._owner = (Address) eventValues.getIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -327,9 +347,10 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public OwnerRemovalEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); OwnerRemovalEventResponse typedResponse = new OwnerRemovalEventResponse(); - typedResponse._owner = (Address) eventValues.getIndexedValues().get(0); + typedResponse.log = log; + typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -339,11 +360,12 @@ public final class MultiSigTokenWallet extends Contract { final Event event = new Event("RequirementChange", Arrays.>asList(), Arrays.>asList(new TypeReference() {})); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { RequirementChangeEventResponse typedResponse = new RequirementChangeEventResponse(); - typedResponse._required = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse._required = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -358,246 +380,374 @@ public final class MultiSigTokenWallet extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public RequirementChangeEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); RequirementChangeEventResponse typedResponse = new RequirementChangeEventResponse(); - typedResponse._required = (Uint256) eventValues.getNonIndexedValues().get(0); + typedResponse.log = log; + typedResponse._required = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); return typedResponse; } }); } - public Future withdrawToken(Address _tokenAddr, Address _dest, Uint256 _amount) { - Function function = new Function("withdrawToken", Arrays.asList(_tokenAddr, _dest, _amount), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall withdrawToken(String _tokenAddr, String _dest, BigInteger _amount) { + final Function function = new Function( + "withdrawToken", + Arrays.asList(new org.web3j.abi.datatypes.Address(_tokenAddr), + new org.web3j.abi.datatypes.Address(_dest), + new org.web3j.abi.datatypes.generated.Uint256(_amount)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future
owners(Uint256 param0) { - Function function = new Function("owners", - Arrays.asList(param0), + public RemoteCall owners(BigInteger param0) { + final Function function = new Function("owners", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(param0)), Arrays.>asList(new TypeReference
() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, String.class); } - public Future removeOwner(Address owner) { - Function function = new Function("removeOwner", Arrays.asList(owner), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall removeOwner(String owner) { + final Function function = new Function( + "removeOwner", + Arrays.asList(new org.web3j.abi.datatypes.Address(owner)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future revokeConfirmation(Uint256 transactionId) { - Function function = new Function("revokeConfirmation", Arrays.asList(transactionId), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall revokeConfirmation(BigInteger transactionId) { + final Function function = new Function( + "revokeConfirmation", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(transactionId)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future> getTokenList() { - Function function = new Function("getTokenList", + public RemoteCall getTokenList() { + final Function function = new Function("getTokenList", Arrays.asList(), Arrays.>asList(new TypeReference>() {})); - return executeCallSingleValueReturnAsync(function); + return new RemoteCall( + new Callable() { + @Override + @SuppressWarnings("unchecked") + public List call() throws Exception { + List result = (List) executeCallSingleValueReturn(function, List.class); + return convertToNative(result); + } + }); } - public Future isOwner(Address param0) { - Function function = new Function("isOwner", - Arrays.asList(param0), + public RemoteCall isOwner(String param0) { + final Function function = new Function("isOwner", + Arrays.asList(new org.web3j.abi.datatypes.Address(param0)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, Boolean.class); } - public Future confirmations(Uint256 param0, Address param1) { - Function function = new Function("confirmations", - Arrays.asList(param0, param1), + public RemoteCall confirmations(BigInteger param0, String param1) { + final Function function = new Function("confirmations", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(param0), + new org.web3j.abi.datatypes.Address(param1)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, Boolean.class); } - public Future setTokenList(DynamicArray
_tokenList) { - Function function = new Function("setTokenList", Arrays.asList(_tokenList), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall setTokenList(List _tokenList) { + final Function function = new Function( + "setTokenList", + Arrays.asList(new org.web3j.abi.datatypes.DynamicArray( + org.web3j.abi.Utils.typeMap(_tokenList, org.web3j.abi.datatypes.Address.class))), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future constructor(DynamicArray
_owners, Uint256 _required) { - Function function = new Function("constructor", Arrays.asList(_owners, _required), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall constructor(List _owners, BigInteger _required) { + final Function function = new Function( + "constructor", + Arrays.asList(new org.web3j.abi.datatypes.DynamicArray( + org.web3j.abi.Utils.typeMap(_owners, org.web3j.abi.datatypes.Address.class)), + new org.web3j.abi.datatypes.generated.Uint256(_required)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future setMyTokenList(DynamicArray
_tokenList) { - Function function = new Function("setMyTokenList", Arrays.asList(_tokenList), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall setMyTokenList(List _tokenList) { + final Function function = new Function( + "setMyTokenList", + Arrays.asList(new org.web3j.abi.datatypes.DynamicArray( + org.web3j.abi.Utils.typeMap(_tokenList, org.web3j.abi.datatypes.Address.class))), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future
tokens(Uint256 param0) { - Function function = new Function("tokens", - Arrays.asList(param0), + public RemoteCall tokens(BigInteger param0) { + final Function function = new Function("tokens", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(param0)), Arrays.>asList(new TypeReference
() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, String.class); } - public Future deposit(Address _from, Uint256 _amount, Address _token, DynamicBytes _data) { - Function function = new Function("deposit", Arrays.asList(_from, _amount, _token, _data), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall deposit(String _from, BigInteger _amount, String _token, byte[] _data) { + final Function function = new Function( + "deposit", + Arrays.asList(new org.web3j.abi.datatypes.Address(_from), + new org.web3j.abi.datatypes.generated.Uint256(_amount), + new org.web3j.abi.datatypes.Address(_token), + new org.web3j.abi.datatypes.DynamicBytes(_data)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future tokenBalances(Address param0) { - Function function = new Function("tokenBalances", - Arrays.asList(param0), + public RemoteCall tokenBalances(String param0) { + final Function function = new Function("tokenBalances", + Arrays.asList(new org.web3j.abi.datatypes.Address(param0)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future getTransactionCount(Bool pending, Bool executed) { - Function function = new Function("getTransactionCount", - Arrays.asList(pending, executed), + public RemoteCall getTransactionCount(Boolean pending, Boolean executed) { + final Function function = new Function("getTransactionCount", + Arrays.asList(new org.web3j.abi.datatypes.Bool(pending), + new org.web3j.abi.datatypes.Bool(executed)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future watch(Address _tokenAddr) { - Function function = new Function("watch", Arrays.asList(_tokenAddr), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall watch(String _tokenAddr) { + final Function function = new Function( + "watch", + Arrays.asList(new org.web3j.abi.datatypes.Address(_tokenAddr)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future addOwner(Address owner) { - Function function = new Function("addOwner", Arrays.asList(owner), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall addOwner(String owner) { + final Function function = new Function( + "addOwner", + Arrays.asList(new org.web3j.abi.datatypes.Address(owner)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future isConfirmed(Uint256 transactionId) { - Function function = new Function("isConfirmed", - Arrays.asList(transactionId), + public RemoteCall isConfirmed(BigInteger transactionId) { + final Function function = new Function("isConfirmed", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(transactionId)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, Boolean.class); } - public Future getConfirmationCount(Uint256 transactionId) { - Function function = new Function("getConfirmationCount", - Arrays.asList(transactionId), + public RemoteCall getConfirmationCount(BigInteger transactionId) { + final Function function = new Function("getConfirmationCount", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(transactionId)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future receiveApproval(Address _from, Uint256 _amount, Address _token, DynamicBytes _data) { - Function function = new Function("receiveApproval", Arrays.asList(_from, _amount, _token, _data), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall receiveApproval(String _from, BigInteger _amount, String _token, byte[] _data) { + final Function function = new Function( + "receiveApproval", + Arrays.asList(new org.web3j.abi.datatypes.Address(_from), + new org.web3j.abi.datatypes.generated.Uint256(_amount), + new org.web3j.abi.datatypes.Address(_token), + new org.web3j.abi.datatypes.DynamicBytes(_data)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future> transactions(Uint256 param0) { - Function function = new Function("transactions", - Arrays.asList(param0), + public RemoteCall> transactions(BigInteger param0) { + final Function function = new Function("transactions", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(param0)), Arrays.>asList(new TypeReference
() {}, new TypeReference() {}, new TypeReference() {}, new TypeReference() {})); - return executeCallMultipleValueReturnAsync(function); + return new RemoteCall>( + new Callable>() { + @Override + public Tuple4 call() throws Exception { + List results = executeCallMultipleValueReturn(function); + return new Tuple4( + (String) results.get(0).getValue(), + (BigInteger) results.get(1).getValue(), + (byte[]) results.get(2).getValue(), + (Boolean) results.get(3).getValue()); + } + }); } - public Future> getOwners() { - Function function = new Function("getOwners", + public RemoteCall getOwners() { + final Function function = new Function("getOwners", Arrays.asList(), Arrays.>asList(new TypeReference>() {})); - return executeCallSingleValueReturnAsync(function); + return new RemoteCall( + new Callable() { + @Override + @SuppressWarnings("unchecked") + public List call() throws Exception { + List result = (List) executeCallSingleValueReturn(function, List.class); + return convertToNative(result); + } + }); } - public Future withdrawAllTokens(Address _dest) { - Function function = new Function("withdrawAllTokens", Arrays.asList(_dest), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall withdrawAllTokens(String _dest) { + final Function function = new Function( + "withdrawAllTokens", + Arrays.asList(new org.web3j.abi.datatypes.Address(_dest)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future> getTransactionIds(Uint256 from, Uint256 to, Bool pending, Bool executed) { - Function function = new Function("getTransactionIds", - Arrays.asList(from, to, pending, executed), + public RemoteCall getTransactionIds(BigInteger from, BigInteger to, Boolean pending, Boolean executed) { + final Function function = new Function("getTransactionIds", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(from), + new org.web3j.abi.datatypes.generated.Uint256(to), + new org.web3j.abi.datatypes.Bool(pending), + new org.web3j.abi.datatypes.Bool(executed)), Arrays.>asList(new TypeReference>() {})); - return executeCallSingleValueReturnAsync(function); + return new RemoteCall( + new Callable() { + @Override + @SuppressWarnings("unchecked") + public List call() throws Exception { + List result = (List) executeCallSingleValueReturn(function, List.class); + return convertToNative(result); + } + }); } - public Future nonce() { - Function function = new Function("nonce", + public RemoteCall nonce() { + final Function function = new Function("nonce", Arrays.asList(), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future> getConfirmations(Uint256 transactionId) { - Function function = new Function("getConfirmations", - Arrays.asList(transactionId), + public RemoteCall getConfirmations(BigInteger transactionId) { + final Function function = new Function("getConfirmations", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(transactionId)), Arrays.>asList(new TypeReference>() {})); - return executeCallSingleValueReturnAsync(function); + return new RemoteCall( + new Callable() { + @Override + @SuppressWarnings("unchecked") + public List call() throws Exception { + List result = (List) executeCallSingleValueReturn(function, List.class); + return convertToNative(result); + } + }); } - public Future transactionCount() { - Function function = new Function("transactionCount", + public RemoteCall transactionCount() { + final Function function = new Function("transactionCount", Arrays.asList(), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future releaseWallet(Address _dest) { - Function function = new Function("releaseWallet", Arrays.asList(_dest), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall releaseWallet(String _dest) { + final Function function = new Function( + "releaseWallet", + Arrays.asList(new org.web3j.abi.datatypes.Address(_dest)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future changeRequirement(Uint256 _required) { - Function function = new Function("changeRequirement", Arrays.asList(_required), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall changeRequirement(BigInteger _required) { + final Function function = new Function( + "changeRequirement", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_required)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future confirmTransaction(Uint256 transactionId) { - Function function = new Function("confirmTransaction", Arrays.asList(transactionId), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall confirmTransaction(BigInteger transactionId) { + final Function function = new Function( + "confirmTransaction", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(transactionId)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future tokenFallback(Address _from, Uint256 _amount, DynamicBytes _data) { - Function function = new Function("tokenFallback", Arrays.asList(_from, _amount, _data), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall tokenFallback(String _from, BigInteger _amount, byte[] _data) { + final Function function = new Function( + "tokenFallback", + Arrays.asList(new org.web3j.abi.datatypes.Address(_from), + new org.web3j.abi.datatypes.generated.Uint256(_amount), + new org.web3j.abi.datatypes.DynamicBytes(_data)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future submitTransaction(Address destination, Uint256 value, DynamicBytes data) { - Function function = new Function("submitTransaction", Arrays.asList(destination, value, data), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall submitTransaction(String destination, BigInteger value, byte[] data) { + final Function function = new Function( + "submitTransaction", + Arrays.asList(new org.web3j.abi.datatypes.Address(destination), + new org.web3j.abi.datatypes.generated.Uint256(value), + new org.web3j.abi.datatypes.DynamicBytes(data)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future
userList(Address param0, Uint256 param1) { - Function function = new Function("userList", - Arrays.asList(param0, param1), + public RemoteCall userList(String param0, BigInteger param1) { + final Function function = new Function("userList", + Arrays.asList(new org.web3j.abi.datatypes.Address(param0), + new org.web3j.abi.datatypes.generated.Uint256(param1)), Arrays.>asList(new TypeReference
() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, String.class); } - public Future MAX_OWNER_COUNT() { - Function function = new Function("MAX_OWNER_COUNT", + public RemoteCall MAX_OWNER_COUNT() { + final Function function = new Function("MAX_OWNER_COUNT", Arrays.asList(), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future required() { - Function function = new Function("required", + public RemoteCall required() { + final Function function = new Function("required", Arrays.asList(), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future replaceOwner(Address owner, Address newOwner) { - Function function = new Function("replaceOwner", Arrays.asList(owner, newOwner), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall replaceOwner(String owner, String newOwner) { + final Function function = new Function( + "replaceOwner", + Arrays.asList(new org.web3j.abi.datatypes.Address(owner), + new org.web3j.abi.datatypes.Address(newOwner)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future depositToken(Address _token, DynamicBytes _data) { - Function function = new Function("depositToken", Arrays.asList(_token, _data), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall depositToken(String _token, byte[] _data) { + final Function function = new Function( + "depositToken", + Arrays.asList(new org.web3j.abi.datatypes.Address(_token), + new org.web3j.abi.datatypes.DynamicBytes(_data)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future executeTransaction(Uint256 transactionId) { - Function function = new Function("executeTransaction", Arrays.asList(transactionId), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall executeTransaction(BigInteger transactionId) { + final Function function = new Function( + "executeTransaction", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(transactionId)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future withdrawEverything(Address _dest) { - Function function = new Function("withdrawEverything", Arrays.asList(_dest), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall withdrawEverything(String _dest) { + final Function function = new Function( + "withdrawEverything", + Arrays.asList(new org.web3j.abi.datatypes.Address(_dest)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public static Future deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(MultiSigTokenWallet.class, web3j, credentials, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(MultiSigTokenWallet.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); } - public static Future deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(MultiSigTokenWallet.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(MultiSigTokenWallet.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); } public static MultiSigTokenWallet load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { @@ -609,52 +759,72 @@ public final class MultiSigTokenWallet extends Contract { } public static class ConfirmationEventResponse { - public Address _sender; + public Log log; - public Uint256 _transactionId; + public String _sender; + + public BigInteger _transactionId; } public static class RevocationEventResponse { - public Address _sender; + public Log log; - public Uint256 _transactionId; + public String _sender; + + public BigInteger _transactionId; } public static class SubmissionEventResponse { - public Uint256 _transactionId; + public Log log; + + public BigInteger _transactionId; } public static class ExecutionEventResponse { - public Uint256 _transactionId; + public Log log; + + public BigInteger _transactionId; } public static class ExecutionFailureEventResponse { - public Uint256 _transactionId; + public Log log; + + public BigInteger _transactionId; } public static class DepositEventResponse { - public Address _sender; + public Log log; - public Uint256 _value; + public String _sender; + + public BigInteger _value; } public static class TokenDepositEventResponse { - public Address _sender; + public Log log; - public Address _token; + public String _sender; - public Uint256 _value; + public String _token; + + public BigInteger _value; } public static class OwnerAdditionEventResponse { - public Address _owner; + public Log log; + + public String _owner; } public static class OwnerRemovalEventResponse { - public Address _owner; + public Log log; + + public String _owner; } public static class RequirementChangeEventResponse { - public Uint256 _required; + public Log log; + + public BigInteger _required; } } diff --git a/src/java/commiteth/eth/contracts/Owned.java b/src/java/commiteth/eth/contracts/Owned.java index e593fdd..3ece187 100644 --- a/src/java/commiteth/eth/contracts/Owned.java +++ b/src/java/commiteth/eth/contracts/Owned.java @@ -5,9 +5,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.concurrent.Future; import org.web3j.abi.EventEncoder; -import org.web3j.abi.EventValues; import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Event; @@ -16,6 +14,7 @@ import org.web3j.abi.datatypes.Type; import org.web3j.crypto.Credentials; import org.web3j.protocol.Web3j; import org.web3j.protocol.core.DefaultBlockParameter; +import org.web3j.protocol.core.RemoteCall; import org.web3j.protocol.core.methods.request.EthFilter; import org.web3j.protocol.core.methods.response.Log; import org.web3j.protocol.core.methods.response.TransactionReceipt; @@ -25,20 +24,22 @@ import rx.Observable; import rx.functions.Func1; /** - * Auto generated code.
- * Do not modify!
- * Please use the web3j command line tools, or {@link org.web3j.codegen.SolidityFunctionWrapperGenerator} to update. + *

Auto generated code. + *

Do not modify! + *

Please use the web3j command line tools, + * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the + * codegen module to update. * - *

Generated with web3j version 2.3.0. + *

Generated with web3j version 3.3.1. */ -public final class Owned extends Contract { - private static final String BINARY = "606060405260008054600160a060020a03191633600160a060020a0316179055341561002a57600080fd5b5b6101578061003a6000396000f300606060405263ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146100485780638da5cb5b14610069575b600080fd5b341561005357600080fd5b610067600160a060020a0360043516610098565b005b341561007457600080fd5b61007c61011c565b604051600160a060020a03909116815260200160405180910390f35b60005433600160a060020a039081169116146100b357610118565b600054600160a060020a0380831691167f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236460405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600054600160a060020a0316815600a165627a7a723058206bbc12c5f2dde30ed4acaaf0df4c0bc44e5909ce3b8ab82da7f226137465b3fd0029"; +public class Owned extends Contract { + private static final String BINARY = "606060405260008054600160a060020a03191633600160a060020a0316179055341561002a57600080fd5b6101ac806100396000396000f30060606040526004361061004b5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146100505780638da5cb5b1461007e575b600080fd5b341561005b57600080fd5b61007c73ffffffffffffffffffffffffffffffffffffffff600435166100ba565b005b341561008957600080fd5b610091610164565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6000543373ffffffffffffffffffffffffffffffffffffffff9081169116146100e257610161565b60005473ffffffffffffffffffffffffffffffffffffffff80831691167f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236460405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058206f92b115e641d63f5ea85daf79224b120587e075f9a8eee88ef952eb8c83efc40029"; - private Owned(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + protected Owned(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); } - private Owned(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + protected Owned(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); } @@ -46,12 +47,13 @@ public final class Owned extends Contract { final Event event = new Event("NewOwner", Arrays.>asList(new TypeReference

() {}, new TypeReference
() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { NewOwnerEventResponse typedResponse = new NewOwnerEventResponse(); - typedResponse.old = (Address) eventValues.getIndexedValues().get(0); - typedResponse.current = (Address) eventValues.getIndexedValues().get(1); + typedResponse.log = eventValues.getLog(); + typedResponse.old = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.current = (String) eventValues.getIndexedValues().get(1).getValue(); responses.add(typedResponse); } return responses; @@ -66,33 +68,37 @@ public final class Owned extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public NewOwnerEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); NewOwnerEventResponse typedResponse = new NewOwnerEventResponse(); - typedResponse.old = (Address) eventValues.getIndexedValues().get(0); - typedResponse.current = (Address) eventValues.getIndexedValues().get(1); + typedResponse.log = log; + typedResponse.old = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.current = (String) eventValues.getIndexedValues().get(1).getValue(); return typedResponse; } }); } - public Future setOwner(Address _new) { - Function function = new Function("setOwner", Arrays.asList(_new), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall setOwner(String _new) { + final Function function = new Function( + "setOwner", + Arrays.asList(new org.web3j.abi.datatypes.Address(_new)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future
owner() { - Function function = new Function("owner", + public RemoteCall owner() { + final Function function = new Function("owner", Arrays.asList(), Arrays.>asList(new TypeReference
() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, String.class); } - public static Future deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(Owned.class, web3j, credentials, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(Owned.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); } - public static Future deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(Owned.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(Owned.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); } public static Owned load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { @@ -104,8 +110,10 @@ public final class Owned extends Contract { } public static class NewOwnerEventResponse { - public Address old; + public Log log; - public Address current; + public String old; + + public String current; } } diff --git a/src/java/commiteth/eth/contracts/TokenReg.java b/src/java/commiteth/eth/contracts/TokenReg.java index cd131e1..dbc89c7 100644 --- a/src/java/commiteth/eth/contracts/TokenReg.java +++ b/src/java/commiteth/eth/contracts/TokenReg.java @@ -5,9 +5,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.concurrent.Future; +import java.util.concurrent.Callable; import org.web3j.abi.EventEncoder; -import org.web3j.abi.EventValues; import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Event; @@ -19,29 +18,33 @@ import org.web3j.abi.datatypes.generated.Uint256; import org.web3j.crypto.Credentials; import org.web3j.protocol.Web3j; import org.web3j.protocol.core.DefaultBlockParameter; +import org.web3j.protocol.core.RemoteCall; import org.web3j.protocol.core.methods.request.EthFilter; import org.web3j.protocol.core.methods.response.Log; import org.web3j.protocol.core.methods.response.TransactionReceipt; +import org.web3j.tuples.generated.Tuple5; import org.web3j.tx.Contract; import org.web3j.tx.TransactionManager; import rx.Observable; import rx.functions.Func1; /** - * Auto generated code.
- * Do not modify!
- * Please use the web3j command line tools, or {@link org.web3j.codegen.SolidityFunctionWrapperGenerator} to update. + *

Auto generated code. + *

Do not modify! + *

Please use the web3j command line tools, + * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the + * codegen module to update. * - *

Generated with web3j version 2.3.0. + *

Generated with web3j version 3.3.1. */ -public final class TokenReg extends Contract { - private static final String BINARY = "606060405260008054600160a060020a03191633600160a060020a0316178155600455341561002d57600080fd5b5b6114ae8061003d6000396000f300606060405236156100cd5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663044215c681146100d257806313af4035146101ec57806366b42dcb1461020d57806369fe0e2d146102c05780637958533a146102d85780637b1a547c14610303578063891de9ed146103c15780638da5cb5b146104b25780639890220b146104e15780639f181b5e146104f6578063a02b161e1461051b578063b72e717d14610533578063dd93890b14610654578063ddca3f4314610672575b600080fd5b34156100dd57600080fd5b6100e8600435610697565b604051600160a060020a038087168252604082018590528216608082015260a060208201818152906060830190830187818151815260200191508051906020019080838360005b838110156101485780820151818401525b60200161012f565b50505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156101ac5780820151818401525b602001610193565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34156101f757600080fd5b61020b600160a060020a0360043516610846565b005b6102ac60048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405281815292919060208401838380828437509496506108bd95505050505050565b604051901515815260200160405180910390f35b34156102cb57600080fd5b61020b6004356108d7565b005b34156102e357600080fd5b6102f16004356024356108fc565b60405190815260200160405180910390f35b6102ac60048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965050509235600160a060020a0316925061093b915050565b604051901515815260200160405180910390f35b34156103cc57600080fd5b61041260046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610c7895505050505050565b604051858152600160a060020a038086166020830152604082018590528216608082015260a06060820181815290820184818151815260200191508051906020019080838360005b838110156104735780820151818401525b60200161045a565b50505050905090810190601f1680156104a05780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b34156104bd57600080fd5b6104c5610dea565b604051600160a060020a03909116815260200160405180910390f35b34156104ec57600080fd5b61020b610df9565b005b341561050157600080fd5b6102f1610e55565b60405190815260200160405180910390f35b341561052657600080fd5b61020b600435610e5c565b005b341561053e57600080fd5b610552600160a060020a0360043516611075565b60405185815260408101849052600160a060020a038216608082015260a060208201818152906060830190830187818151815260200191508051906020019080838360005b838110156101485780820151818401525b60200161012f565b50505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156101ac5780820151818401525b602001610193565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b341561065f57600080fd5b61020b60043560243560443561122f565b005b341561067d57600080fd5b6102f16112eb565b60405190815260200160405180910390f35b60006106a16112f1565b60006106ab6112f1565b6000806003878154811015156106bd57fe5b906000526020600020906006020160005b50805460018083018054600160a060020a0390931699509293506002600019918316156101000291909101909116046020601f8201819004810201604051908101604052809291908181526020018280546001816001161561010002031660029004801561077d5780601f106107525761010080835404028352916020019161077d565b820191906000526020600020905b81548152906001019060200180831161076057829003601f168201915b5050505050945080600201549350806003018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108235780601f106107f857610100808354040283529160200191610823565b820191906000526020600020905b81548152906001019060200180831161080657829003601f168201915b50505050600483015491945050600160a060020a031691505b5091939590929450565b60005433600160a060020a03908116911614610861576108b9565b600054600160a060020a0380831691167f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236460405160405180910390a360008054600160a060020a031916600160a060020a0383161790555b5b50565b60006108cc858585853361093b565b90505b949350505050565b60005433600160a060020a039081169116146108f2576108b9565b60048190555b5b50565b600060038381548110151561090d57fe5b906000526020600020906006020160005b506000838152600591909101602052604090205490505b92915050565b600060045434101561094c57610c6f565b600160a060020a03861660009081526001602052604090205486901561097157610c6d565b85805160031461098057610c6b565b866002816040518082805190602001908083835b602083106109b457805182525b601f199092019160209182019101610994565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405190819003902054156109f357610c68565b6003805460018101610a058382611303565b916000526020600020906006020160005b60a06040519081016040908152600160a060020a03808f168352602083018e90529082018c9052606082018b90528916608082015291905081518154600160a060020a031916600160a060020a0391909116178155602082015181600101908051610a85929160200190611335565b5060408201518160020155606082015181600301908051610aaa929160200190611335565b5060808201516004919091018054600160a060020a031916600160a060020a03928316179055600354908c1660009081526001602052604090819020829055909250600291508a90518082805190602001908083835b60208310610b2057805182525b601f199092019160209182019101610b00565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040519081900390205560035460001901886040518082805190602001908083835b60208310610b8d57805182525b601f199092019160209182019101610b6d565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390207f25074d730da65a10e171fe5589d2182313ef00da38d23a9ae3b78923568bdf2d8b89604051600160a060020a038316815260406020820181815290820183818151815260200191508051906020019080838360005b83811015610c285780820151818401525b602001610c0f565b50505050905090810190601f168015610c555780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3600193505b5b505b505b505b95945050505050565b6000806000610c856112f1565b60008060016002886040518082805190602001908083835b60208310610cbd57805182525b601f199092019160209182019101610c9d565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902054039550600386815481101515610d0357fe5b906000526020600020906006020160005b508054600280830154600384018054600160a060020a03909416995090975092935060001960018316156101000201909116046020601f820181900481020160405190810160405280929190818152602001828054600181600116156101000203166002900480156108235780601f106107f857610100808354040283529160200191610823565b820191906000526020600020905b81548152906001019060200180831161080657829003601f168201915b50505050600483015491945050600160a060020a031691505b5091939590929450565b600054600160a060020a031681565b60005433600160a060020a03908116911614610e1457610e51565b33600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f193505050501515610e5157600080fd5b5b5b565b6003545b90565b60005433600160a060020a03908116911614610e77576108b9565b80600382815481101515610e8757fe5b906000526020600020906006020160005b506001016040518082805460018160011615610100020316600290048015610ef75780601f10610ed5576101008083540402835291820191610ef7565b820191906000526020600020905b815481529060010190602001808311610ee3575b505091505060405180910390207f96e76fa77fea85d8abeb7533fdb8288c214bb1dcf1f867c8f36a95f1f509c17560405160405180910390a360016000600383815481101515610f4357fe5b906000526020600020906006020160005b5054600160a060020a031681526020810191909152604001600090812055600380546002919083908110610f8457fe5b906000526020600020906006020160005b506001016040518082805460018160011615610100020316600290048015610ff45780601f10610fd2576101008083540402835291820191610ff4565b820191906000526020600020905b815481529060010190602001808311610fe0575b5050928352505060200160405180910390206000905560038181548110151561101957fe5b906000526020600020906006020160005b8154600160a060020a03191682556110466001830160006113b4565b600282016000905560038201600061105e91906113b4565b506004018054600160a060020a03191690555b5b50565b600061107f6112f1565b60006110896112f1565b600160a060020a0385166000908152600160205260408120546003805460001990920196508291879081106110ba57fe5b906000526020600020906006020160005b509050806001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561077d5780601f106107525761010080835404028352916020019161077d565b820191906000526020600020905b81548152906001019060200180831161076057829003601f168201915b5050505050945080600201549350806003018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108235780601f106107f857610100808354040283529160200191610823565b820191906000526020600020905b81548152906001019060200180831161080657829003601f168201915b50505050600483015491945050600160a060020a031691505b5091939590929450565b8233600160a060020a031660038281548110151561124957fe5b906000526020600020906006020160005b5060040154600160a060020a031614611272576112e4565b8160038581548110151561128257fe5b906000526020600020906006020160005b50600085815260059190910160205260409081902091909155839085907f7991c63a749706fd298fc2387764d640be6e714307b6357b1d3c2ce35cba3b529085905190815260200160405180910390a35b5b50505050565b60045481565b60206040519081016040526000815290565b81548183558181151161132f5760060281600602836000526020600020918201910161132f91906113fc565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061137657805160ff19168380011785556113a3565b828001600101855582156113a3579182015b828111156113a3578251825591602001919060010190611388565b5b506113b0929150611461565b5090565b50805460018160011615610100020316600290046000825580601f106113da57506108b9565b601f0160209004906000526020600020908101906108b99190611461565b5b50565b610e5991905b808211156113b0578054600160a060020a0319168155600061142760018301826113b4565b600282016000905560038201600061143f91906113b4565b50600481018054600160a060020a0319169055600601611402565b5090565b90565b610e5991905b808211156113b05760008155600101611467565b5090565b905600a165627a7a72305820dc82243a03a763551f18919f3f3b18deb414598a49e3885231566104cf03730d0029"; +public class TokenReg extends Contract { + private static final String BINARY = "606060405260008054600160a060020a03191633600160a060020a0316178155600455341561002d57600080fd5b6112448061003c6000396000f3006060604052600436106100cf5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663044215c681146100d457806313af4035146101ec57806366b42dcb1461020d57806369fe0e2d146102c05780637958533a146102d65780637b1a547c14610301578063891de9ed146103ab5780638da5cb5b1461049b5780639890220b146104ca5780639f181b5e146104dd578063a02b161e146104f0578063b72e717d14610506578063dd93890b14610581578063ddca3f431461059d575b600080fd5b34156100df57600080fd5b6100ea6004356105b0565b604051600160a060020a038087168252604082018590528216608082015260a060208201818152906060830190830187818151815260200191508051906020019080838360005b83811015610149578082015183820152602001610131565b50505050905090810190601f1680156101765780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156101ac578082015183820152602001610194565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34156101f757600080fd5b61020b600160a060020a0360043516610763565b005b6102ac60048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405281815292919060208401838380828437509496506107d995505050505050565b604051901515815260200160405180910390f35b34156102cb57600080fd5b61020b6004356107f1565b34156102e157600080fd5b6102ef600435602435610811565b60405190815260200160405180910390f35b6102ac60048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965050509235600160a060020a03169250610849915050565b34156103b657600080fd5b6103fc60046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610b7f95505050505050565b604051858152600160a060020a038086166020830152604082018590528216608082015260a06060820181815290820184818151815260200191508051906020019080838360005b8381101561045c578082015183820152602001610444565b50505050905090810190601f1680156104895780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b34156104a657600080fd5b6104ae610ca7565b604051600160a060020a03909116815260200160405180910390f35b34156104d557600080fd5b61020b610cb6565b34156104e857600080fd5b6102ef610d10565b34156104fb57600080fd5b61020b600435610d17565b341561051157600080fd5b610525600160a060020a0360043516610f1f565b60405185815260408101849052600160a060020a038216608082015260a0602082018181529060608301908301878181518152602001915080519060200190808383600083811015610149578082015183820152602001610131565b341561058c57600080fd5b61020b600435602435604435610fe1565b34156105a857600080fd5b6102ef611095565b60006105ba61109b565b60006105c461109b565b6000806003878154811015156105d657fe5b906000526020600020906006020190508060000160009054906101000a9004600160a060020a03169550806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106985780601f1061066d57610100808354040283529160200191610698565b820191906000526020600020905b81548152906001019060200180831161067b57829003601f168201915b5050505050945080600201549350806003018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561073e5780601f106107135761010080835404028352916020019161073e565b820191906000526020600020905b81548152906001019060200180831161072157829003601f168201915b505050600490930154979996985094969095600160a060020a03909116945092505050565b60005433600160a060020a0390811691161461077e576107d6565b600054600160a060020a0380831691167f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236460405160405180910390a360008054600160a060020a031916600160a060020a0383161790555b50565b60006107e88585858533610849565b95945050505050565b60005433600160a060020a0390811691161461080c576107d6565b600455565b600060038381548110151561082257fe5b60009182526020808320948352600691909102909301600501909252506040902054919050565b600060045434101561085a576107e8565b600160a060020a03861660009081526001602052604090205486901561087f57610b75565b85805160031461088e57610b73565b866002816040518082805190602001908083835b602083106108c15780518252601f1990920191602091820191016108a2565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051908190039020541561090057610b71565b600380546001810161091283826110ad565b9160005260206000209060060201600060a06040519081016040908152600160a060020a03808f168352602083018e90529082018c9052606082018b90528916608082015291905081518154600160a060020a031916600160a060020a03919091161781556020820151816001019080516109919291602001906110de565b50604082015181600201556060820151816003019080516109b69291602001906110de565b5060808201516004919091018054600160a060020a031916600160a060020a03928316179055600354908c1660009081526001602052604090819020829055909250600291508a90518082805190602001908083835b60208310610a2b5780518252601f199092019160209182019101610a0c565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040519081900390205560035460001901886040518082805190602001908083835b60208310610a975780518252601f199092019160209182019101610a78565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390207f25074d730da65a10e171fe5589d2182313ef00da38d23a9ae3b78923568bdf2d8b89604051600160a060020a038316815260406020820181815290820183818151815260200191508051906020019080838360005b83811015610b31578082015183820152602001610b19565b50505050905090810190601f168015610b5e5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3600193505b505b505b5095945050505050565b6000806000610b8c61109b565b60008060016002886040518082805190602001908083835b60208310610bc35780518252601f199092019160209182019101610ba4565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902054039550600386815481101515610c0957fe5b906000526020600020906006020190508060000160009054906101000a9004600160a060020a0316945080600201549350806003018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561073e5780601f106107135761010080835404028352916020019161073e565b600054600160a060020a031681565b60005433600160a060020a03908116911614610cd157610d0e565b33600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f193505050501515610d0e57600080fd5b565b6003545b90565b60005433600160a060020a03908116911614610d32576107d6565b80600382815481101515610d4257fe5b90600052602060002090600602016001016040518082805460018160011615610100020316600290048015610dae5780601f10610d8c576101008083540402835291820191610dae565b820191906000526020600020905b815481529060010190602001808311610d9a575b505091505060405180910390207f96e76fa77fea85d8abeb7533fdb8288c214bb1dcf1f867c8f36a95f1f509c17560405160405180910390a360016000600383815481101515610dfa57fe5b60009182526020808320600690920290910154600160a060020a03168352820192909252604001812055600380546002919083908110610e3657fe5b90600052602060002090600602016001016040518082805460018160011615610100020316600290048015610ea25780601f10610e80576101008083540402835291820191610ea2565b820191906000526020600020905b815481529060010190602001808311610e8e575b50509283525050602001604051809103902060009055600381815481101515610ec757fe5b6000918252602082206006909102018054600160a060020a031916815590610ef2600183018261115c565b6002820160009055600382016000610f0a919061115c565b506004018054600160a060020a031916905550565b6000610f2961109b565b6000610f3361109b565b600160a060020a038516600090815260016020526040812054600380546000199092019650829187908110610f6457fe5b90600052602060002090600602019050806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106985780601f1061066d57610100808354040283529160200191610698565b8233600160a060020a0316600382815481101515610ffb57fe5b6000918252602090912060046006909202010154600160a060020a0316146110225761108f565b8160038581548110151561103257fe5b60009182526020808320878452600560069093020191909101905260409081902091909155839085907f7991c63a749706fd298fc2387764d640be6e714307b6357b1d3c2ce35cba3b529085905190815260200160405180910390a35b50505050565b60045481565b60206040519081016040526000815290565b8154818355818115116110d9576006028160060283600052602060002091820191016110d991906111a0565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061111f57805160ff191683800117855561114c565b8280016001018555821561114c579182015b8281111561114c578251825591602001919060010190611131565b506111589291506111fe565b5090565b50805460018160011615610100020316600290046000825580601f1061118257506107d6565b601f0160209004906000526020600020908101906107d691906111fe565b610d1491905b80821115611158578054600160a060020a031916815560006111cb600183018261115c565b60028201600090556003820160006111e3919061115c565b50600481018054600160a060020a03191690556006016111a6565b610d1491905b8082111561115857600081556001016112045600a165627a7a72305820c07b66e0f471d477346b2ba225458b0520214a638dd3b0fdab7dfe5eb7135b260029"; - private TokenReg(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + protected TokenReg(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); } - private TokenReg(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + protected TokenReg(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); } @@ -49,14 +52,15 @@ public final class TokenReg extends Contract { final Event event = new Event("Registered", Arrays.>asList(new TypeReference() {}, new TypeReference() {}), Arrays.>asList(new TypeReference

() {}, new TypeReference() {})); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { RegisteredEventResponse typedResponse = new RegisteredEventResponse(); - typedResponse.tla = (Utf8String) eventValues.getIndexedValues().get(0); - typedResponse.id = (Uint256) eventValues.getIndexedValues().get(1); - typedResponse.addr = (Address) eventValues.getNonIndexedValues().get(0); - typedResponse.name = (Utf8String) eventValues.getNonIndexedValues().get(1); + typedResponse.log = eventValues.getLog(); + typedResponse.tla = (byte[]) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.id = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.addr = (String) eventValues.getNonIndexedValues().get(0).getValue(); + typedResponse.name = (String) eventValues.getNonIndexedValues().get(1).getValue(); responses.add(typedResponse); } return responses; @@ -71,12 +75,13 @@ public final class TokenReg extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public RegisteredEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); RegisteredEventResponse typedResponse = new RegisteredEventResponse(); - typedResponse.tla = (Utf8String) eventValues.getIndexedValues().get(0); - typedResponse.id = (Uint256) eventValues.getIndexedValues().get(1); - typedResponse.addr = (Address) eventValues.getNonIndexedValues().get(0); - typedResponse.name = (Utf8String) eventValues.getNonIndexedValues().get(1); + typedResponse.log = log; + typedResponse.tla = (byte[]) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.id = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.addr = (String) eventValues.getNonIndexedValues().get(0).getValue(); + typedResponse.name = (String) eventValues.getNonIndexedValues().get(1).getValue(); return typedResponse; } }); @@ -86,12 +91,13 @@ public final class TokenReg extends Contract { final Event event = new Event("Unregistered", Arrays.>asList(new TypeReference() {}, new TypeReference() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { UnregisteredEventResponse typedResponse = new UnregisteredEventResponse(); - typedResponse.tla = (Utf8String) eventValues.getIndexedValues().get(0); - typedResponse.id = (Uint256) eventValues.getIndexedValues().get(1); + typedResponse.log = eventValues.getLog(); + typedResponse.tla = (byte[]) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.id = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); responses.add(typedResponse); } return responses; @@ -106,10 +112,11 @@ public final class TokenReg extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public UnregisteredEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); UnregisteredEventResponse typedResponse = new UnregisteredEventResponse(); - typedResponse.tla = (Utf8String) eventValues.getIndexedValues().get(0); - typedResponse.id = (Uint256) eventValues.getIndexedValues().get(1); + typedResponse.log = log; + typedResponse.tla = (byte[]) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.id = (BigInteger) eventValues.getIndexedValues().get(1).getValue(); return typedResponse; } }); @@ -119,13 +126,14 @@ public final class TokenReg extends Contract { final Event event = new Event("MetaChanged", Arrays.>asList(new TypeReference() {}, new TypeReference() {}), Arrays.>asList(new TypeReference() {})); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { MetaChangedEventResponse typedResponse = new MetaChangedEventResponse(); - typedResponse.id = (Uint256) eventValues.getIndexedValues().get(0); - typedResponse.key = (Bytes32) eventValues.getIndexedValues().get(1); - typedResponse.value = (Bytes32) eventValues.getNonIndexedValues().get(0); + typedResponse.log = eventValues.getLog(); + typedResponse.id = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.key = (byte[]) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.value = (byte[]) eventValues.getNonIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; @@ -140,11 +148,12 @@ public final class TokenReg extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public MetaChangedEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); MetaChangedEventResponse typedResponse = new MetaChangedEventResponse(); - typedResponse.id = (Uint256) eventValues.getIndexedValues().get(0); - typedResponse.key = (Bytes32) eventValues.getIndexedValues().get(1); - typedResponse.value = (Bytes32) eventValues.getNonIndexedValues().get(0); + typedResponse.log = log; + typedResponse.id = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.key = (byte[]) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.value = (byte[]) eventValues.getNonIndexedValues().get(0).getValue(); return typedResponse; } }); @@ -154,12 +163,13 @@ public final class TokenReg extends Contract { final Event event = new Event("NewOwner", Arrays.>asList(new TypeReference
() {}, new TypeReference
() {}), Arrays.>asList()); - List valueList = extractEventParameters(event, transactionReceipt); + List valueList = extractEventParametersWithLog(event, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (EventValues eventValues : valueList) { + for (Contract.EventValuesWithLog eventValues : valueList) { NewOwnerEventResponse typedResponse = new NewOwnerEventResponse(); - typedResponse.old = (Address) eventValues.getIndexedValues().get(0); - typedResponse.current = (Address) eventValues.getIndexedValues().get(1); + typedResponse.log = eventValues.getLog(); + typedResponse.old = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.current = (String) eventValues.getIndexedValues().get(1).getValue(); responses.add(typedResponse); } return responses; @@ -174,105 +184,173 @@ public final class TokenReg extends Contract { return web3j.ethLogObservable(filter).map(new Func1() { @Override public NewOwnerEventResponse call(Log log) { - EventValues eventValues = extractEventParameters(event, log); + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(event, log); NewOwnerEventResponse typedResponse = new NewOwnerEventResponse(); - typedResponse.old = (Address) eventValues.getIndexedValues().get(0); - typedResponse.current = (Address) eventValues.getIndexedValues().get(1); + typedResponse.log = log; + typedResponse.old = (String) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.current = (String) eventValues.getIndexedValues().get(1).getValue(); return typedResponse; } }); } - public Future> token(Uint256 _id) { - Function function = new Function("token", - Arrays.asList(_id), + public RemoteCall> token(BigInteger _id) { + final Function function = new Function("token", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_id)), Arrays.>asList(new TypeReference
() {}, new TypeReference() {}, new TypeReference() {}, new TypeReference() {}, new TypeReference
() {})); - return executeCallMultipleValueReturnAsync(function); + return new RemoteCall>( + new Callable>() { + @Override + public Tuple5 call() throws Exception { + List results = executeCallMultipleValueReturn(function); + return new Tuple5( + (String) results.get(0).getValue(), + (String) results.get(1).getValue(), + (BigInteger) results.get(2).getValue(), + (String) results.get(3).getValue(), + (String) results.get(4).getValue()); + } + }); } - public Future setOwner(Address _new) { - Function function = new Function("setOwner", Arrays.asList(_new), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall setOwner(String _new) { + final Function function = new Function( + "setOwner", + Arrays.asList(new org.web3j.abi.datatypes.Address(_new)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future register(Address _addr, Utf8String _tla, Uint256 _base, Utf8String _name, BigInteger weiValue) { - Function function = new Function("register", Arrays.asList(_addr, _tla, _base, _name), Collections.>emptyList()); - return executeTransactionAsync(function, weiValue); + public RemoteCall register(String _addr, String _tla, BigInteger _base, String _name, BigInteger weiValue) { + final Function function = new Function( + "register", + Arrays.asList(new org.web3j.abi.datatypes.Address(_addr), + new org.web3j.abi.datatypes.Utf8String(_tla), + new org.web3j.abi.datatypes.generated.Uint256(_base), + new org.web3j.abi.datatypes.Utf8String(_name)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function, weiValue); } - public Future setFee(Uint256 _fee) { - Function function = new Function("setFee", Arrays.asList(_fee), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall setFee(BigInteger _fee) { + final Function function = new Function( + "setFee", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_fee)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future meta(Uint256 _id, Bytes32 _key) { - Function function = new Function("meta", - Arrays.asList(_id, _key), + public RemoteCall meta(BigInteger _id, byte[] _key) { + final Function function = new Function("meta", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_id), + new org.web3j.abi.datatypes.generated.Bytes32(_key)), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, byte[].class); } - public Future registerAs(Address _addr, Utf8String _tla, Uint256 _base, Utf8String _name, Address _owner, BigInteger weiValue) { - Function function = new Function("registerAs", Arrays.asList(_addr, _tla, _base, _name, _owner), Collections.>emptyList()); - return executeTransactionAsync(function, weiValue); + public RemoteCall registerAs(String _addr, String _tla, BigInteger _base, String _name, String _owner, BigInteger weiValue) { + final Function function = new Function( + "registerAs", + Arrays.asList(new org.web3j.abi.datatypes.Address(_addr), + new org.web3j.abi.datatypes.Utf8String(_tla), + new org.web3j.abi.datatypes.generated.Uint256(_base), + new org.web3j.abi.datatypes.Utf8String(_name), + new org.web3j.abi.datatypes.Address(_owner)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function, weiValue); } - public Future> fromTLA(Utf8String _tla) { - Function function = new Function("fromTLA", - Arrays.asList(_tla), + public RemoteCall> fromTLA(String _tla) { + final Function function = new Function("fromTLA", + Arrays.asList(new org.web3j.abi.datatypes.Utf8String(_tla)), Arrays.>asList(new TypeReference() {}, new TypeReference
() {}, new TypeReference() {}, new TypeReference() {}, new TypeReference
() {})); - return executeCallMultipleValueReturnAsync(function); + return new RemoteCall>( + new Callable>() { + @Override + public Tuple5 call() throws Exception { + List results = executeCallMultipleValueReturn(function); + return new Tuple5( + (BigInteger) results.get(0).getValue(), + (String) results.get(1).getValue(), + (BigInteger) results.get(2).getValue(), + (String) results.get(3).getValue(), + (String) results.get(4).getValue()); + } + }); } - public Future
owner() { - Function function = new Function("owner", + public RemoteCall owner() { + final Function function = new Function("owner", Arrays.asList(), Arrays.>asList(new TypeReference
() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, String.class); } - public Future drain() { - Function function = new Function("drain", Arrays.asList(), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall drain() { + final Function function = new Function( + "drain", + Arrays.asList(), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future tokenCount() { - Function function = new Function("tokenCount", + public RemoteCall tokenCount() { + final Function function = new Function("tokenCount", Arrays.asList(), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public Future unregister(Uint256 _id) { - Function function = new Function("unregister", Arrays.asList(_id), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall unregister(BigInteger _id) { + final Function function = new Function( + "unregister", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_id)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future> fromAddress(Address _addr) { - Function function = new Function("fromAddress", - Arrays.asList(_addr), + public RemoteCall> fromAddress(String _addr) { + final Function function = new Function("fromAddress", + Arrays.asList(new org.web3j.abi.datatypes.Address(_addr)), Arrays.>asList(new TypeReference() {}, new TypeReference() {}, new TypeReference() {}, new TypeReference() {}, new TypeReference
() {})); - return executeCallMultipleValueReturnAsync(function); + return new RemoteCall>( + new Callable>() { + @Override + public Tuple5 call() throws Exception { + List results = executeCallMultipleValueReturn(function); + return new Tuple5( + (BigInteger) results.get(0).getValue(), + (String) results.get(1).getValue(), + (BigInteger) results.get(2).getValue(), + (String) results.get(3).getValue(), + (String) results.get(4).getValue()); + } + }); } - public Future setMeta(Uint256 _id, Bytes32 _key, Bytes32 _value) { - Function function = new Function("setMeta", Arrays.asList(_id, _key, _value), Collections.>emptyList()); - return executeTransactionAsync(function); + public RemoteCall setMeta(BigInteger _id, byte[] _key, byte[] _value) { + final Function function = new Function( + "setMeta", + Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_id), + new org.web3j.abi.datatypes.generated.Bytes32(_key), + new org.web3j.abi.datatypes.generated.Bytes32(_value)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); } - public Future fee() { - Function function = new Function("fee", + public RemoteCall fee() { + final Function function = new Function("fee", Arrays.asList(), Arrays.>asList(new TypeReference() {})); - return executeCallSingleValueReturnAsync(function); + return executeRemoteCallSingleValueReturn(function, BigInteger.class); } - public static Future deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(TokenReg.class, web3j, credentials, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(TokenReg.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); } - public static Future deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) { - return deployAsync(TokenReg.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "", initialWeiValue); + public static RemoteCall deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { + return deployRemoteCall(TokenReg.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); } public static TokenReg load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { @@ -284,32 +362,40 @@ public final class TokenReg extends Contract { } public static class RegisteredEventResponse { - public Utf8String tla; + public Log log; - public Uint256 id; + public byte[] tla; - public Address addr; + public BigInteger id; - public Utf8String name; + public String addr; + + public String name; } public static class UnregisteredEventResponse { - public Utf8String tla; + public Log log; - public Uint256 id; + public byte[] tla; + + public BigInteger id; } public static class MetaChangedEventResponse { - public Uint256 id; + public Log log; - public Bytes32 key; + public BigInteger id; - public Bytes32 value; + public byte[] key; + + public byte[] value; } public static class NewOwnerEventResponse { - public Address old; + public Log log; - public Address current; + public String old; + + public String current; } }