diff --git a/app/src/androidTest/java/com/alphawallet/app/TransferERC721Test.java b/app/src/androidTest/java/com/alphawallet/app/TransferERC721Test.java new file mode 100644 index 0000000000..4126d30dca --- /dev/null +++ b/app/src/androidTest/java/com/alphawallet/app/TransferERC721Test.java @@ -0,0 +1,103 @@ +package com.alphawallet.app; + +import static com.alphawallet.app.steps.Steps.GANACHE_URL; +import static com.alphawallet.app.steps.Steps.addCustomToken; +import static com.alphawallet.app.steps.Steps.addNewNetwork; +import static com.alphawallet.app.steps.Steps.assertBalanceIs; +import static com.alphawallet.app.steps.Steps.createNewWallet; +import static com.alphawallet.app.steps.Steps.ensureTransactionConfirmed; +import static com.alphawallet.app.steps.Steps.getWalletAddress; +import static com.alphawallet.app.steps.Steps.gotoWalletPage; +import static com.alphawallet.app.steps.Steps.importWalletFromSettingsPage; +import static com.alphawallet.app.steps.Steps.selectTestNet; +import static com.alphawallet.app.steps.Steps.sendBalanceTo; +import static com.alphawallet.app.steps.Steps.sendNFTTo; +import static com.alphawallet.app.steps.Steps.switchToWallet; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + +import android.os.Build; + +import com.alphawallet.app.resources.Contracts; +import com.alphawallet.app.util.EthUtils; + +import org.junit.Before; +import org.junit.Test; +import org.web3j.crypto.Credentials; +import org.web3j.protocol.Web3j; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +public class TransferERC721Test extends BaseE2ETest +{ + private String contractAddress; + private final String contractOwnerPk = "0x69c22d654be7fe75e31fbe26cb56c93ec91144fab67cb71529c8081971635069"; + // On CI server, run tests on different API levels concurrently may cause failure: Replacement transaction underpriced. + // Use different wallet to transfer token from can avoid this error + private static final Map WALLETS_ON_GANACHE = new HashMap() + { + { + put("24", new String[]{"0x644022aef70ad515ee186345fd74b005d759f41be8157c2835de3597d943146d", "0xE494323823fdF1A1Ab6ca79d2538C7182690D52a"}); + put("30", new String[]{"0x5c8843768e0e1916255def80ae7f6197e1f6a2dbcba720038748fc7634e5cffd", "0x162f5e0b63646AAA33a85eA13346F15C5289f901"}); + put("32", new String[]{"0x992b442eaa34de3c6ba0b61c75b2e4e0241d865443e313c4fa6ab8ba488a6957", "0xd7Ba01f596a7cc926b96b3B0a037c47A22904c06"}); + } + }; + private Web3j web3j; + private String senderPrivateKey; + private Credentials senderCredentials; + private Credentials contractOwnerCredentials; + + @Override + @Before + public void setUp() + { + int apiLevel = Build.VERSION.SDK_INT; + String[] array = WALLETS_ON_GANACHE.get(String.valueOf(apiLevel)); + if (array == null) + { + fail("Please config seed phrase and wallet address for this API level first."); + } + + senderPrivateKey = array[0]; + senderCredentials = Credentials.create(senderPrivateKey); + contractOwnerCredentials = Credentials.create(contractOwnerPk); + + super.setUp(); + web3j = EthUtils.buildWeb3j(GANACHE_URL); + deployTestTokenOnGanache(); + } + + private void deployTestTokenOnGanache() + { + //Transfer 1 eth into deployment wallet + EthUtils.transferFunds(web3j, senderCredentials, contractOwnerCredentials.getAddress(), BigDecimal.ONE); + + //Deploy door contract + EthUtils.deployContract(web3j, contractOwnerCredentials, Contracts.erc721ContractCode); + + //Always use zero nonce for determining the contract address + contractAddress = EthUtils.calculateContractAddress(contractOwnerCredentials.getAddress(), 0L); + + assertNotNull(contractAddress); + } + + @Test + public void should_transfer_from_an_account_to_another() + { + createNewWallet(); + String newWalletAddress = getWalletAddress(); + + importWalletFromSettingsPage(contractOwnerPk); + addNewNetwork("Ganache", GANACHE_URL); + selectTestNet("Ganache"); + gotoWalletPage(); + addCustomToken(contractAddress); + sendNFTTo("My NFT", "#1", newWalletAddress); + ensureTransactionConfirmed(); + switchToWallet(newWalletAddress); + addCustomToken(contractAddress); + assertBalanceIs("1.11"); + } +} diff --git a/app/src/androidTest/java/com/alphawallet/app/resources/Contracts.java b/app/src/androidTest/java/com/alphawallet/app/resources/Contracts.java index 5dcfe4ab9d..baa6b80439 100644 --- a/app/src/androidTest/java/com/alphawallet/app/resources/Contracts.java +++ b/app/src/androidTest/java/com/alphawallet/app/resources/Contracts.java @@ -7,4 +7,5 @@ public abstract class Contracts { public static String doorContractCode = "0x60806040523480156200001157600080fd5b506040518060400160405280600b81526020016a29aa26102428902237b7b960a91b815250604051806040016040528060068152602001654f464649434560d01b81525081600090816200006691906200042d565b5060016200007582826200042d565b505050620000926200008c620000e460201b60201c565b620000e8565b620000a960076200013a60201b62000e501760201c565b6040518060600160405280603581526020016200218360359139600a90620000d290826200042d565b50620000dd62000143565b5062000521565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b6006546000906001600160a01b03163314620001a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b620001bd60076200023860201b62000e591760201c565b90506127108110620002125760405162461bcd60e51b815260206004820152601460248201527f486974207570706572206d696e74206c696d697400000000000000000000000060448201526064016200019d565b6200021e33826200023c565b6200023560076200013a60201b62000e501760201c565b90565b5490565b6001600160a01b038216620002945760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016200019d565b6000818152600260205260409020546001600160a01b031615620002fb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016200019d565b6001600160a01b038216600090815260036020526040812080546001929062000326908490620004f9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003b457607f821691505b602082108103620003d557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200038457600081815260208120601f850160051c81016020861015620004045750805b601f850160051c820191505b81811015620004255782815560010162000410565b505050505050565b81516001600160401b0381111562000449576200044962000389565b62000461816200045a84546200039f565b84620003db565b602080601f831160018114620004995760008415620004805750858301515b600019600386901b1c1916600185901b17855562000425565b600085815260208120601f198616915b82811015620004ca57888601518255948401946001909101908401620004a9565b5085821015620004e95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156200051b57634e487b7160e01b600052601160045260246000fd5b92915050565b611c5280620005316000396000f3fe60806040526004361061019c5760003560e01c806384c4bd4b116100ec578063a740fc871161008a578063e67876fe11610064578063e67876fe14610452578063e8a3d48514610469578063e985e9c51461047e578063f2fde38b1461049e57600080fd5b8063a740fc87146103fb578063b88d4fde14610412578063c87b56dd1461043257600080fd5b8063985e49f4116100c6578063985e49f4146103a95780639cb8a26a146103be578063a22cb465146103c6578063a49ff5b2146103e657600080fd5b806384c4bd4b1461035f5780638da5cb5b1461037657806395d89b411461039457600080fd5b80634bb309121161015957806370a082311161013357806370a08231146102e7578063715018a6146103155780637b47ec1a1461032a57806382345f991461034a57600080fd5b80634bb30912146102925780636352211e146102a75780636f3bffd2146102c757600080fd5b806301ffc9a7146101a157806306fdde03146101d6578063081812fc146101f8578063095ea7b31461023057806323b872dd1461025257806342842e0e14610272575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611585565b6104be565b60405190151581526020015b60405180910390f35b3480156101e257600080fd5b506101eb610510565b6040516101cd91906115ef565b34801561020457600080fd5b50610218610213366004611602565b6105a2565b6040516001600160a01b0390911681526020016101cd565b34801561023c57600080fd5b5061025061024b366004611632565b61063c565b005b34801561025e57600080fd5b5061025061026d36600461165c565b610751565b34801561027e57600080fd5b5061025061028d36600461165c565b6107ac565b34801561029e57600080fd5b506101eb6107c7565b3480156102b357600080fd5b506102186102c2366004611602565b6107d6565b3480156102d357600080fd5b506102506102e2366004611724565b61084d565b3480156102f357600080fd5b5061030761030236600461176d565b6108be565b6040519081526020016101cd565b34801561032157600080fd5b50610250610945565b34801561033657600080fd5b50610250610345366004611602565b61097b565b34801561035657600080fd5b50610307610a15565b34801561036b57600080fd5b506007546103079081565b34801561038257600080fd5b506006546001600160a01b0316610218565b3480156103a057600080fd5b506101eb610ac7565b3480156103b557600080fd5b50610307610ad6565b610250610b67565b3480156103d257600080fd5b506102506103e1366004611788565b610b9f565b3480156103f257600080fd5b50610307610bae565b34801561040757600080fd5b506009546103079081565b34801561041e57600080fd5b5061025061042d3660046117c4565b610c0f565b34801561043e57600080fd5b506101eb61044d366004611602565b610c71565b34801561045e57600080fd5b506008546103079081565b34801561047557600080fd5b506101eb610d6a565b34801561048a57600080fd5b506101c1610499366004611840565b610d8a565b3480156104aa57600080fd5b506102506104b936600461176d565b610db8565b60006001600160e01b031982166380ac58cd60e01b14806104ef57506001600160e01b03198216635b5e139f60e01b145b8061050a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461051f90611873565b80601f016020809104026020016040519081016040528092919081815260200182805461054b90611873565b80156105985780601f1061056d57610100808354040283529160200191610598565b820191906000526020600020905b81548152906001019060200180831161057b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106205760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610647826107d6565b9050806001600160a01b0316836001600160a01b0316036106b45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610617565b336001600160a01b03821614806106d057506106d08133610d8a565b6107425760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610617565b61074c8383610e5d565b505050565b6006546001600160a01b0316331461077b5760405162461bcd60e51b8152600401610617906118ad565b6107853382610ecb565b6107a15760405162461bcd60e51b8152600401610617906118e2565b61074c838383610fa2565b61074c83838360405180602001604052806000815250610c0f565b6060600a805461051f90611873565b6000818152600260205260408120546001600160a01b03168061050a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610617565b6006546001600160a01b031633146108775760405162461bcd60e51b8152600401610617906118ad565b600a6108838282611981565b507fd6666840ba3b0939cf78131cb173315c425a3385a30b8921494500ca2b49f34a816040516108b391906115ef565b60405180910390a150565b60006001600160a01b0382166109295760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610617565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b0316331461096f5760405162461bcd60e51b8152600401610617906118ad565b610979600061113e565b565b6006546001600160a01b031633146109a55760405162461bcd60e51b8152600401610617906118ad565b6000818152600260205260409020546001600160a01b0316610a095760405162461bcd60e51b815260206004820152601760248201527f6275726e3a206e6f6e6578697374656e7420746f6b656e0000000000000000006044820152606401610617565b610a1281611190565b50565b6006546000906001600160a01b03163314610a425760405162461bcd60e51b8152600401610617906118ad565b612710610a4e60085490565b610a589190611a57565b9050610a676127106002611a6a565b8110610aac5760405162461bcd60e51b8152602060048201526014602482015273121a5d081d5c1c195c881b5a5b9d081b1a5b5a5d60621b6044820152606401610617565b610ab6338261122b565b610ac4600880546001019055565b90565b60606001805461051f90611873565b6006546000906001600160a01b03163314610b035760405162461bcd60e51b8152600401610617906118ad565b506007546127108110610b4f5760405162461bcd60e51b8152602060048201526014602482015273121a5d081d5c1c195c881b5a5b9d081b1a5b5a5d60621b6044820152606401610617565b610b59338261122b565b610ac4600780546001019055565b6006546001600160a01b03163314610b915760405162461bcd60e51b8152600401610617906118ad565b6006546001600160a01b0316ff5b610baa33838361136d565b5050565b6006546000906001600160a01b03163314610bdb5760405162461bcd60e51b8152600401610617906118ad565b610be86127106002611a6a565b600954610bf59190611a57565b9050610c01338261122b565b610ac4600980546001019055565b6006546001600160a01b03163314610c395760405162461bcd60e51b8152600401610617906118ad565b610c433383610ecb565b610c5f5760405162461bcd60e51b8152600401610617906118e2565b610c6b8484848461143b565b50505050565b6000818152600260205260409020546060906001600160a01b0316610cea5760405162461bcd60e51b815260206004820152602960248201527f746f6b656e5552493a2055524920717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610617565b612710821015610d1357604051806060016040528060358152602001611b496035913992915050565b610d206127106002611a6a565b821015610d4657604051806060016040528060358152602001611b7e6035913992915050565b604051806060016040528060358152602001611bb36035913992915050565b919050565b6060604051806060016040528060358152602001611be860359139905090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6006546001600160a01b03163314610de25760405162461bcd60e51b8152600401610617906118ad565b6001600160a01b038116610e475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610617565b610a128161113e565b80546001019055565b5490565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e92826107d6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316610f445760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610617565b6000610f4f836107d6565b9050806001600160a01b0316846001600160a01b03161480610f765750610f768185610d8a565b80610f9a5750836001600160a01b0316610f8f846105a2565b6001600160a01b0316145b949350505050565b826001600160a01b0316610fb5826107d6565b6001600160a01b0316146110195760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610617565b6001600160a01b03821661107b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610617565b611086600082610e5d565b6001600160a01b03831660009081526003602052604081208054600192906110af908490611a89565b90915550506001600160a01b03821660009081526003602052604081208054600192906110dd908490611a57565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061119b826107d6565b90506111a8600083610e5d565b6001600160a01b03811660009081526003602052604081208054600192906111d1908490611a89565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112815760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610617565b6000818152600260205260409020546001600160a01b0316156112e65760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610617565b6001600160a01b038216600090815260036020526040812080546001929061130f908490611a57565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b0316036113ce5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610617565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611446848484610fa2565b6114528484848461146e565b610c6b5760405162461bcd60e51b815260040161061790611a9c565b60006001600160a01b0384163b1561156457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906114b2903390899088908890600401611aee565b6020604051808303816000875af19250505080156114ed575060408051601f3d908101601f191682019092526114ea91810190611b2b565b60015b61154a573d80801561151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b5080516000036115425760405162461bcd60e51b815260040161061790611a9c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f9a565b506001949350505050565b6001600160e01b031981168114610a1257600080fd5b60006020828403121561159757600080fd5b81356115a28161156f565b9392505050565b6000815180845260005b818110156115cf576020818501810151868301820152016115b3565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006115a260208301846115a9565b60006020828403121561161457600080fd5b5035919050565b80356001600160a01b0381168114610d6557600080fd5b6000806040838503121561164557600080fd5b61164e8361161b565b946020939093013593505050565b60008060006060848603121561167157600080fd5b61167a8461161b565b92506116886020850161161b565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156116c9576116c9611698565b604051601f8501601f19908116603f011681019082821181831017156116f1576116f1611698565b8160405280935085815286868601111561170a57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561173657600080fd5b813567ffffffffffffffff81111561174d57600080fd5b8201601f8101841361175e57600080fd5b610f9a848235602084016116ae565b60006020828403121561177f57600080fd5b6115a28261161b565b6000806040838503121561179b57600080fd5b6117a48361161b565b9150602083013580151581146117b957600080fd5b809150509250929050565b600080600080608085870312156117da57600080fd5b6117e38561161b565b93506117f16020860161161b565b925060408501359150606085013567ffffffffffffffff81111561181457600080fd5b8501601f8101871361182557600080fd5b611834878235602084016116ae565b91505092959194509250565b6000806040838503121561185357600080fd5b61185c8361161b565b915061186a6020840161161b565b90509250929050565b600181811c9082168061188757607f821691505b6020821081036118a757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b601f82111561074c57600081815260208120601f850160051c8101602086101561195a5750805b601f850160051c820191505b8181101561197957828155600101611966565b505050505050565b815167ffffffffffffffff81111561199b5761199b611698565b6119af816119a98454611873565b84611933565b602080601f8311600181146119e457600084156119cc5750858301515b600019600386901b1c1916600185901b178555611979565b600085815260208120601f198616915b82811015611a13578886015182559484019460019091019084016119f4565b5085821015611a315787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8082018082111561050a5761050a611a41565b6000816000190483118215151615611a8457611a84611a41565b500290565b8181038181111561050a5761050a611a41565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611b21908301846115a9565b9695505050505050565b600060208284031215611b3d57600080fd5b81516115a28161156f56fe697066733a2f2f516d57393438614e34546a6834654c6b41416f386f733141634d32464a6a413436717461456646416e794e597a59697066733a2f2f516d523331663241556f6b433551794c587a4459556a7935745669626b6a625734766f56754d425a66724e565538697066733a2f2f516d646153546146365758705957694c35636b3763736d5479354557487a595647796b4a5a4e3754523935645353697066733a2f2f516d5567644c7650766a754847664d73754b3148326a467067357231514e63384a655779587952774b5038705466a2646970667358221220e2ef3122a6cb2d5c73f6e9c50a0261a53c008746506d8db79d5ea5e188d01d8a64736f6c63430008100033697066733a2f2f516d58584c464265536a5841774168626f31333434774a536a4c676f557266554b394c4535376f56756261525270"; public static String erc20ContractCode = "0x60806040523480156200001157600080fd5b506040518060400160405280600d81526020017f4157207465737420746f6b656e000000000000000000000000000000000000008152506040518060400160405280600481526020017f415754540000000000000000000000000000000000000000000000000000000081525081600390816200008f9190620004e3565b508060049081620000a19190620004e3565b505050620000e333620000b9620000e960201b60201c565b600a620000c791906200075a565b62989680620000d79190620007ab565b620000f260201b60201c565b620008e2565b60006012905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000164576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200015b9062000857565b60405180910390fd5b62000178600083836200025f60201b60201c565b80600260008282546200018c919062000879565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200023f9190620008c5565b60405180910390a36200025b600083836200026460201b60201c565b5050565b505050565b505050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002eb57607f821691505b602082108103620003015762000300620002a3565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200036b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200032c565b6200037786836200032c565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003c4620003be620003b8846200038f565b62000399565b6200038f565b9050919050565b6000819050919050565b620003e083620003a3565b620003f8620003ef82620003cb565b84845462000339565b825550505050565b600090565b6200040f62000400565b6200041c818484620003d5565b505050565b5b8181101562000444576200043860008262000405565b60018101905062000422565b5050565b601f82111562000493576200045d8162000307565b62000468846200031c565b8101602085101562000478578190505b6200049062000487856200031c565b83018262000421565b50505b505050565b600082821c905092915050565b6000620004b86000198460080262000498565b1980831691505092915050565b6000620004d38383620004a5565b9150826002028217905092915050565b620004ee8262000269565b67ffffffffffffffff8111156200050a576200050962000274565b5b620005168254620002d2565b6200052382828562000448565b600060209050601f8311600181146200055b576000841562000546578287015190505b620005528582620004c5565b865550620005c2565b601f1984166200056b8662000307565b60005b8281101562000595578489015182556001820191506020850194506020810190506200056e565b86831015620005b55784890151620005b1601f891682620004a5565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115620006585780860481111562000630576200062f620005ca565b5b6001851615620006405780820291505b80810290506200065085620005f9565b945062000610565b94509492505050565b60008262000673576001905062000746565b8162000683576000905062000746565b81600181146200069c5760028114620006a757620006dd565b600191505062000746565b60ff841115620006bc57620006bb620005ca565b5b8360020a915084821115620006d657620006d5620005ca565b5b5062000746565b5060208310610133831016604e8410600b8410161715620007175782820a905083811115620007115762000710620005ca565b5b62000746565b62000726848484600162000606565b9250905081840481111562000740576200073f620005ca565b5b81810290505b9392505050565b600060ff82169050919050565b600062000767826200038f565b915062000774836200074d565b9250620007a37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000661565b905092915050565b6000620007b8826200038f565b9150620007c5836200038f565b9250828202620007d5816200038f565b91508282048414831517620007ef57620007ee620005ca565b5b5092915050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b60006200083f601f83620007f6565b91506200084c8262000807565b602082019050919050565b60006020820190508181036000830152620008728162000830565b9050919050565b600062000886826200038f565b915062000893836200038f565b9250828201905080821115620008ae57620008ad620005ca565b5b92915050565b620008bf816200038f565b82525050565b6000602082019050620008dc6000830184620008b4565b92915050565b61122f80620008f26000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212206637373f9ebc605cdad9359cb179c62d11a616e2ad65618a36fc5bb768793f6364736f6c63430008110033"; + public static String erc721ContractCode = "0x60806040523480156200001157600080fd5b506040518060400160405280600681526020017f4d79204e465400000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f4d4e46540000000000000000000000000000000000000000000000000000000081525081600090816200008f919062000412565b508060019081620000a1919062000412565b505050620000c4620000b8620000ca60201b60201c565b620000d260201b60201c565b620004f9565b600033905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200021a57607f821691505b60208210810362000230576200022f620001d2565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200029a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200025b565b620002a686836200025b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002f3620002ed620002e784620002be565b620002c8565b620002be565b9050919050565b6000819050919050565b6200030f83620002d2565b620003276200031e82620002fa565b84845462000268565b825550505050565b600090565b6200033e6200032f565b6200034b81848462000304565b505050565b5b8181101562000373576200036760008262000334565b60018101905062000351565b5050565b601f821115620003c2576200038c8162000236565b62000397846200024b565b81016020851015620003a7578190505b620003bf620003b6856200024b565b83018262000350565b50505b505050565b600082821c905092915050565b6000620003e760001984600802620003c7565b1980831691505092915050565b6000620004028383620003d4565b9150826002028217905092915050565b6200041d8262000198565b67ffffffffffffffff811115620004395762000438620001a3565b5b62000445825462000201565b6200045282828562000377565b600060209050601f8311600181146200048a576000841562000475578287015190505b620004818582620003f4565b865550620004f1565b601f1984166200049a8662000236565b60005b82811015620004c4578489015182556001820191506020850194506020810190506200049d565b86831015620004e45784890151620004e0601f891682620003d4565b8355505b6001600288020188555050505b505050505050565b612a3680620005096000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a2578063a22cb46511610071578063a22cb465146102a4578063b88d4fde146102c0578063c87b56dd146102dc578063e985e9c51461030c578063f2fde38b1461033c5761010b565b806370a082311461022e578063715018a61461025e5780638da5cb5b1461026857806395d89b41146102865761010b565b806323b872dd116100de57806323b872dd146101aa57806340d097c3146101c657806342842e0e146101e25780636352211e146101fe5761010b565b806301ffc9a71461011057806306fdde0314610140578063081812fc1461015e578063095ea7b31461018e575b600080fd5b61012a60048036038101906101259190611b9d565b610358565b6040516101379190611be5565b60405180910390f35b61014861043a565b6040516101559190611c90565b60405180910390f35b61017860048036038101906101739190611ce8565b6104cc565b6040516101859190611d56565b60405180910390f35b6101a860048036038101906101a39190611d9d565b610512565b005b6101c460048036038101906101bf9190611ddd565b610629565b005b6101e060048036038101906101db9190611e30565b610689565b005b6101fc60048036038101906101f79190611ddd565b6106b7565b005b61021860048036038101906102139190611ce8565b6106d7565b6040516102259190611d56565b60405180910390f35b61024860048036038101906102439190611e30565b61075d565b6040516102559190611e6c565b60405180910390f35b610266610814565b005b610270610828565b60405161027d9190611d56565b60405180910390f35b61028e610852565b60405161029b9190611c90565b60405180910390f35b6102be60048036038101906102b99190611eb3565b6108e4565b005b6102da60048036038101906102d59190612028565b6108fa565b005b6102f660048036038101906102f19190611ce8565b61095c565b6040516103039190611c90565b60405180910390f35b610326600480360381019061032191906120ab565b6109c4565b6040516103339190611be5565b60405180910390f35b61035660048036038101906103519190611e30565b610a58565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061042357507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610433575061043282610adb565b5b9050919050565b6060600080546104499061211a565b80601f01602080910402602001604051908101604052809291908181526020018280546104759061211a565b80156104c25780601f10610497576101008083540402835291602001916104c2565b820191906000526020600020905b8154815290600101906020018083116104a557829003601f168201915b5050505050905090565b60006104d782610b45565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061051d826106d7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361058d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610584906121bd565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166105ac610b90565b73ffffffffffffffffffffffffffffffffffffffff1614806105db57506105da816105d5610b90565b6109c4565b5b61061a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106119061224f565b60405180910390fd5b6106248383610b98565b505050565b61063a610634610b90565b82610c51565b610679576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610670906122e1565b60405180910390fd5b610684838383610ce6565b505050565b610691610fdf565b600061069d600761105d565b90506106a9600761106b565b6106b38282611081565b5050565b6106d2838383604051806020016040528060008152506108fa565b505050565b6000806106e38361109f565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074b9061234d565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c4906123df565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61081c610fdf565b61082660006110dc565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600180546108619061211a565b80601f016020809104026020016040519081016040528092919081815260200182805461088d9061211a565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b5050505050905090565b6108f66108ef610b90565b83836111a2565b5050565b61090b610905610b90565b83610c51565b61094a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610941906122e1565b60405180910390fd5b6109568484848461130e565b50505050565b606061096782610b45565b600061097161136a565b9050600081511161099157604051806020016040528060008152506109bc565b8061099b84611381565b6040516020016109ac92919061243b565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610a60610fdf565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610acf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac6906124d1565b60405180910390fd5b610ad8816110dc565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610b4e8161144f565b610b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b849061234d565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16610c0b836106d7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610c5d836106d7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610c9f5750610c9e81856109c4565b5b80610cdd57508373ffffffffffffffffffffffffffffffffffffffff16610cc5846104cc565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16610d06826106d7565b73ffffffffffffffffffffffffffffffffffffffff1614610d5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5390612563565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610dcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc2906125f5565b60405180910390fd5b610dd88383836001611490565b8273ffffffffffffffffffffffffffffffffffffffff16610df8826106d7565b73ffffffffffffffffffffffffffffffffffffffff1614610e4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4590612563565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610fda83838360016115b6565b505050565b610fe7610b90565b73ffffffffffffffffffffffffffffffffffffffff16611005610828565b73ffffffffffffffffffffffffffffffffffffffff161461105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105290612661565b60405180910390fd5b565b600081600001549050919050565b6001816000016000828254019250508190555050565b61109b8282604051806020016040528060008152506115bc565b5050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611210576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611207906126cd565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113019190611be5565b60405180910390a3505050565b611319848484610ce6565b61132584848484611617565b611364576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135b9061275f565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b6060600060016113908461179e565b01905060008167ffffffffffffffff8111156113af576113ae611efd565b5b6040519080825280601f01601f1916602001820160405280156113e15781602001600182028036833780820191505090505b509050600082602001820190505b600115611444578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816114385761143761277f565b5b049450600085036113ef575b819350505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166114718361109f565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b60018111156115b057600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146115245780600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461151c91906127dd565b925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146115af5780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115a79190612811565b925050819055505b5b50505050565b50505050565b6115c683836118f1565b6115d36000848484611617565b611612576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116099061275f565b60405180910390fd5b505050565b60006116388473ffffffffffffffffffffffffffffffffffffffff16611b0e565b15611791578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611661610b90565b8786866040518563ffffffff1660e01b8152600401611683949392919061289a565b6020604051808303816000875af19250505080156116bf57506040513d601f19601f820116820180604052508101906116bc91906128fb565b60015b611741573d80600081146116ef576040519150601f19603f3d011682016040523d82523d6000602084013e6116f4565b606091505b506000815103611739576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117309061275f565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611796565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106117fc577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816117f2576117f161277f565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611839576d04ee2d6d415b85acef8100000000838161182f5761182e61277f565b5b0492506020810190505b662386f26fc10000831061186857662386f26fc10000838161185e5761185d61277f565b5b0492506010810190505b6305f5e1008310611891576305f5e10083816118875761188661277f565b5b0492506008810190505b61271083106118b65761271083816118ac576118ab61277f565b5b0492506004810190505b606483106118d957606483816118cf576118ce61277f565b5b0492506002810190505b600a83106118e8576001810190505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611960576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195790612974565b60405180910390fd5b6119698161144f565b156119a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a0906129e0565b60405180910390fd5b6119b7600083836001611490565b6119c08161144f565b15611a00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f7906129e0565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611b0a6000838360016115b6565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611b7a81611b45565b8114611b8557600080fd5b50565b600081359050611b9781611b71565b92915050565b600060208284031215611bb357611bb2611b3b565b5b6000611bc184828501611b88565b91505092915050565b60008115159050919050565b611bdf81611bca565b82525050565b6000602082019050611bfa6000830184611bd6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611c3a578082015181840152602081019050611c1f565b60008484015250505050565b6000601f19601f8301169050919050565b6000611c6282611c00565b611c6c8185611c0b565b9350611c7c818560208601611c1c565b611c8581611c46565b840191505092915050565b60006020820190508181036000830152611caa8184611c57565b905092915050565b6000819050919050565b611cc581611cb2565b8114611cd057600080fd5b50565b600081359050611ce281611cbc565b92915050565b600060208284031215611cfe57611cfd611b3b565b5b6000611d0c84828501611cd3565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d4082611d15565b9050919050565b611d5081611d35565b82525050565b6000602082019050611d6b6000830184611d47565b92915050565b611d7a81611d35565b8114611d8557600080fd5b50565b600081359050611d9781611d71565b92915050565b60008060408385031215611db457611db3611b3b565b5b6000611dc285828601611d88565b9250506020611dd385828601611cd3565b9150509250929050565b600080600060608486031215611df657611df5611b3b565b5b6000611e0486828701611d88565b9350506020611e1586828701611d88565b9250506040611e2686828701611cd3565b9150509250925092565b600060208284031215611e4657611e45611b3b565b5b6000611e5484828501611d88565b91505092915050565b611e6681611cb2565b82525050565b6000602082019050611e816000830184611e5d565b92915050565b611e9081611bca565b8114611e9b57600080fd5b50565b600081359050611ead81611e87565b92915050565b60008060408385031215611eca57611ec9611b3b565b5b6000611ed885828601611d88565b9250506020611ee985828601611e9e565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611f3582611c46565b810181811067ffffffffffffffff82111715611f5457611f53611efd565b5b80604052505050565b6000611f67611b31565b9050611f738282611f2c565b919050565b600067ffffffffffffffff821115611f9357611f92611efd565b5b611f9c82611c46565b9050602081019050919050565b82818337600083830152505050565b6000611fcb611fc684611f78565b611f5d565b905082815260208101848484011115611fe757611fe6611ef8565b5b611ff2848285611fa9565b509392505050565b600082601f83011261200f5761200e611ef3565b5b813561201f848260208601611fb8565b91505092915050565b6000806000806080858703121561204257612041611b3b565b5b600061205087828801611d88565b945050602061206187828801611d88565b935050604061207287828801611cd3565b925050606085013567ffffffffffffffff81111561209357612092611b40565b5b61209f87828801611ffa565b91505092959194509250565b600080604083850312156120c2576120c1611b3b565b5b60006120d085828601611d88565b92505060206120e185828601611d88565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061213257607f821691505b602082108103612145576121446120eb565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006121a7602183611c0b565b91506121b28261214b565b604082019050919050565b600060208201905081810360008301526121d68161219a565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000612239603d83611c0b565b9150612244826121dd565b604082019050919050565b600060208201905081810360008301526122688161222c565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b60006122cb602d83611c0b565b91506122d68261226f565b604082019050919050565b600060208201905081810360008301526122fa816122be565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000612337601883611c0b565b915061234282612301565b602082019050919050565b600060208201905081810360008301526123668161232a565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b60006123c9602983611c0b565b91506123d48261236d565b604082019050919050565b600060208201905081810360008301526123f8816123bc565b9050919050565b600081905092915050565b600061241582611c00565b61241f81856123ff565b935061242f818560208601611c1c565b80840191505092915050565b6000612447828561240a565b9150612453828461240a565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006124bb602683611c0b565b91506124c68261245f565b604082019050919050565b600060208201905081810360008301526124ea816124ae565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061254d602583611c0b565b9150612558826124f1565b604082019050919050565b6000602082019050818103600083015261257c81612540565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006125df602483611c0b565b91506125ea82612583565b604082019050919050565b6000602082019050818103600083015261260e816125d2565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061264b602083611c0b565b915061265682612615565b602082019050919050565b6000602082019050818103600083015261267a8161263e565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006126b7601983611c0b565b91506126c282612681565b602082019050919050565b600060208201905081810360008301526126e6816126aa565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000612749603283611c0b565b9150612754826126ed565b604082019050919050565b600060208201905081810360008301526127788161273c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006127e882611cb2565b91506127f383611cb2565b925082820390508181111561280b5761280a6127ae565b5b92915050565b600061281c82611cb2565b915061282783611cb2565b925082820190508082111561283f5761283e6127ae565b5b92915050565b600081519050919050565b600082825260208201905092915050565b600061286c82612845565b6128768185612850565b9350612886818560208601611c1c565b61288f81611c46565b840191505092915050565b60006080820190506128af6000830187611d47565b6128bc6020830186611d47565b6128c96040830185611e5d565b81810360608301526128db8184612861565b905095945050505050565b6000815190506128f581611b71565b92915050565b60006020828403121561291157612910611b3b565b5b600061291f848285016128e6565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061295e602083611c0b565b915061296982612928565b602082019050919050565b6000602082019050818103600083015261298d81612951565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006129ca601c83611c0b565b91506129d582612994565b602082019050919050565b600060208201905081810360008301526129f9816129bd565b905091905056fea26469706673582212209dfaffe25a1a778ff6697054af33c598cbd6958e3d6b785a5002fc4ce6fce45064736f6c63430008110033"; } diff --git a/app/src/androidTest/java/com/alphawallet/app/steps/Steps.java b/app/src/androidTest/java/com/alphawallet/app/steps/Steps.java index 3c519b4965..c16115d617 100644 --- a/app/src/androidTest/java/com/alphawallet/app/steps/Steps.java +++ b/app/src/androidTest/java/com/alphawallet/app/steps/Steps.java @@ -128,6 +128,25 @@ public static void sendBalanceTo(String tokenSymbol, String amountStr, String re } } + public static void sendNFTTo(String collectionName, String nftName, String receiverAddress) + { + click(withId(R.id.nav_wallet_text)); + click(withSubstring(collectionName)); + click(withSubstring(nftName)); + click(withText("Transfer")); + onView(withHint(R.string.recipient_address)).perform(replaceText(receiverAddress)); + click(withId(R.string.action_transfer)); + try + { + click(withId(R.string.action_confirm)); + } + catch (Error | Exception e) + { + waitForLoadingComplete("Calculating Gas Limit"); + click(withId(R.string.action_confirm)); + } + } + private static void ensureBalanceFetched() { shouldSee("Ganache");