From 31bdfa2490ae0a9f14aa304f95cf2bbabda78d9e Mon Sep 17 00:00:00 2001 From: Quinn Purdy Date: Mon, 18 Dec 2023 09:25:24 -0500 Subject: [PATCH] Cache config. Pass 'X-Access-Key' header (builder api key) when making IsValidSignature request --- .../SequenceExamples/Scripts/UI/LoginPanel.cs | 3 +- Assets/SequenceSDK/Config/SequenceConfig.cs | 11 +- Assets/SequenceSDK/WaaS/HttpClient.cs | 1 + Assets/SequenceSDK/WaaS/IntentSender.cs | 5 +- Assets/SequenceSDK/WaaS/WaaSLogin.cs | 9 +- Assets/SequenceSDK/WaaS/WaaSWallet.cs | 4 +- ProjectSettings/EditorBuildSettings.asset | 4 +- .../DemoGameState.sol/DemoGameState.dbg.json | 4 + .../DemoGameState.sol/DemoGameState.json | 439 ++++++++++++++++++ testchain/contracts/DemoGameState.sol | 46 ++ 10 files changed, 508 insertions(+), 18 deletions(-) create mode 100644 testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.dbg.json create mode 100644 testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.json create mode 100644 testchain/contracts/DemoGameState.sol diff --git a/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs b/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs index 2f2d1857..31c9a182 100644 --- a/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs +++ b/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs @@ -33,7 +33,8 @@ protected override void Awake() config.IdentityPoolId, config.KMSEncryptionKeyId, config.CognitoClientId), - config.WaaSProjectId, config.WaaSVersion, config.BuilderAPIKey_Prod); + config.WaaSProjectId, + config.WaaSVersion); SetupLoginHandler(loginHandler); _loginSuccessPage = GetComponentInChildren(); diff --git a/Assets/SequenceSDK/Config/SequenceConfig.cs b/Assets/SequenceSDK/Config/SequenceConfig.cs index 5952d9de..0d019d64 100644 --- a/Assets/SequenceSDK/Config/SequenceConfig.cs +++ b/Assets/SequenceSDK/Config/SequenceConfig.cs @@ -23,16 +23,21 @@ public class SequenceConfig : ScriptableObject public string BuilderAPIKey_Prod; public string BuilderAPIKey_Dev; + private static SequenceConfig _config; + public static SequenceConfig GetConfig() { - SequenceConfig config = Resources.Load("SequenceConfig"); + if (_config == null) + { + _config = Resources.Load("SequenceConfig"); + } - if (config == null) + if (_config == null) { throw new Exception("SequenceConfig not found. Make sure to create and configure it and place it at the root of your Resources folder. Create it from the top bar with Assets > Create > Sequence > SequenceConfig"); } - return config; + return _config; } } } \ No newline at end of file diff --git a/Assets/SequenceSDK/WaaS/HttpClient.cs b/Assets/SequenceSDK/WaaS/HttpClient.cs index ad54f3ea..ae9e4d34 100644 --- a/Assets/SequenceSDK/WaaS/HttpClient.cs +++ b/Assets/SequenceSDK/WaaS/HttpClient.cs @@ -29,6 +29,7 @@ public HttpClient(string url) this._defaultHeaders = new Dictionary(); _defaultHeaders["Content-Type"] = "application/json"; _defaultHeaders["Accept"] = "application/json"; + _defaultHeaders["X-Access-Token"] = SequenceConfig.GetConfig().BuilderAPIKey_Prod; } public void AddDefaultHeader(string key, string value) diff --git a/Assets/SequenceSDK/WaaS/IntentSender.cs b/Assets/SequenceSDK/WaaS/IntentSender.cs index 6d6f7634..a842e671 100644 --- a/Assets/SequenceSDK/WaaS/IntentSender.cs +++ b/Assets/SequenceSDK/WaaS/IntentSender.cs @@ -23,9 +23,8 @@ public class IntentSender private Wallet.IWallet _sessionWallet; private int _waasProjectId; private string _waasVersion; - private string _builderApiKey; - public IntentSender(HttpClient httpClient, DataKey dataKey, Wallet.IWallet sessionWallet, string sessionId, int waasProjectId, string waasVersion, string builderApiKey) + public IntentSender(HttpClient httpClient, DataKey dataKey, Wallet.IWallet sessionWallet, string sessionId, int waasProjectId, string waasVersion) { _httpClient = httpClient; _dataKey = dataKey; @@ -33,7 +32,6 @@ public IntentSender(HttpClient httpClient, DataKey dataKey, Wallet.IWallet sessi SessionId = sessionId; _waasProjectId = waasProjectId; _waasVersion = waasVersion; - _builderApiKey = builderApiKey; } public async Task SendIntent(T2 args) @@ -107,7 +105,6 @@ public async Task PostIntent(string payload, string path) WaaSPayload intent = new WaaSPayload(_dataKey.Ciphertext.ByteArrayToHexStringWithPrefix(), payloadCiphertext, signedPayload); Dictionary headers = new Dictionary(); headers.Add("X-Sequence-Tenant", _waasProjectId.ToString()); - headers.Add("X-Access-Token", _builderApiKey); if (typeof(T) == typeof(IntentReturn)) { var transactionReturn = await SendTransactionIntent(intent, headers); diff --git a/Assets/SequenceSDK/WaaS/WaaSLogin.cs b/Assets/SequenceSDK/WaaS/WaaSLogin.cs index f67fe87d..2e7ba5c2 100644 --- a/Assets/SequenceSDK/WaaS/WaaSLogin.cs +++ b/Assets/SequenceSDK/WaaS/WaaSLogin.cs @@ -23,14 +23,12 @@ public class WaaSLogin : ILogin private OpenIdAuthenticator _authenticator; private IValidator _validator; private string _challengeSession; - private string _builderApiKey; - public WaaSLogin(AWSConfig awsConfig, int waasProjectId, string waasVersion, string builderApiKey, IValidator validator = null) + public WaaSLogin(AWSConfig awsConfig, int waasProjectId, string waasVersion, IValidator validator = null) { _awsConfig = awsConfig; _waasProjectId = waasProjectId; _waasVersion = waasVersion; - _builderApiKey = builderApiKey; _authenticator = new OpenIdAuthenticator(); _authenticator.PlatformSpecificSetup(); Application.deepLinkActivated += _authenticator.HandleDeepLink; @@ -172,8 +170,7 @@ public async Task ConnectToWaaS(string idToken, LoginMethod method) sessionWallet, "Unknown", _waasProjectId, - _waasVersion, - _builderApiKey); + _waasVersion); string loginPayload = AssembleLoginPayloadJson(idToken, sessionWallet); try @@ -182,7 +179,7 @@ public async Task ConnectToWaaS(string idToken, LoginMethod method) string sessionId = registerSessionResponse.session.id; string walletAddress = registerSessionResponse.data.wallet; OnLoginSuccess?.Invoke(sessionId, walletAddress); - WaaSWallet wallet = new WaaSWallet(new Address(walletAddress), sessionId, sessionWallet, dataKey, _waasProjectId, _waasVersion, _builderApiKey); + WaaSWallet wallet = new WaaSWallet(new Address(walletAddress), sessionId, sessionWallet, dataKey, _waasProjectId, _waasVersion); WaaSWallet.OnWaaSWalletCreated?.Invoke(wallet); string email = Sequence.Authentication.JwtHelper.GetIdTokenJwtPayload(idToken).email; PlayerPrefs.SetInt(WaaSLoginMethod, (int)method); diff --git a/Assets/SequenceSDK/WaaS/WaaSWallet.cs b/Assets/SequenceSDK/WaaS/WaaSWallet.cs index fd2a76cb..a9851815 100644 --- a/Assets/SequenceSDK/WaaS/WaaSWallet.cs +++ b/Assets/SequenceSDK/WaaS/WaaSWallet.cs @@ -16,11 +16,11 @@ public class WaaSWallet : IWallet private HttpClient _httpClient; private IntentSender _intentSender; - public WaaSWallet(Address address, string sessionId, EthWallet sessionWallet, DataKey awsDataKey, int waasProjectId, string waasVersion, string builderApiKey) + public WaaSWallet(Address address, string sessionId, EthWallet sessionWallet, DataKey awsDataKey, int waasProjectId, string waasVersion) { _address = address; _httpClient = new HttpClient("https://api.sequence.app/rpc"); - _intentSender = new IntentSender(new HttpClient(WaaSLogin.WaaSWithAuthUrl), awsDataKey, sessionWallet, sessionId, waasProjectId, waasVersion, builderApiKey); + _intentSender = new IntentSender(new HttpClient(WaaSLogin.WaaSWithAuthUrl), awsDataKey, sessionWallet, sessionId, waasProjectId, waasVersion); SessionId = sessionId; } diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index a6a2065c..7ddd423c 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -8,10 +8,10 @@ EditorBuildSettings: - enabled: 0 path: guid: 00000000000000000000000000000000 - - enabled: 1 + - enabled: 0 path: Assets/SequenceExamples/Scenes/Demo.unity guid: 4dfb06a7c845a4513907bd9b1a335575 - - enabled: 0 + - enabled: 1 path: Assets/SequenceSDK/WaaS/Tests/WaaSEndToEndTests.unity guid: 6a48e95d2401d41339a9d99c129ae1f9 m_configObjects: diff --git a/testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.dbg.json b/testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.dbg.json new file mode 100644 index 00000000..e369f834 --- /dev/null +++ b/testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../build-info/b22672caa7657539aff4191873269232.json" +} diff --git a/testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.json b/testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.json new file mode 100644 index 00000000..009c857b --- /dev/null +++ b/testchain/artifacts/contracts/DemoGameState.sol/DemoGameState.json @@ -0,0 +1,439 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "DemoGameState", + "sourceName": "contracts/DemoGameState.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mintBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "on", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "newuri", + "type": "string" + } + ], + "name": "setURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_state", + "type": "bool" + } + ], + "name": "toggle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "updateOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b506040518060200160405280600081525062000033816200009660201b60201c565b5033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600360146101000a81548160ff0219169083151502179055506200040c565b8060029081620000a7919062000325565b5050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200012d57607f821691505b602082108103620001435762000142620000e5565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620001ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200016e565b620001b986836200016e565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200020662000200620001fa84620001d1565b620001db565b620001d1565b9050919050565b6000819050919050565b6200022283620001e5565b6200023a62000231826200020d565b8484546200017b565b825550505050565b600090565b6200025162000242565b6200025e81848462000217565b505050565b5b8181101562000286576200027a60008262000247565b60018101905062000264565b5050565b601f821115620002d5576200029f8162000149565b620002aa846200015e565b81016020851015620002ba578190505b620002d2620002c9856200015e565b83018262000263565b50505b505050565b600082821c905092915050565b6000620002fa60001984600802620002da565b1980831691505092915050565b6000620003158383620002e7565b9150826002028217905092915050565b6200033082620000ab565b67ffffffffffffffff8111156200034c576200034b620000b6565b5b62000358825462000114565b620003658282856200028a565b600060209050601f8311600181146200039d576000841562000388578287015190505b62000394858262000307565b86555062000404565b601f198416620003ad8662000149565b60005b82811015620003d757848901518255600182019150602085019450602081019050620003b0565b86831015620003f75784890151620003f3601f891682620002e7565b8355505b6001600288020188555050505b505050505050565b61327f806200041c6000396000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80634e1273f411610097578063a22cb46511610066578063a22cb46514610281578063e985e9c51461029d578063f242432a146102cd578063f2bf0f56146102e9576100f4565b80634e1273f4146101f957806367b7c03414610229578063880cdc31146102475780638da5cb5b14610263576100f4565b80630e89341c116100d35780630e89341c146101755780631b2ef1ca146101a55780631f7fdffa146101c15780632eb2c2d6146101dd576100f4565b8062fdd58e146100f957806301ffc9a71461012957806302fe530514610159575b600080fd5b610113600480360381019061010e9190611b62565b610305565b6040516101209190611bb1565b60405180910390f35b610143600480360381019061013e9190611c24565b6103cd565b6040516101509190611c6c565b60405180910390f35b610173600480360381019061016e9190611dcd565b6104af565b005b61018f600480360381019061018a9190611e16565b610515565b60405161019c9190611ec2565b60405180910390f35b6101bf60048036038101906101ba9190611ee4565b6105a9565b005b6101db60048036038101906101d6919061208d565b610617565b005b6101f760048036038101906101f29190612148565b610683565b005b610213600480360381019061020e91906122da565b610724565b6040516102209190612410565b60405180910390f35b61023161083d565b60405161023e9190611c6c565b60405180910390f35b610261600480360381019061025c9190612432565b610850565b005b61026b6108ee565b604051610278919061246e565b60405180910390f35b61029b600480360381019061029691906124b5565b610914565b005b6102b760048036038101906102b291906124f5565b61092a565b6040516102c49190611c6c565b60405180910390f35b6102e760048036038101906102e29190612535565b6109be565b005b61030360048036038101906102fe91906125cc565b610a5f565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610375576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036c9061266b565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061049857507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104a857506104a782610ad6565b5b9050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050957600080fd5b61051281610b40565b50565b606060028054610524906126ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610550906126ba565b801561059d5780601f106105725761010080835404028352916020019161059d565b820191906000526020600020905b81548152906001019060200180831161058057829003601f168201915b50505050509050919050565b600360149054906101000a900460ff166105f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ef90612737565b60405180910390fd5b61061333838360405180602001604052806000815250610b53565b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461067157600080fd5b61067d84848484610d03565b50505050565b61068b610f2f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806106d157506106d0856106cb610f2f565b61092a565b5b610710576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610707906127c9565b60405180910390fd5b61071d8585858585610f37565b5050505050565b6060815183511461076a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107619061285b565b60405180910390fd5b6000835167ffffffffffffffff81111561078757610786611ca2565b5b6040519080825280602002602001820160405280156107b55781602001602082028036833780820191505090505b50905060005b8451811015610832576108028582815181106107da576107d961287b565b5b60200260200101518583815181106107f5576107f461287b565b5b6020026020010151610305565b8282815181106108155761081461287b565b5b6020026020010181815250508061082b906128d9565b90506107bb565b508091505092915050565b600360149054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108aa57600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61092661091f610f2f565b8383611258565b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6109c6610f2f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610a0c5750610a0b85610a06610f2f565b61092a565b5b610a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a42906127c9565b60405180910390fd5b610a5885858585856113c4565b5050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab957600080fd5b80600360146101000a81548160ff02191690831515021790555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b8060029081610b4f9190612acd565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610bc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb990612c11565b60405180910390fd5b6000610bcc610f2f565b90506000610bd98561165f565b90506000610be68561165f565b9050610bf7836000898585896116d9565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c569190612c31565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051610cd4929190612c65565b60405180910390a4610ceb836000898585896116e1565b610cfa836000898989896116e9565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6990612c11565b60405180910390fd5b8151835114610db6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dad90612d00565b60405180910390fd5b6000610dc0610f2f565b9050610dd1816000878787876116d9565b60005b8451811015610e8a57838181518110610df057610def61287b565b5b6020026020010151600080878481518110610e0e57610e0d61287b565b5b6020026020010151815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e709190612c31565b925050819055508080610e82906128d9565b915050610dd4565b508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610f02929190612d20565b60405180910390a4610f19816000878787876116e1565b610f28816000878787876118c0565b5050505050565b600033905090565b8151835114610f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7290612d00565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe190612dc9565b60405180910390fd5b6000610ff4610f2f565b90506110048187878787876116d9565b60005b84518110156111b55760008582815181106110255761102461287b565b5b6020026020010151905060008583815181106110445761104361287b565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156110e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110dc90612e5b565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461119a9190612c31565b92505081905550505050806111ae906128d9565b9050611007565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161122c929190612d20565b60405180910390a46112428187878787876116e1565b6112508187878787876118c0565b505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036112c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112bd90612eed565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113b79190611c6c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142a90612dc9565b60405180910390fd5b600061143d610f2f565b9050600061144a8561165f565b905060006114578561165f565b90506114678389898585896116d9565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050858110156114fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f590612e5b565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115b39190612c31565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611630929190612c65565b60405180910390a4611646848a8a86868a6116e1565b611654848a8a8a8a8a6116e9565b505050505050505050565b60606000600167ffffffffffffffff81111561167e5761167d611ca2565b5b6040519080825280602002602001820160405280156116ac5781602001602082028036833780820191505090505b50905082816000815181106116c4576116c361287b565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b6117088473ffffffffffffffffffffffffffffffffffffffff16611a97565b156118b8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161174e959493929190612f62565b6020604051808303816000875af192505050801561178a57506040513d601f19601f820116820180604052508101906117879190612fd1565b60015b61182f5761179661300b565b806308c379a0036117f257506117aa61302d565b806117b557506117f4565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e99190611ec2565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118269061312f565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146118b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ad906131c1565b60405180910390fd5b505b505050505050565b6118df8473ffffffffffffffffffffffffffffffffffffffff16611a97565b15611a8f578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016119259594939291906131e1565b6020604051808303816000875af192505050801561196157506040513d601f19601f8201168201806040525081019061195e9190612fd1565b60015b611a065761196d61300b565b806308c379a0036119c9575061198161302d565b8061198c57506119cb565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c09190611ec2565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fd9061312f565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a84906131c1565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611af982611ace565b9050919050565b611b0981611aee565b8114611b1457600080fd5b50565b600081359050611b2681611b00565b92915050565b6000819050919050565b611b3f81611b2c565b8114611b4a57600080fd5b50565b600081359050611b5c81611b36565b92915050565b60008060408385031215611b7957611b78611ac4565b5b6000611b8785828601611b17565b9250506020611b9885828601611b4d565b9150509250929050565b611bab81611b2c565b82525050565b6000602082019050611bc66000830184611ba2565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611c0181611bcc565b8114611c0c57600080fd5b50565b600081359050611c1e81611bf8565b92915050565b600060208284031215611c3a57611c39611ac4565b5b6000611c4884828501611c0f565b91505092915050565b60008115159050919050565b611c6681611c51565b82525050565b6000602082019050611c816000830184611c5d565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611cda82611c91565b810181811067ffffffffffffffff82111715611cf957611cf8611ca2565b5b80604052505050565b6000611d0c611aba565b9050611d188282611cd1565b919050565b600067ffffffffffffffff821115611d3857611d37611ca2565b5b611d4182611c91565b9050602081019050919050565b82818337600083830152505050565b6000611d70611d6b84611d1d565b611d02565b905082815260208101848484011115611d8c57611d8b611c8c565b5b611d97848285611d4e565b509392505050565b600082601f830112611db457611db3611c87565b5b8135611dc4848260208601611d5d565b91505092915050565b600060208284031215611de357611de2611ac4565b5b600082013567ffffffffffffffff811115611e0157611e00611ac9565b5b611e0d84828501611d9f565b91505092915050565b600060208284031215611e2c57611e2b611ac4565b5b6000611e3a84828501611b4d565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611e7d578082015181840152602081019050611e62565b60008484015250505050565b6000611e9482611e43565b611e9e8185611e4e565b9350611eae818560208601611e5f565b611eb781611c91565b840191505092915050565b60006020820190508181036000830152611edc8184611e89565b905092915050565b60008060408385031215611efb57611efa611ac4565b5b6000611f0985828601611b4d565b9250506020611f1a85828601611b4d565b9150509250929050565b600067ffffffffffffffff821115611f3f57611f3e611ca2565b5b602082029050602081019050919050565b600080fd5b6000611f68611f6384611f24565b611d02565b90508083825260208201905060208402830185811115611f8b57611f8a611f50565b5b835b81811015611fb45780611fa08882611b4d565b845260208401935050602081019050611f8d565b5050509392505050565b600082601f830112611fd357611fd2611c87565b5b8135611fe3848260208601611f55565b91505092915050565b600067ffffffffffffffff82111561200757612006611ca2565b5b61201082611c91565b9050602081019050919050565b600061203061202b84611fec565b611d02565b90508281526020810184848401111561204c5761204b611c8c565b5b612057848285611d4e565b509392505050565b600082601f83011261207457612073611c87565b5b813561208484826020860161201d565b91505092915050565b600080600080608085870312156120a7576120a6611ac4565b5b60006120b587828801611b17565b945050602085013567ffffffffffffffff8111156120d6576120d5611ac9565b5b6120e287828801611fbe565b935050604085013567ffffffffffffffff81111561210357612102611ac9565b5b61210f87828801611fbe565b925050606085013567ffffffffffffffff8111156121305761212f611ac9565b5b61213c8782880161205f565b91505092959194509250565b600080600080600060a0868803121561216457612163611ac4565b5b600061217288828901611b17565b955050602061218388828901611b17565b945050604086013567ffffffffffffffff8111156121a4576121a3611ac9565b5b6121b088828901611fbe565b935050606086013567ffffffffffffffff8111156121d1576121d0611ac9565b5b6121dd88828901611fbe565b925050608086013567ffffffffffffffff8111156121fe576121fd611ac9565b5b61220a8882890161205f565b9150509295509295909350565b600067ffffffffffffffff82111561223257612231611ca2565b5b602082029050602081019050919050565b600061225661225184612217565b611d02565b9050808382526020820190506020840283018581111561227957612278611f50565b5b835b818110156122a2578061228e8882611b17565b84526020840193505060208101905061227b565b5050509392505050565b600082601f8301126122c1576122c0611c87565b5b81356122d1848260208601612243565b91505092915050565b600080604083850312156122f1576122f0611ac4565b5b600083013567ffffffffffffffff81111561230f5761230e611ac9565b5b61231b858286016122ac565b925050602083013567ffffffffffffffff81111561233c5761233b611ac9565b5b61234885828601611fbe565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61238781611b2c565b82525050565b6000612399838361237e565b60208301905092915050565b6000602082019050919050565b60006123bd82612352565b6123c7818561235d565b93506123d28361236e565b8060005b838110156124035781516123ea888261238d565b97506123f5836123a5565b9250506001810190506123d6565b5085935050505092915050565b6000602082019050818103600083015261242a81846123b2565b905092915050565b60006020828403121561244857612447611ac4565b5b600061245684828501611b17565b91505092915050565b61246881611aee565b82525050565b6000602082019050612483600083018461245f565b92915050565b61249281611c51565b811461249d57600080fd5b50565b6000813590506124af81612489565b92915050565b600080604083850312156124cc576124cb611ac4565b5b60006124da85828601611b17565b92505060206124eb858286016124a0565b9150509250929050565b6000806040838503121561250c5761250b611ac4565b5b600061251a85828601611b17565b925050602061252b85828601611b17565b9150509250929050565b600080600080600060a0868803121561255157612550611ac4565b5b600061255f88828901611b17565b955050602061257088828901611b17565b945050604061258188828901611b4d565b935050606061259288828901611b4d565b925050608086013567ffffffffffffffff8111156125b3576125b2611ac9565b5b6125bf8882890161205f565b9150509295509295909350565b6000602082840312156125e2576125e1611ac4565b5b60006125f0848285016124a0565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000612655602a83611e4e565b9150612660826125f9565b604082019050919050565b6000602082019050818103600083015261268481612648565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806126d257607f821691505b6020821081036126e5576126e461268b565b5b50919050565b7f44656d6f47616d6553746174653a206d696e74696e67206973206f6666000000600082015250565b6000612721601d83611e4e565b915061272c826126eb565b602082019050919050565b6000602082019050818103600083015261275081612714565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b60006127b3602e83611e4e565b91506127be82612757565b604082019050919050565b600060208201905081810360008301526127e2816127a6565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b6000612845602983611e4e565b9150612850826127e9565b604082019050919050565b6000602082019050818103600083015261287481612838565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006128e482611b2c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612916576129156128aa565b5b600182019050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026129837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612946565b61298d8683612946565b95508019841693508086168417925050509392505050565b6000819050919050565b60006129ca6129c56129c084611b2c565b6129a5565b611b2c565b9050919050565b6000819050919050565b6129e4836129af565b6129f86129f0826129d1565b848454612953565b825550505050565b600090565b612a0d612a00565b612a188184846129db565b505050565b5b81811015612a3c57612a31600082612a05565b600181019050612a1e565b5050565b601f821115612a8157612a5281612921565b612a5b84612936565b81016020851015612a6a578190505b612a7e612a7685612936565b830182612a1d565b50505b505050565b600082821c905092915050565b6000612aa460001984600802612a86565b1980831691505092915050565b6000612abd8383612a93565b9150826002028217905092915050565b612ad682611e43565b67ffffffffffffffff811115612aef57612aee611ca2565b5b612af982546126ba565b612b04828285612a40565b600060209050601f831160018114612b375760008415612b25578287015190505b612b2f8582612ab1565b865550612b97565b601f198416612b4586612921565b60005b82811015612b6d57848901518255600182019150602085019450602081019050612b48565b86831015612b8a5784890151612b86601f891682612a93565b8355505b6001600288020188555050505b505050505050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000612bfb602183611e4e565b9150612c0682612b9f565b604082019050919050565b60006020820190508181036000830152612c2a81612bee565b9050919050565b6000612c3c82611b2c565b9150612c4783611b2c565b9250828201905080821115612c5f57612c5e6128aa565b5b92915050565b6000604082019050612c7a6000830185611ba2565b612c876020830184611ba2565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000612cea602883611e4e565b9150612cf582612c8e565b604082019050919050565b60006020820190508181036000830152612d1981612cdd565b9050919050565b60006040820190508181036000830152612d3a81856123b2565b90508181036020830152612d4e81846123b2565b90509392505050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612db3602583611e4e565b9150612dbe82612d57565b604082019050919050565b60006020820190508181036000830152612de281612da6565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000612e45602a83611e4e565b9150612e5082612de9565b604082019050919050565b60006020820190508181036000830152612e7481612e38565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000612ed7602983611e4e565b9150612ee282612e7b565b604082019050919050565b60006020820190508181036000830152612f0681612eca565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000612f3482612f0d565b612f3e8185612f18565b9350612f4e818560208601611e5f565b612f5781611c91565b840191505092915050565b600060a082019050612f77600083018861245f565b612f84602083018761245f565b612f916040830186611ba2565b612f9e6060830185611ba2565b8181036080830152612fb08184612f29565b90509695505050505050565b600081519050612fcb81611bf8565b92915050565b600060208284031215612fe757612fe6611ac4565b5b6000612ff584828501612fbc565b91505092915050565b60008160e01c9050919050565b600060033d111561302a5760046000803e613027600051612ffe565b90505b90565b600060443d106130ba5761303f611aba565b60043d036004823e80513d602482011167ffffffffffffffff821117156130675750506130ba565b808201805167ffffffffffffffff81111561308557505050506130ba565b80602083010160043d0385018111156130a25750505050506130ba565b6130b182602001850186611cd1565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000613119603483611e4e565b9150613124826130bd565b604082019050919050565b600060208201905081810360008301526131488161310c565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006131ab602883611e4e565b91506131b68261314f565b604082019050919050565b600060208201905081810360008301526131da8161319e565b9050919050565b600060a0820190506131f6600083018861245f565b613203602083018761245f565b818103604083015261321581866123b2565b9050818103606083015261322981856123b2565b9050818103608083015261323d8184612f29565b9050969550505050505056fea2646970667358221220c4e6052fffd74856d8bc75d2885eac4ff03b7c4f17640054731bad2a24fa5c5a64736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f45760003560e01c80634e1273f411610097578063a22cb46511610066578063a22cb46514610281578063e985e9c51461029d578063f242432a146102cd578063f2bf0f56146102e9576100f4565b80634e1273f4146101f957806367b7c03414610229578063880cdc31146102475780638da5cb5b14610263576100f4565b80630e89341c116100d35780630e89341c146101755780631b2ef1ca146101a55780631f7fdffa146101c15780632eb2c2d6146101dd576100f4565b8062fdd58e146100f957806301ffc9a71461012957806302fe530514610159575b600080fd5b610113600480360381019061010e9190611b62565b610305565b6040516101209190611bb1565b60405180910390f35b610143600480360381019061013e9190611c24565b6103cd565b6040516101509190611c6c565b60405180910390f35b610173600480360381019061016e9190611dcd565b6104af565b005b61018f600480360381019061018a9190611e16565b610515565b60405161019c9190611ec2565b60405180910390f35b6101bf60048036038101906101ba9190611ee4565b6105a9565b005b6101db60048036038101906101d6919061208d565b610617565b005b6101f760048036038101906101f29190612148565b610683565b005b610213600480360381019061020e91906122da565b610724565b6040516102209190612410565b60405180910390f35b61023161083d565b60405161023e9190611c6c565b60405180910390f35b610261600480360381019061025c9190612432565b610850565b005b61026b6108ee565b604051610278919061246e565b60405180910390f35b61029b600480360381019061029691906124b5565b610914565b005b6102b760048036038101906102b291906124f5565b61092a565b6040516102c49190611c6c565b60405180910390f35b6102e760048036038101906102e29190612535565b6109be565b005b61030360048036038101906102fe91906125cc565b610a5f565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610375576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036c9061266b565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061049857507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104a857506104a782610ad6565b5b9050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050957600080fd5b61051281610b40565b50565b606060028054610524906126ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610550906126ba565b801561059d5780601f106105725761010080835404028352916020019161059d565b820191906000526020600020905b81548152906001019060200180831161058057829003601f168201915b50505050509050919050565b600360149054906101000a900460ff166105f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ef90612737565b60405180910390fd5b61061333838360405180602001604052806000815250610b53565b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461067157600080fd5b61067d84848484610d03565b50505050565b61068b610f2f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806106d157506106d0856106cb610f2f565b61092a565b5b610710576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610707906127c9565b60405180910390fd5b61071d8585858585610f37565b5050505050565b6060815183511461076a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107619061285b565b60405180910390fd5b6000835167ffffffffffffffff81111561078757610786611ca2565b5b6040519080825280602002602001820160405280156107b55781602001602082028036833780820191505090505b50905060005b8451811015610832576108028582815181106107da576107d961287b565b5b60200260200101518583815181106107f5576107f461287b565b5b6020026020010151610305565b8282815181106108155761081461287b565b5b6020026020010181815250508061082b906128d9565b90506107bb565b508091505092915050565b600360149054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108aa57600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61092661091f610f2f565b8383611258565b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6109c6610f2f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610a0c5750610a0b85610a06610f2f565b61092a565b5b610a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a42906127c9565b60405180910390fd5b610a5885858585856113c4565b5050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab957600080fd5b80600360146101000a81548160ff02191690831515021790555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b8060029081610b4f9190612acd565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610bc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb990612c11565b60405180910390fd5b6000610bcc610f2f565b90506000610bd98561165f565b90506000610be68561165f565b9050610bf7836000898585896116d9565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c569190612c31565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051610cd4929190612c65565b60405180910390a4610ceb836000898585896116e1565b610cfa836000898989896116e9565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6990612c11565b60405180910390fd5b8151835114610db6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dad90612d00565b60405180910390fd5b6000610dc0610f2f565b9050610dd1816000878787876116d9565b60005b8451811015610e8a57838181518110610df057610def61287b565b5b6020026020010151600080878481518110610e0e57610e0d61287b565b5b6020026020010151815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e709190612c31565b925050819055508080610e82906128d9565b915050610dd4565b508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610f02929190612d20565b60405180910390a4610f19816000878787876116e1565b610f28816000878787876118c0565b5050505050565b600033905090565b8151835114610f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7290612d00565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe190612dc9565b60405180910390fd5b6000610ff4610f2f565b90506110048187878787876116d9565b60005b84518110156111b55760008582815181106110255761102461287b565b5b6020026020010151905060008583815181106110445761104361287b565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156110e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110dc90612e5b565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461119a9190612c31565b92505081905550505050806111ae906128d9565b9050611007565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161122c929190612d20565b60405180910390a46112428187878787876116e1565b6112508187878787876118c0565b505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036112c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112bd90612eed565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113b79190611c6c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142a90612dc9565b60405180910390fd5b600061143d610f2f565b9050600061144a8561165f565b905060006114578561165f565b90506114678389898585896116d9565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050858110156114fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f590612e5b565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115b39190612c31565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611630929190612c65565b60405180910390a4611646848a8a86868a6116e1565b611654848a8a8a8a8a6116e9565b505050505050505050565b60606000600167ffffffffffffffff81111561167e5761167d611ca2565b5b6040519080825280602002602001820160405280156116ac5781602001602082028036833780820191505090505b50905082816000815181106116c4576116c361287b565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b6117088473ffffffffffffffffffffffffffffffffffffffff16611a97565b156118b8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161174e959493929190612f62565b6020604051808303816000875af192505050801561178a57506040513d601f19601f820116820180604052508101906117879190612fd1565b60015b61182f5761179661300b565b806308c379a0036117f257506117aa61302d565b806117b557506117f4565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e99190611ec2565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118269061312f565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146118b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ad906131c1565b60405180910390fd5b505b505050505050565b6118df8473ffffffffffffffffffffffffffffffffffffffff16611a97565b15611a8f578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016119259594939291906131e1565b6020604051808303816000875af192505050801561196157506040513d601f19601f8201168201806040525081019061195e9190612fd1565b60015b611a065761196d61300b565b806308c379a0036119c9575061198161302d565b8061198c57506119cb565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c09190611ec2565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fd9061312f565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a84906131c1565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611af982611ace565b9050919050565b611b0981611aee565b8114611b1457600080fd5b50565b600081359050611b2681611b00565b92915050565b6000819050919050565b611b3f81611b2c565b8114611b4a57600080fd5b50565b600081359050611b5c81611b36565b92915050565b60008060408385031215611b7957611b78611ac4565b5b6000611b8785828601611b17565b9250506020611b9885828601611b4d565b9150509250929050565b611bab81611b2c565b82525050565b6000602082019050611bc66000830184611ba2565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611c0181611bcc565b8114611c0c57600080fd5b50565b600081359050611c1e81611bf8565b92915050565b600060208284031215611c3a57611c39611ac4565b5b6000611c4884828501611c0f565b91505092915050565b60008115159050919050565b611c6681611c51565b82525050565b6000602082019050611c816000830184611c5d565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611cda82611c91565b810181811067ffffffffffffffff82111715611cf957611cf8611ca2565b5b80604052505050565b6000611d0c611aba565b9050611d188282611cd1565b919050565b600067ffffffffffffffff821115611d3857611d37611ca2565b5b611d4182611c91565b9050602081019050919050565b82818337600083830152505050565b6000611d70611d6b84611d1d565b611d02565b905082815260208101848484011115611d8c57611d8b611c8c565b5b611d97848285611d4e565b509392505050565b600082601f830112611db457611db3611c87565b5b8135611dc4848260208601611d5d565b91505092915050565b600060208284031215611de357611de2611ac4565b5b600082013567ffffffffffffffff811115611e0157611e00611ac9565b5b611e0d84828501611d9f565b91505092915050565b600060208284031215611e2c57611e2b611ac4565b5b6000611e3a84828501611b4d565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611e7d578082015181840152602081019050611e62565b60008484015250505050565b6000611e9482611e43565b611e9e8185611e4e565b9350611eae818560208601611e5f565b611eb781611c91565b840191505092915050565b60006020820190508181036000830152611edc8184611e89565b905092915050565b60008060408385031215611efb57611efa611ac4565b5b6000611f0985828601611b4d565b9250506020611f1a85828601611b4d565b9150509250929050565b600067ffffffffffffffff821115611f3f57611f3e611ca2565b5b602082029050602081019050919050565b600080fd5b6000611f68611f6384611f24565b611d02565b90508083825260208201905060208402830185811115611f8b57611f8a611f50565b5b835b81811015611fb45780611fa08882611b4d565b845260208401935050602081019050611f8d565b5050509392505050565b600082601f830112611fd357611fd2611c87565b5b8135611fe3848260208601611f55565b91505092915050565b600067ffffffffffffffff82111561200757612006611ca2565b5b61201082611c91565b9050602081019050919050565b600061203061202b84611fec565b611d02565b90508281526020810184848401111561204c5761204b611c8c565b5b612057848285611d4e565b509392505050565b600082601f83011261207457612073611c87565b5b813561208484826020860161201d565b91505092915050565b600080600080608085870312156120a7576120a6611ac4565b5b60006120b587828801611b17565b945050602085013567ffffffffffffffff8111156120d6576120d5611ac9565b5b6120e287828801611fbe565b935050604085013567ffffffffffffffff81111561210357612102611ac9565b5b61210f87828801611fbe565b925050606085013567ffffffffffffffff8111156121305761212f611ac9565b5b61213c8782880161205f565b91505092959194509250565b600080600080600060a0868803121561216457612163611ac4565b5b600061217288828901611b17565b955050602061218388828901611b17565b945050604086013567ffffffffffffffff8111156121a4576121a3611ac9565b5b6121b088828901611fbe565b935050606086013567ffffffffffffffff8111156121d1576121d0611ac9565b5b6121dd88828901611fbe565b925050608086013567ffffffffffffffff8111156121fe576121fd611ac9565b5b61220a8882890161205f565b9150509295509295909350565b600067ffffffffffffffff82111561223257612231611ca2565b5b602082029050602081019050919050565b600061225661225184612217565b611d02565b9050808382526020820190506020840283018581111561227957612278611f50565b5b835b818110156122a2578061228e8882611b17565b84526020840193505060208101905061227b565b5050509392505050565b600082601f8301126122c1576122c0611c87565b5b81356122d1848260208601612243565b91505092915050565b600080604083850312156122f1576122f0611ac4565b5b600083013567ffffffffffffffff81111561230f5761230e611ac9565b5b61231b858286016122ac565b925050602083013567ffffffffffffffff81111561233c5761233b611ac9565b5b61234885828601611fbe565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61238781611b2c565b82525050565b6000612399838361237e565b60208301905092915050565b6000602082019050919050565b60006123bd82612352565b6123c7818561235d565b93506123d28361236e565b8060005b838110156124035781516123ea888261238d565b97506123f5836123a5565b9250506001810190506123d6565b5085935050505092915050565b6000602082019050818103600083015261242a81846123b2565b905092915050565b60006020828403121561244857612447611ac4565b5b600061245684828501611b17565b91505092915050565b61246881611aee565b82525050565b6000602082019050612483600083018461245f565b92915050565b61249281611c51565b811461249d57600080fd5b50565b6000813590506124af81612489565b92915050565b600080604083850312156124cc576124cb611ac4565b5b60006124da85828601611b17565b92505060206124eb858286016124a0565b9150509250929050565b6000806040838503121561250c5761250b611ac4565b5b600061251a85828601611b17565b925050602061252b85828601611b17565b9150509250929050565b600080600080600060a0868803121561255157612550611ac4565b5b600061255f88828901611b17565b955050602061257088828901611b17565b945050604061258188828901611b4d565b935050606061259288828901611b4d565b925050608086013567ffffffffffffffff8111156125b3576125b2611ac9565b5b6125bf8882890161205f565b9150509295509295909350565b6000602082840312156125e2576125e1611ac4565b5b60006125f0848285016124a0565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000612655602a83611e4e565b9150612660826125f9565b604082019050919050565b6000602082019050818103600083015261268481612648565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806126d257607f821691505b6020821081036126e5576126e461268b565b5b50919050565b7f44656d6f47616d6553746174653a206d696e74696e67206973206f6666000000600082015250565b6000612721601d83611e4e565b915061272c826126eb565b602082019050919050565b6000602082019050818103600083015261275081612714565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b60006127b3602e83611e4e565b91506127be82612757565b604082019050919050565b600060208201905081810360008301526127e2816127a6565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b6000612845602983611e4e565b9150612850826127e9565b604082019050919050565b6000602082019050818103600083015261287481612838565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006128e482611b2c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612916576129156128aa565b5b600182019050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026129837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612946565b61298d8683612946565b95508019841693508086168417925050509392505050565b6000819050919050565b60006129ca6129c56129c084611b2c565b6129a5565b611b2c565b9050919050565b6000819050919050565b6129e4836129af565b6129f86129f0826129d1565b848454612953565b825550505050565b600090565b612a0d612a00565b612a188184846129db565b505050565b5b81811015612a3c57612a31600082612a05565b600181019050612a1e565b5050565b601f821115612a8157612a5281612921565b612a5b84612936565b81016020851015612a6a578190505b612a7e612a7685612936565b830182612a1d565b50505b505050565b600082821c905092915050565b6000612aa460001984600802612a86565b1980831691505092915050565b6000612abd8383612a93565b9150826002028217905092915050565b612ad682611e43565b67ffffffffffffffff811115612aef57612aee611ca2565b5b612af982546126ba565b612b04828285612a40565b600060209050601f831160018114612b375760008415612b25578287015190505b612b2f8582612ab1565b865550612b97565b601f198416612b4586612921565b60005b82811015612b6d57848901518255600182019150602085019450602081019050612b48565b86831015612b8a5784890151612b86601f891682612a93565b8355505b6001600288020188555050505b505050505050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000612bfb602183611e4e565b9150612c0682612b9f565b604082019050919050565b60006020820190508181036000830152612c2a81612bee565b9050919050565b6000612c3c82611b2c565b9150612c4783611b2c565b9250828201905080821115612c5f57612c5e6128aa565b5b92915050565b6000604082019050612c7a6000830185611ba2565b612c876020830184611ba2565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000612cea602883611e4e565b9150612cf582612c8e565b604082019050919050565b60006020820190508181036000830152612d1981612cdd565b9050919050565b60006040820190508181036000830152612d3a81856123b2565b90508181036020830152612d4e81846123b2565b90509392505050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612db3602583611e4e565b9150612dbe82612d57565b604082019050919050565b60006020820190508181036000830152612de281612da6565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000612e45602a83611e4e565b9150612e5082612de9565b604082019050919050565b60006020820190508181036000830152612e7481612e38565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000612ed7602983611e4e565b9150612ee282612e7b565b604082019050919050565b60006020820190508181036000830152612f0681612eca565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000612f3482612f0d565b612f3e8185612f18565b9350612f4e818560208601611e5f565b612f5781611c91565b840191505092915050565b600060a082019050612f77600083018861245f565b612f84602083018761245f565b612f916040830186611ba2565b612f9e6060830185611ba2565b8181036080830152612fb08184612f29565b90509695505050505050565b600081519050612fcb81611bf8565b92915050565b600060208284031215612fe757612fe6611ac4565b5b6000612ff584828501612fbc565b91505092915050565b60008160e01c9050919050565b600060033d111561302a5760046000803e613027600051612ffe565b90505b90565b600060443d106130ba5761303f611aba565b60043d036004823e80513d602482011167ffffffffffffffff821117156130675750506130ba565b808201805167ffffffffffffffff81111561308557505050506130ba565b80602083010160043d0385018111156130a25750505050506130ba565b6130b182602001850186611cd1565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000613119603483611e4e565b9150613124826130bd565b604082019050919050565b600060208201905081810360008301526131488161310c565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006131ab602883611e4e565b91506131b68261314f565b604082019050919050565b600060208201905081810360008301526131da8161319e565b9050919050565b600060a0820190506131f6600083018861245f565b613203602083018761245f565b818103604083015261321581866123b2565b9050818103606083015261322981856123b2565b9050818103608083015261323d8184612f29565b9050969550505050505056fea2646970667358221220c4e6052fffd74856d8bc75d2885eac4ff03b7c4f17640054731bad2a24fa5c5a64736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/testchain/contracts/DemoGameState.sol b/testchain/contracts/DemoGameState.sol new file mode 100644 index 00000000..cb9279c4 --- /dev/null +++ b/testchain/contracts/DemoGameState.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; + +contract DemoGameState is ERC1155 { + + address public owner; + bool public on; + + modifier onlyOwner(){ + require(msg.sender == owner); + _; + } + + constructor() ERC1155("") { + owner = msg.sender; + on = true; + } + + function setURI(string memory newuri) public onlyOwner { + _setURI(newuri); + } + + function mint(uint256 id, uint256 amount) + public + { + require(on, "DemoGameState: minting is off"); + _mint(msg.sender, id, amount, ""); + } + + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) + public + onlyOwner + { + _mintBatch(to, ids, amounts, data); + } + + function updateOwner(address _newOwner) onlyOwner external { + owner = _newOwner; + } + + function toggle(bool _state) onlyOwner external { + on = _state; + } +}