diff --git a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json index 8a9759bdf8..fd02eec0ea 100644 --- a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +++ b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/6dfbc7f87ae3c2727d63a3fba8d02a41.json" + "buildInfo": "../../../../../build-info/b4e7ec2fd35748689d35a44cde08a2e7.json" } diff --git a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json index 9d6ac8dd00..8fd7d531d1 100644 --- a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +++ b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json @@ -290,8 +290,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b506040516200171b3803806200171b833981810160405281019062000037919062000193565b81600390805190602001906200004f92919062000071565b5080600490805190602001906200006892919062000071565b50505062000376565b8280546200007f906200029b565b90600052602060002090601f016020900481019282620000a35760008555620000ef565b82601f10620000be57805160ff1916838001178555620000ef565b82800160010185558215620000ef579182015b82811115620000ee578251825591602001919060010190620000d1565b5b509050620000fe919062000102565b5090565b5b808211156200011d57600081600090555060010162000103565b5090565b60006200013862000132846200022f565b62000206565b9050828152602081018484840111156200015157600080fd5b6200015e84828562000265565b509392505050565b600082601f8301126200017857600080fd5b81516200018a84826020860162000121565b91505092915050565b60008060408385031215620001a757600080fd5b600083015167ffffffffffffffff811115620001c257600080fd5b620001d08582860162000166565b925050602083015167ffffffffffffffff811115620001ee57600080fd5b620001fc8582860162000166565b9150509250929050565b60006200021262000225565b9050620002208282620002d1565b919050565b6000604051905090565b600067ffffffffffffffff8211156200024d576200024c62000336565b5b620002588262000365565b9050602081019050919050565b60005b838110156200028557808201518184015260208101905062000268565b8381111562000295576000848401525b50505050565b60006002820490506001821680620002b457607f821691505b60208210811415620002cb57620002ca62000307565b5b50919050565b620002dc8262000365565b810181811067ffffffffffffffff82111715620002fe57620002fd62000336565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b61139580620003866000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610e35565b60405180910390f35b6100e660048036038101906100e19190610c83565b610308565b6040516100f39190610e1a565b60405180910390f35b610104610326565b6040516101119190610f37565b60405180910390f35b610134600480360381019061012f9190610c34565b610330565b6040516101419190610e1a565b60405180910390f35b610152610428565b60405161015f9190610f52565b60405180910390f35b610182600480360381019061017d9190610c83565b610431565b60405161018f9190610e1a565b60405180910390f35b6101b260048036038101906101ad9190610bcf565b6104dd565b6040516101bf9190610f37565b60405180910390f35b6101d0610525565b6040516101dd9190610e35565b60405180910390f35b61020060048036038101906101fb9190610c83565b6105b7565b60405161020d9190610e1a565b60405180910390f35b610230600480360381019061022b9190610c83565b6106a2565b60405161023d9190610e1a565b60405180910390f35b610260600480360381019061025b9190610bf8565b6106c0565b60405161026d9190610f37565b60405180910390f35b60606003805461028590611067565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190611067565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610747565b848461074f565b6001905092915050565b6000600254905090565b600061033d84848461091a565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610747565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90610eb7565b60405180910390fd5b61041c85610414610747565b85840361074f565b60019150509392505050565b60006012905090565b60006104d361043e610747565b84846001600061044c610747565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104ce9190610f89565b61074f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461053490611067565b80601f016020809104026020016040519081016040528092919081815260200182805461056090611067565b80156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b5050505050905090565b600080600160006105c6610747565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067a90610f17565b60405180910390fd5b61069761068e610747565b8585840361074f565b600191505092915050565b60006106b66106af610747565b848461091a565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b690610ef7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561082f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082690610e77565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161090d9190610f37565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561098a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098190610ed7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156109fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f190610e57565b60405180910390fd5b610a05838383610b9b565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610a8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8290610e97565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b1e9190610f89565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b829190610f37565b60405180910390a3610b95848484610ba0565b50505050565b505050565b505050565b600081359050610bb481611331565b92915050565b600081359050610bc981611348565b92915050565b600060208284031215610be157600080fd5b6000610bef84828501610ba5565b91505092915050565b60008060408385031215610c0b57600080fd5b6000610c1985828601610ba5565b9250506020610c2a85828601610ba5565b9150509250929050565b600080600060608486031215610c4957600080fd5b6000610c5786828701610ba5565b9350506020610c6886828701610ba5565b9250506040610c7986828701610bba565b9150509250925092565b60008060408385031215610c9657600080fd5b6000610ca485828601610ba5565b9250506020610cb585828601610bba565b9150509250929050565b610cc881610ff1565b82525050565b6000610cd982610f6d565b610ce38185610f78565b9350610cf3818560208601611034565b610cfc816110f7565b840191505092915050565b6000610d14602383610f78565b9150610d1f82611108565b604082019050919050565b6000610d37602283610f78565b9150610d4282611157565b604082019050919050565b6000610d5a602683610f78565b9150610d65826111a6565b604082019050919050565b6000610d7d602883610f78565b9150610d88826111f5565b604082019050919050565b6000610da0602583610f78565b9150610dab82611244565b604082019050919050565b6000610dc3602483610f78565b9150610dce82611293565b604082019050919050565b6000610de6602583610f78565b9150610df1826112e2565b604082019050919050565b610e058161101d565b82525050565b610e1481611027565b82525050565b6000602082019050610e2f6000830184610cbf565b92915050565b60006020820190508181036000830152610e4f8184610cce565b905092915050565b60006020820190508181036000830152610e7081610d07565b9050919050565b60006020820190508181036000830152610e9081610d2a565b9050919050565b60006020820190508181036000830152610eb081610d4d565b9050919050565b60006020820190508181036000830152610ed081610d70565b9050919050565b60006020820190508181036000830152610ef081610d93565b9050919050565b60006020820190508181036000830152610f1081610db6565b9050919050565b60006020820190508181036000830152610f3081610dd9565b9050919050565b6000602082019050610f4c6000830184610dfc565b92915050565b6000602082019050610f676000830184610e0b565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610f948261101d565b9150610f9f8361101d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610fd457610fd3611099565b5b828201905092915050565b6000610fea82610ffd565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611052578082015181840152602081019050611037565b83811115611061576000848401525b50505050565b6000600282049050600182168061107f57607f821691505b60208210811415611093576110926110c8565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61133a81610fdf565b811461134557600080fd5b50565b6113518161101d565b811461135c57600080fd5b5056fea2646970667358221220b3c129c93663de4578dfe5a3ceef494143e28bb9ac4461738559f65db42d2db064736f6c63430008040033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610e35565b60405180910390f35b6100e660048036038101906100e19190610c83565b610308565b6040516100f39190610e1a565b60405180910390f35b610104610326565b6040516101119190610f37565b60405180910390f35b610134600480360381019061012f9190610c34565b610330565b6040516101419190610e1a565b60405180910390f35b610152610428565b60405161015f9190610f52565b60405180910390f35b610182600480360381019061017d9190610c83565b610431565b60405161018f9190610e1a565b60405180910390f35b6101b260048036038101906101ad9190610bcf565b6104dd565b6040516101bf9190610f37565b60405180910390f35b6101d0610525565b6040516101dd9190610e35565b60405180910390f35b61020060048036038101906101fb9190610c83565b6105b7565b60405161020d9190610e1a565b60405180910390f35b610230600480360381019061022b9190610c83565b6106a2565b60405161023d9190610e1a565b60405180910390f35b610260600480360381019061025b9190610bf8565b6106c0565b60405161026d9190610f37565b60405180910390f35b60606003805461028590611067565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190611067565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610747565b848461074f565b6001905092915050565b6000600254905090565b600061033d84848461091a565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610747565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90610eb7565b60405180910390fd5b61041c85610414610747565b85840361074f565b60019150509392505050565b60006012905090565b60006104d361043e610747565b84846001600061044c610747565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104ce9190610f89565b61074f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461053490611067565b80601f016020809104026020016040519081016040528092919081815260200182805461056090611067565b80156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b5050505050905090565b600080600160006105c6610747565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067a90610f17565b60405180910390fd5b61069761068e610747565b8585840361074f565b600191505092915050565b60006106b66106af610747565b848461091a565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b690610ef7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561082f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082690610e77565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161090d9190610f37565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561098a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098190610ed7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156109fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f190610e57565b60405180910390fd5b610a05838383610b9b565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610a8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8290610e97565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b1e9190610f89565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b829190610f37565b60405180910390a3610b95848484610ba0565b50505050565b505050565b505050565b600081359050610bb481611331565b92915050565b600081359050610bc981611348565b92915050565b600060208284031215610be157600080fd5b6000610bef84828501610ba5565b91505092915050565b60008060408385031215610c0b57600080fd5b6000610c1985828601610ba5565b9250506020610c2a85828601610ba5565b9150509250929050565b600080600060608486031215610c4957600080fd5b6000610c5786828701610ba5565b9350506020610c6886828701610ba5565b9250506040610c7986828701610bba565b9150509250925092565b60008060408385031215610c9657600080fd5b6000610ca485828601610ba5565b9250506020610cb585828601610bba565b9150509250929050565b610cc881610ff1565b82525050565b6000610cd982610f6d565b610ce38185610f78565b9350610cf3818560208601611034565b610cfc816110f7565b840191505092915050565b6000610d14602383610f78565b9150610d1f82611108565b604082019050919050565b6000610d37602283610f78565b9150610d4282611157565b604082019050919050565b6000610d5a602683610f78565b9150610d65826111a6565b604082019050919050565b6000610d7d602883610f78565b9150610d88826111f5565b604082019050919050565b6000610da0602583610f78565b9150610dab82611244565b604082019050919050565b6000610dc3602483610f78565b9150610dce82611293565b604082019050919050565b6000610de6602583610f78565b9150610df1826112e2565b604082019050919050565b610e058161101d565b82525050565b610e1481611027565b82525050565b6000602082019050610e2f6000830184610cbf565b92915050565b60006020820190508181036000830152610e4f8184610cce565b905092915050565b60006020820190508181036000830152610e7081610d07565b9050919050565b60006020820190508181036000830152610e9081610d2a565b9050919050565b60006020820190508181036000830152610eb081610d4d565b9050919050565b60006020820190508181036000830152610ed081610d70565b9050919050565b60006020820190508181036000830152610ef081610d93565b9050919050565b60006020820190508181036000830152610f1081610db6565b9050919050565b60006020820190508181036000830152610f3081610dd9565b9050919050565b6000602082019050610f4c6000830184610dfc565b92915050565b6000602082019050610f676000830184610e0b565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610f948261101d565b9150610f9f8361101d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610fd457610fd3611099565b5b828201905092915050565b6000610fea82610ffd565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611052578082015181840152602081019050611037565b83811115611061576000848401525b50505050565b6000600282049050600182168061107f57607f821691505b60208210811415611093576110926110c8565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61133a81610fdf565b811461134557600080fd5b50565b6113518161101d565b811461135c57600080fd5b5056fea2646970667358221220b3c129c93663de4578dfe5a3ceef494143e28bb9ac4461738559f65db42d2db064736f6c63430008040033", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000b5638038062000b568339810160408190526200003491620001db565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b50505062000282565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b602082108114156200027c57634e487b7160e01b600052602260045260246000fd5b50919050565b6108c480620002926000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101c6565b6040516100c39190610701565b60405180910390f35b6100df6100da366004610772565b610258565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f36600461079c565b61026e565b604051601281526020016100c3565b6100df610131366004610772565b61031d565b6100f36101443660046107d8565b6001600160a01b031660009081526020819052604090205490565b6100b6610359565b6100df610175366004610772565b610368565b6100df610188366004610772565b610401565b6100f361019b3660046107fa565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101d59061082d565b80601f01602080910402602001604051908101604052809291908181526020018280546102019061082d565b801561024e5780601f106102235761010080835404028352916020019161024e565b820191906000526020600020905b81548152906001019060200180831161023157829003601f168201915b5050505050905090565b600061026533848461040e565b50600192915050565b600061027b848484610532565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103055760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610312853385840361040e565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610265918590610354908690610868565b61040e565b6060600480546101d59061082d565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156103ea5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016102fc565b6103f7338585840361040e565b5060019392505050565b6000610265338484610532565b6001600160a01b0383166104705760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016102fc565b6001600160a01b0382166104d15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016102fc565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166105965760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016102fc565b6001600160a01b0382166105f85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016102fc565b6001600160a01b038316600090815260208190526040902054818110156106705760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016102fc565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906106a7908490610868565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106f391815260200190565b60405180910390a350505050565b600060208083528351808285015260005b8181101561072e57858101830151858201604001528201610712565b81811115610740576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461076d57600080fd5b919050565b6000806040838503121561078557600080fd5b61078e83610756565b946020939093013593505050565b6000806000606084860312156107b157600080fd5b6107ba84610756565b92506107c860208501610756565b9150604084013590509250925092565b6000602082840312156107ea57600080fd5b6107f382610756565b9392505050565b6000806040838503121561080d57600080fd5b61081683610756565b915061082460208401610756565b90509250929050565b600181811c9082168061084157607f821691505b6020821081141561086257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561088957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220200d63d7227620e0df6481e76a67dffb28ef35c0c3c55e1ee631b46bcb5e66c264736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101c6565b6040516100c39190610701565b60405180910390f35b6100df6100da366004610772565b610258565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f36600461079c565b61026e565b604051601281526020016100c3565b6100df610131366004610772565b61031d565b6100f36101443660046107d8565b6001600160a01b031660009081526020819052604090205490565b6100b6610359565b6100df610175366004610772565b610368565b6100df610188366004610772565b610401565b6100f361019b3660046107fa565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101d59061082d565b80601f01602080910402602001604051908101604052809291908181526020018280546102019061082d565b801561024e5780601f106102235761010080835404028352916020019161024e565b820191906000526020600020905b81548152906001019060200180831161023157829003601f168201915b5050505050905090565b600061026533848461040e565b50600192915050565b600061027b848484610532565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103055760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610312853385840361040e565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610265918590610354908690610868565b61040e565b6060600480546101d59061082d565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156103ea5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016102fc565b6103f7338585840361040e565b5060019392505050565b6000610265338484610532565b6001600160a01b0383166104705760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016102fc565b6001600160a01b0382166104d15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016102fc565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166105965760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016102fc565b6001600160a01b0382166105f85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016102fc565b6001600160a01b038316600090815260208190526040902054818110156106705760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016102fc565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906106a7908490610868565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106f391815260200190565b60405180910390a350505050565b600060208083528351808285015260005b8181101561072e57858101830151858201604001528201610712565b81811115610740576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461076d57600080fd5b919050565b6000806040838503121561078557600080fd5b61078e83610756565b946020939093013593505050565b6000806000606084860312156107b157600080fd5b6107ba84610756565b92506107c860208501610756565b9150604084013590509250925092565b6000602082840312156107ea57600080fd5b6107f382610756565b9392505050565b6000806040838503121561080d57600080fd5b61081683610756565b915061082460208401610756565b90509250929050565b600181811c9082168061084157607f821691505b6020821081141561086257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561088957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220200d63d7227620e0df6481e76a67dffb28ef35c0c3c55e1ee631b46bcb5e66c264736f6c634300080a0033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json index 8a9759bdf8..fd02eec0ea 100644 --- a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +++ b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/6dfbc7f87ae3c2727d63a3fba8d02a41.json" + "buildInfo": "../../../../../build-info/b4e7ec2fd35748689d35a44cde08a2e7.json" } diff --git a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json index 5f2b42b50a..e4bc7fc277 100644 --- a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +++ b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../../build-info/6dfbc7f87ae3c2727d63a3fba8d02a41.json" + "buildInfo": "../../../../../../build-info/b4e7ec2fd35748689d35a44cde08a2e7.json" } diff --git a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json index 7bbf60451f..bdcb1a5fdf 100644 --- a/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +++ b/contracts/basic-bandwidth-generation/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/6dfbc7f87ae3c2727d63a3fba8d02a41.json" + "buildInfo": "../../../../build-info/b4e7ec2fd35748689d35a44cde08a2e7.json" } diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.dbg.json deleted file mode 100644 index bea78f6d8d..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.json deleted file mode 100644 index e1a95dfe90..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeMath", - "sourceName": "@openzeppelin/contracts/math/SafeMath.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207ceb5b9e8bb631a9723802d1487d75b0f9db1e57e569e37561e9d35cd45a718c64736f6c63430006060033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207ceb5b9e8bb631a9723802d1487d75b0f9db1e57e569e37561e9d35cd45a718c64736f6c63430006060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json deleted file mode 100644 index e548d120de..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json deleted file mode 100644 index f6b18c4e98..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20", - "sourceName": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000ca538038062000ca5833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405250508251620001b491506003906020850190620001e0565b508051620001ca906004906020840190620001e0565b50506005805460ff191660121790555062000285565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200022357805160ff191683800117855562000253565b8280016001018555821562000253579182015b828111156200025357825182559160200191906001019062000236565b506200026192915062000265565b5090565b6200028291905b808211156200026157600081556001016200026c565b90565b610a1080620002956000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103ff565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610408565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661045c565b6100b6610477565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104d8565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610546565b610173600480360360408110156102a157600080fd5b506001600160a01b038135811691602001351661055a565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610585565b8484610589565b50600192915050565b60025490565b600061037f848484610675565b6103f58461038b610585565b6103f085604051806060016040528060288152602001610945602891396001600160a01b038a166000908152600160205260408120906103c9610585565b6001600160a01b03168152602081019190915260400160002054919063ffffffff6107dc16565b610589565b5060019392505050565b60055460ff1690565b6000610363610415610585565b846103f08560016000610426610585565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61087316565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104e5610585565b846103f0856040518060600160405280602581526020016109b6602591396001600061050f610585565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff6107dc16565b6000610363610553610585565b8484610675565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105ce5760405162461bcd60e51b81526004018080602001828103825260248152602001806109926024913960400191505060405180910390fd5b6001600160a01b0382166106135760405162461bcd60e51b81526004018080602001828103825260228152602001806108fd6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106ba5760405162461bcd60e51b815260040180806020018281038252602581526020018061096d6025913960400191505060405180910390fd5b6001600160a01b0382166106ff5760405162461bcd60e51b81526004018080602001828103825260238152602001806108da6023913960400191505060405180910390fd5b61070a8383836108d4565b61074d8160405180606001604052806026815260200161091f602691396001600160a01b038616600090815260208190526040902054919063ffffffff6107dc16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610782908263ffffffff61087316565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561086b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610830578181015183820152602001610818565b50505050905090810190601f16801561085d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108cd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122007c47290196c2ddfd0852f1dfc62deceb75163eca44542513eab3af1a7a838f964736f6c63430006060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103ff565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610408565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661045c565b6100b6610477565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104d8565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610546565b610173600480360360408110156102a157600080fd5b506001600160a01b038135811691602001351661055a565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610585565b8484610589565b50600192915050565b60025490565b600061037f848484610675565b6103f58461038b610585565b6103f085604051806060016040528060288152602001610945602891396001600160a01b038a166000908152600160205260408120906103c9610585565b6001600160a01b03168152602081019190915260400160002054919063ffffffff6107dc16565b610589565b5060019392505050565b60055460ff1690565b6000610363610415610585565b846103f08560016000610426610585565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61087316565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104e5610585565b846103f0856040518060600160405280602581526020016109b6602591396001600061050f610585565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff6107dc16565b6000610363610553610585565b8484610675565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105ce5760405162461bcd60e51b81526004018080602001828103825260248152602001806109926024913960400191505060405180910390fd5b6001600160a01b0382166106135760405162461bcd60e51b81526004018080602001828103825260228152602001806108fd6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106ba5760405162461bcd60e51b815260040180806020018281038252602581526020018061096d6025913960400191505060405180910390fd5b6001600160a01b0382166106ff5760405162461bcd60e51b81526004018080602001828103825260238152602001806108da6023913960400191505060405180910390fd5b61070a8383836108d4565b61074d8160405180606001604052806026815260200161091f602691396001600160a01b038616600090815260208190526040902054919063ffffffff6107dc16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610782908263ffffffff61087316565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561086b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610830578181015183820152602001610818565b50505050905090810190601f16801561085d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108cd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122007c47290196c2ddfd0852f1dfc62deceb75163eca44542513eab3af1a7a838f964736f6c63430006060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json deleted file mode 100644 index e548d120de..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json deleted file mode 100644 index 663a02d9d8..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC20", - "sourceName": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/SafeERC20.sol/SafeERC20.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/SafeERC20.sol/SafeERC20.dbg.json deleted file mode 100644 index e548d120de..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/SafeERC20.sol/SafeERC20.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/SafeERC20.sol/SafeERC20.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/SafeERC20.sol/SafeERC20.json deleted file mode 100644 index 32820d7a1f..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/token/ERC20/SafeERC20.sol/SafeERC20.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeERC20", - "sourceName": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a10ad72c41cead301751dbbfdbfa8dc0de387237baaadf00c593410d921ba53164736f6c63430006060033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a10ad72c41cead301751dbbfdbfa8dc0de387237baaadf00c593410d921ba53164736f6c63430006060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json deleted file mode 100644 index bea78f6d8d..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Address.sol/Address.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Address.sol/Address.json deleted file mode 100644 index 3113f68c6d..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Address.sol/Address.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Address", - "sourceName": "@openzeppelin/contracts/utils/Address.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bf51151e2a4e160194baa49fc39a27bad1253743e398fefe6fb6935ec7d37a5e64736f6c63430006060033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bf51151e2a4e160194baa49fc39a27bad1253743e398fefe6fb6935ec7d37a5e64736f6c63430006060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json deleted file mode 100644 index bea78f6d8d..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Context.sol/Context.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Context.sol/Context.json deleted file mode 100644 index 8fe86fc78f..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/Context.sol/Context.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Context", - "sourceName": "@openzeppelin/contracts/utils/Context.sol", - "abi": [], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json deleted file mode 100644 index bea78f6d8d..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.json b/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.json deleted file mode 100644 index 528717537e..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/@openzeppelin/contracts/utils/ReentrancyGuard.sol/ReentrancyGuard.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ReentrancyGuard", - "sourceName": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/BandwidthGenerator.sol/BandwidthGenerator.json b/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/BandwidthGenerator.sol/BandwidthGenerator.json deleted file mode 100644 index 5dcfb9588c..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/BandwidthGenerator.sol/BandwidthGenerator.json +++ /dev/null @@ -1,222 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "BandwidthGenerator", - "sourceName": "contracts/BandwidthGenerator.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "contract CosmosERC20", - "name": "_erc20", - "type": "address" - }, - { - "internalType": "contract Gravity", - "name": "_gravityBridge", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "Bandwidth", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "VerificationKey", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "SignedVerificationKey", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "CosmosRecipient", - "type": "bytes32" - } - ], - "name": "BBCredentialPurchased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "NewBytesPerToken", - "type": "uint256" - } - ], - "name": "RatioChanged", - "type": "event" - }, - { - "inputs": [], - "name": "BytesPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "bandwidthFromToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newBytesPerTokenAmount", - "type": "uint256" - } - ], - "name": "changeRatio", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "erc20", - "outputs": [ - { - "internalType": "contract CosmosERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_verificationKey", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_signedVerificationKey", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "_cosmosRecipient", - "type": "bytes32" - } - ], - "name": "generateBasicBandwidthCredential", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "gravityBridge", - "outputs": [ - { - "internalType": "contract Gravity", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50604051610b18380380610b188339818101604052604081101561003357600080fd5b508051602090910151600061004f6001600160e01b0361015c16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b0382166100de5760405162461bcd60e51b8152600401808060200182810382526030815260200180610ae86030913960400191505060405180910390fd5b6001600160a01b0381166101235760405162461bcd60e51b8152600401808060200182810382526039815260200180610aaf6039913960400191505060405180910390fd5b600180546001600160a01b039384166001600160a01b031991821617909155600280549290931691161790556340000000600355610160565b3390565b6109408061016f6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80639e0dda8b116100665780639e0dda8b146101825780639fbb65e9146101b1578063a4da2d02146101b9578063f2fde38b146101c1578063f6a33253146101e757610093565b8063715018a61461009857806373f48677146100a2578063785e9e86146101565780638da5cb5b1461017a575b600080fd5b6100a0610204565b005b6100a0600480360360808110156100b857600080fd5b8135916020810135918101906060810160408201356401000000008111156100df57600080fd5b8201836020820111156100f157600080fd5b8035906020019184600183028401116401000000008311171561011357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506102c2915050565b61015e61053b565b604080516001600160a01b039092168252519081900360200190f35b61015e61054a565b61019f6004803603602081101561019857600080fd5b5035610559565b60408051918252519081900360200190f35b61019f610592565b61015e610598565b6100a0600480360360208110156101d757600080fd5b50356001600160a01b03166105a7565b6100a0600480360360208110156101fd57600080fd5b50356106bb565b61020c61079e565b6001600160a01b031661021d61054a565b6001600160a01b031614610278576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b81516040146103025760405162461bcd60e51b81526004018080602001828103825260338152602001806108d86033913960400191505060405180910390fd5b600154604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561035c57600080fd5b505af1158015610370573d6000803e3d6000fd5b505050506040513d602081101561038657600080fd5b50506001546002546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018890529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156103e157600080fd5b505af11580156103f5573d6000803e3d6000fd5b505050506040513d602081101561040b57600080fd5b505060025460015460408051631ffbe7f960e01b81526001600160a01b039283166004820152602481018590526044810188905290519190921691631ffbe7f991606480830192600092919082900301818387803b15801561046c57600080fd5b505af1158015610480573d6000803e3d6000fd5b50505050600061048f85610559565b905081847fc300d88f6eea8461741d440d04aa6147e081770af25e30862f6cc38d1033b9d183866040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156104f95781810151838201526020016104e1565b50505050905090810190601f1680156105265780820380516001836020036101000a031916815260200191505b50935050505060405180910390a35050505050565b6001546001600160a01b031681565b6000546001600160a01b031690565b600080610571600354846107a290919063ffffffff16565b905061058b81670de0b6b3a764000063ffffffff61080416565b9392505050565b60035481565b6002546001600160a01b031681565b6105af61079e565b6001600160a01b03166105c061054a565b6001600160a01b03161461061b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106605760405162461bcd60e51b81526004018080602001828103825260268152602001806108916026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6106c361079e565b6001600160a01b03166106d461054a565b6001600160a01b03161461072f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8061076b5760405162461bcd60e51b815260040180806020018281038252602581526020018061086c6025913960400191505060405180910390fd5b600381905560405181907fe200219383a2dbe79fad4e1549a81b6057429299f33583641c5fdddcdc0b379790600090a250565b3390565b6000826107b1575060006107fe565b828202828482816107be57fe5b04146107fb5760405162461bcd60e51b81526004018080602001828103825260218152602001806108b76021913960400191505060405180910390fd5b90505b92915050565b600080821161085a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161086357fe5b04939250505056fe42616e64776964746847656e657261746f723a2070726963652063616e6e6f7420626520304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7742616e64776964746847656e657261746f723a205369676e617475726520646f65736e27742068617665203634206279746573a2646970667358221220f91ec99d2617d86852e5a7b9e83177368e551623bc5a0faa1daa4f51dfd32a2764736f6c6343000606003342616e64776964746847656e657261746f723a20677261766974792062726964676520616464726573732063616e6e6f74206265206e756c6c42616e64776964746847656e657261746f723a20657263323020616464726573732063616e6e6f74206265206e756c6c", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80639e0dda8b116100665780639e0dda8b146101825780639fbb65e9146101b1578063a4da2d02146101b9578063f2fde38b146101c1578063f6a33253146101e757610093565b8063715018a61461009857806373f48677146100a2578063785e9e86146101565780638da5cb5b1461017a575b600080fd5b6100a0610204565b005b6100a0600480360360808110156100b857600080fd5b8135916020810135918101906060810160408201356401000000008111156100df57600080fd5b8201836020820111156100f157600080fd5b8035906020019184600183028401116401000000008311171561011357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506102c2915050565b61015e61053b565b604080516001600160a01b039092168252519081900360200190f35b61015e61054a565b61019f6004803603602081101561019857600080fd5b5035610559565b60408051918252519081900360200190f35b61019f610592565b61015e610598565b6100a0600480360360208110156101d757600080fd5b50356001600160a01b03166105a7565b6100a0600480360360208110156101fd57600080fd5b50356106bb565b61020c61079e565b6001600160a01b031661021d61054a565b6001600160a01b031614610278576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b81516040146103025760405162461bcd60e51b81526004018080602001828103825260338152602001806108d86033913960400191505060405180910390fd5b600154604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561035c57600080fd5b505af1158015610370573d6000803e3d6000fd5b505050506040513d602081101561038657600080fd5b50506001546002546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018890529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156103e157600080fd5b505af11580156103f5573d6000803e3d6000fd5b505050506040513d602081101561040b57600080fd5b505060025460015460408051631ffbe7f960e01b81526001600160a01b039283166004820152602481018590526044810188905290519190921691631ffbe7f991606480830192600092919082900301818387803b15801561046c57600080fd5b505af1158015610480573d6000803e3d6000fd5b50505050600061048f85610559565b905081847fc300d88f6eea8461741d440d04aa6147e081770af25e30862f6cc38d1033b9d183866040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156104f95781810151838201526020016104e1565b50505050905090810190601f1680156105265780820380516001836020036101000a031916815260200191505b50935050505060405180910390a35050505050565b6001546001600160a01b031681565b6000546001600160a01b031690565b600080610571600354846107a290919063ffffffff16565b905061058b81670de0b6b3a764000063ffffffff61080416565b9392505050565b60035481565b6002546001600160a01b031681565b6105af61079e565b6001600160a01b03166105c061054a565b6001600160a01b03161461061b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106605760405162461bcd60e51b81526004018080602001828103825260268152602001806108916026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6106c361079e565b6001600160a01b03166106d461054a565b6001600160a01b03161461072f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8061076b5760405162461bcd60e51b815260040180806020018281038252602581526020018061086c6025913960400191505060405180910390fd5b600381905560405181907fe200219383a2dbe79fad4e1549a81b6057429299f33583641c5fdddcdc0b379790600090a250565b3390565b6000826107b1575060006107fe565b828202828482816107be57fe5b04146107fb5760405162461bcd60e51b81526004018080602001828103825260218152602001806108b76021913960400191505060405180910390fd5b90505b92915050565b600080821161085a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161086357fe5b04939250505056fe42616e64776964746847656e657261746f723a2070726963652063616e6e6f7420626520304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7742616e64776964746847656e657261746f723a205369676e617475726520646f65736e27742068617665203634206279746573a2646970667358221220f91ec99d2617d86852e5a7b9e83177368e551623bc5a0faa1daa4f51dfd32a2764736f6c63430006060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/CosmosToken.sol/CosmosERC20.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/CosmosToken.sol/CosmosERC20.dbg.json deleted file mode 100644 index 24a82a1032..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/CosmosToken.sol/CosmosERC20.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/CosmosToken.sol/CosmosERC20.json b/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/CosmosToken.sol/CosmosERC20.json deleted file mode 100644 index fa39aa04ea..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/CosmosToken.sol/CosmosERC20.json +++ /dev/null @@ -1,325 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CosmosERC20", - "sourceName": "contracts/CosmosToken.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_gravityAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "_decimals", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mintForUnitTesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x6080604052600160ff1b6006553480156200001957600080fd5b5060405162000fc138038062000fc1833981810160405260808110156200003f57600080fd5b8151602083018051604051929492938301929190846401000000008211156200006757600080fd5b9083019060208201858111156200007d57600080fd5b82516401000000008111828201881017156200009857600080fd5b82525081516020918201929091019080838360005b83811015620000c7578181015183820152602001620000ad565b50505050905090810190601f168015620000f55780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011957600080fd5b9083019060208201858111156200012f57600080fd5b82516401000000008111828201881017156200014a57600080fd5b82525081516020918201929091019080838360005b83811015620001795781810151838201526020016200015f565b50505050905090810190601f168015620001a75780820380516001836020036101000a031916815260200191505b5060405260209081015185519093508592508491620001cc91600391850190620003b9565b508051620001e2906004906020840190620003b9565b50506005805460ff191660121790555062000206816001600160e01b036200022416565b6200021a846006546200023a60201b60201c565b505050506200045e565b6005805460ff191660ff92909216919091179055565b6001600160a01b03821662000296576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620002ad600083836001600160e01b036200035216565b620002c9816002546200035760201b620009b61790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620002fc918390620009b662000357821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b505050565b600082820183811015620003b2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003fc57805160ff19168380011785556200042c565b828001600101855582156200042c579182015b828111156200042c5782518255916020019190600101906200040f565b506200043a9291506200043e565b5090565b6200045b91905b808211156200043a576000815560010162000445565b90565b610b53806200046e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80633950935111610071578063395093511461021257806370a082311461023e57806395d89b4114610264578063a457c2d71461026c578063a9059cbb14610298578063dd62ed3e146102c4576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd146101905780632ebdf54d146101c6578063313ce567146101f4575b600080fd5b6100c16102f2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610388565b604080519115158252519081900360200190f35b61017e6103a5565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b038135811691602081013590911690604001356103ab565b6101f2600480360360408110156101dc57600080fd5b506001600160a01b038135169060200135610438565b005b6101fc610446565b6040805160ff9092168252519081900360200190f35b6101626004803603604081101561022857600080fd5b506001600160a01b03813516906020013561044f565b61017e6004803603602081101561025457600080fd5b50356001600160a01b03166104a3565b6100c16104be565b6101626004803603604081101561028257600080fd5b506001600160a01b03813516906020013561051f565b610162600480360360408110156102ae57600080fd5b506001600160a01b03813516906020013561058d565b61017e600480360360408110156102da57600080fd5b506001600160a01b03813581169160200135166105a1565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b820191906000526020600020905b81548152906001019060200180831161036157829003601f168201915b5050505050905090565b600061039c6103956105cc565b84846105d0565b50600192915050565b60025490565b60006103b88484846106bc565b61042e846103c46105cc565b61042985604051806060016040528060288152602001610a88602891396001600160a01b038a166000908152600160205260408120906104026105cc565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61082316565b6105d0565b5060019392505050565b61044282826108ba565b5050565b60055460ff1690565b600061039c61045c6105cc565b84610429856001600061046d6105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6109b616565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b600061039c61052c6105cc565b8461042985604051806060016040528060258152602001610af960259139600160006105566105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61082316565b600061039c61059a6105cc565b84846106bc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106155760405162461bcd60e51b8152600401808060200182810382526024815260200180610ad56024913960400191505060405180910390fd5b6001600160a01b03821661065a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a406022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107015760405162461bcd60e51b8152600401808060200182810382526025815260200180610ab06025913960400191505060405180910390fd5b6001600160a01b0382166107465760405162461bcd60e51b8152600401808060200182810382526023815260200180610a1d6023913960400191505060405180910390fd5b610751838383610a17565b61079481604051806060016040528060268152602001610a62602691396001600160a01b038616600090815260208190526040902054919063ffffffff61082316565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107c9908263ffffffff6109b616565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108b25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561087757818101518382015260200161085f565b50505050905090810190601f1680156108a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038216610915576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61092160008383610a17565b600254610934908263ffffffff6109b616565b6002556001600160a01b038216600090815260208190526040902054610960908263ffffffff6109b616565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015610a10576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220465410ed025b5712ee2eaddad7a20856f64710d3b57e1ff91396130750dfabd564736f6c63430006060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80633950935111610071578063395093511461021257806370a082311461023e57806395d89b4114610264578063a457c2d71461026c578063a9059cbb14610298578063dd62ed3e146102c4576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd146101905780632ebdf54d146101c6578063313ce567146101f4575b600080fd5b6100c16102f2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610388565b604080519115158252519081900360200190f35b61017e6103a5565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b038135811691602081013590911690604001356103ab565b6101f2600480360360408110156101dc57600080fd5b506001600160a01b038135169060200135610438565b005b6101fc610446565b6040805160ff9092168252519081900360200190f35b6101626004803603604081101561022857600080fd5b506001600160a01b03813516906020013561044f565b61017e6004803603602081101561025457600080fd5b50356001600160a01b03166104a3565b6100c16104be565b6101626004803603604081101561028257600080fd5b506001600160a01b03813516906020013561051f565b610162600480360360408110156102ae57600080fd5b506001600160a01b03813516906020013561058d565b61017e600480360360408110156102da57600080fd5b506001600160a01b03813581169160200135166105a1565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b820191906000526020600020905b81548152906001019060200180831161036157829003601f168201915b5050505050905090565b600061039c6103956105cc565b84846105d0565b50600192915050565b60025490565b60006103b88484846106bc565b61042e846103c46105cc565b61042985604051806060016040528060288152602001610a88602891396001600160a01b038a166000908152600160205260408120906104026105cc565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61082316565b6105d0565b5060019392505050565b61044282826108ba565b5050565b60055460ff1690565b600061039c61045c6105cc565b84610429856001600061046d6105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6109b616565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b600061039c61052c6105cc565b8461042985604051806060016040528060258152602001610af960259139600160006105566105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61082316565b600061039c61059a6105cc565b84846106bc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106155760405162461bcd60e51b8152600401808060200182810382526024815260200180610ad56024913960400191505060405180910390fd5b6001600160a01b03821661065a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a406022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107015760405162461bcd60e51b8152600401808060200182810382526025815260200180610ab06025913960400191505060405180910390fd5b6001600160a01b0382166107465760405162461bcd60e51b8152600401808060200182810382526023815260200180610a1d6023913960400191505060405180910390fd5b610751838383610a17565b61079481604051806060016040528060268152602001610a62602691396001600160a01b038616600090815260208190526040902054919063ffffffff61082316565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107c9908263ffffffff6109b616565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108b25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561087757818101518382015260200161085f565b50505050905090810190601f1680156108a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038216610915576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61092160008383610a17565b600254610934908263ffffffff6109b616565b6002556001600160a01b038216600090815260208190526040902054610960908263ffffffff6109b616565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015610a10576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220465410ed025b5712ee2eaddad7a20856f64710d3b57e1ff91396130750dfabd564736f6c63430006060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/Gravity.sol/Gravity.dbg.json b/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/Gravity.sol/Gravity.dbg.json deleted file mode 100644 index 24a82a1032..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/Gravity.sol/Gravity.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../build-info/10e5405221d21329b74f12bf00d0cd2d.json" -} diff --git a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/Gravity.sol/Gravity.json b/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/Gravity.sol/Gravity.json deleted file mode 100644 index 109851c28c..0000000000 --- a/contracts/basic-bandwidth-generation/artifacts/contracts/contracts/Gravity.sol/Gravity.json +++ /dev/null @@ -1,678 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Gravity", - "sourceName": "contracts/Gravity.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_gravityId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_powerThreshold", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "_validators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_powers", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "_cosmosDenom", - "type": "string" - }, - { - "indexed": true, - "internalType": "address", - "name": "_tokenContract", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_decimals", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_eventNonce", - "type": "uint256" - } - ], - "name": "ERC20DeployedEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "_invalidationId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_invalidationNonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_returnData", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_eventNonce", - "type": "uint256" - } - ], - "name": "LogicCallEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_tokenContract", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_destination", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_eventNonce", - "type": "uint256" - } - ], - "name": "SendToCosmosEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_batchNonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_eventNonce", - "type": "uint256" - } - ], - "name": "TransactionBatchExecutedEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_newValsetNonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_eventNonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "_validators", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_powers", - "type": "uint256[]" - } - ], - "name": "ValsetUpdatedEvent", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_cosmosDenom", - "type": "string" - }, - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "_decimals", - "type": "uint8" - } - ], - "name": "deployERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_erc20Address", - "type": "address" - } - ], - "name": "lastBatchNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_invalidation_id", - "type": "bytes32" - } - ], - "name": "lastLogicCallNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_tokenContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_destination", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "sendToCosmos", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "state_gravityId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "state_invalidationMapping", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "state_lastBatchNonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "state_lastEventNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "state_lastValsetCheckpoint", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "state_lastValsetNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "state_powerThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_currentValidators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_currentPowers", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_currentValsetNonce", - "type": "uint256" - }, - { - "internalType": "uint8[]", - "name": "_v", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "_r", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "_s", - "type": "bytes32[]" - }, - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "_destinations", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_fees", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_batchNonce", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_tokenContract", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_batchTimeout", - "type": "uint256" - } - ], - "name": "submitBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_currentValidators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_currentPowers", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_currentValsetNonce", - "type": "uint256" - }, - { - "internalType": "uint8[]", - "name": "_v", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "_r", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "_s", - "type": "bytes32[]" - }, - { - "components": [ - { - "internalType": "uint256[]", - "name": "transferAmounts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "transferTokenContracts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "feeAmounts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "feeTokenContracts", - "type": "address[]" - }, - { - "internalType": "address", - "name": "logicContractAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "timeOut", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "invalidationId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "invalidationNonce", - "type": "uint256" - } - ], - "internalType": "struct LogicCallArgs", - "name": "_args", - "type": "tuple" - } - ], - "name": "submitLogicCall", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_currentValidators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_currentPowers", - "type": "uint256[]" - }, - { - "internalType": "uint8[]", - "name": "_v", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "_r", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "_s", - "type": "bytes32[]" - }, - { - "internalType": "bytes32", - "name": "_theHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_powerThreshold", - "type": "uint256" - } - ], - "name": "testCheckValidatorSignatures", - "outputs": [], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_validators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_powers", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_valsetNonce", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_gravityId", - "type": "bytes32" - } - ], - "name": "testMakeCheckpoint", - "outputs": [], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_newValidators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_newPowers", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_newValsetNonce", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "_currentValidators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_currentPowers", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_currentValsetNonce", - "type": "uint256" - }, - { - "internalType": "uint8[]", - "name": "_v", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "_r", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "_s", - "type": "bytes32[]" - } - ], - "name": "updateValset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x6080604052600060045560016005553480156200001b57600080fd5b50604051620038c2380380620038c28339810160408190526200003e9162000233565b60016000558051825114620000705760405162461bcd60e51b8152600401620000679062000431565b60405180910390fd5b6000805b8251811015620000af578281815181106200008b57fe5b60200260200101518201915084821115620000a657620000af565b60010162000074565b50838111620000d25760405162461bcd60e51b81526004016200006790620003d4565b6000620000eb848483896001600160e01b036200014d16565b60068790556007869055600181905560045460055460405192935090917fb119f1f36224601586b5037da909ecf37e83864dddea5d32ad4e32ac1d97e62b9162000139918890889062000468565b60405180910390a2505050505050620004e8565b6040516000906918da1958dadc1bda5b9d60b21b9082906200017c908590849088908b908b906020016200038d565b60408051808303601f190181529190528051602090910120979650505050505050565b80516001600160a01b0381168114620001b757600080fd5b92915050565b600082601f830112620001ce578081fd5b8151620001e5620001df82620004c8565b620004a1565b8181529150602080830190848101818402860182018710156200020757600080fd5b60005b8481101562000228578151845292820192908201906001016200020a565b505050505092915050565b6000806000806080858703121562000249578384fd5b845160208087015160408801519296509450906001600160401b038082111562000271578485fd5b81880189601f82011262000283578586fd5b8051925062000296620001df84620004c8565b83815284810190828601868602840187018d1015620002b3578889fd5b8893505b85841015620002e157620002cc8d826200019f565b835260019390930192918601918601620002b7565b5060608b01519097509450505080831115620002fb578384fd5b50506200030b87828801620001bd565b91505092959194509250565b6000815180845260208085019450808401835b83811015620003515781516001600160a01b0316875295820195908201906001016200032a565b509495945050505050565b6000815180845260208085019450808401835b8381101562000351578151875295820195908201906001016200036f565b600086825285602083015284604083015260a06060830152620003b460a083018562000317565b8281036080840152620003c881856200035c565b98975050505050505050565b6020808252603c908201527f5375626d69747465642076616c696461746f7220736574207369676e6174757260408201527f657320646f206e6f74206861766520656e6f75676820706f7765722e00000000606082015260800190565b6020808252601f908201527f4d616c666f726d65642063757272656e742076616c696461746f722073657400604082015260600190565b60008482526060602083015262000483606083018562000317565b82810360408401526200049781856200035c565b9695505050505050565b6040518181016001600160401b0381118282101715620004c057600080fd5b604052919050565b60006001600160401b03821115620004de578081fd5b5060209081020190565b6133ca80620004f86000396000f3fe60806040523480156200001157600080fd5b5060043610620001185760003560e01c8063c227c30b11620000a5578063e3cb9f62116200006f578063e3cb9f621462000224578063e5a2b5d2146200023b578063f2b533071462000245578063f7955637146200024f5762000118565b8063c227c30b14620001c8578063c9d194d514620001df578063db7c4e5714620001f6578063df97174b146200020d5762000118565b80637dfb6f8611620000e75780637dfb6f86146200018657806383b435db146200019d578063b56561fe14620001b4578063bdda81d414620001be5762000118565b8063011b2174146200011d5780630c246c82146200014c5780631ffbe7f9146200016557806373b20547146200017c575b600080fd5b620001346200012e366004620013ef565b62000266565b60405162000143919062001c0d565b60405180910390f35b620001636200015d36600462001830565b62000281565b005b62000163620001763660046200140d565b620005ce565b6200013462000684565b6200013462000197366004620019d4565b6200068a565b62000163620001ae36600462001678565b6200069c565b6200013462000968565b620001346200096e565b62000163620001d93660046200193b565b62000974565b62000134620001f0366004620019d4565b62000989565b62000163620002073660046200144e565b6200099b565b620001346200021e366004620013ef565b620009b5565b62000163620002353660046200153c565b620009c7565b6200013462000b53565b6200013462000b59565b6200016362000260366004620019ed565b62000b5f565b6001600160a01b031660009081526002602052604090205490565b60026000541415620002b05760405162461bcd60e51b8152600401620002a790620022df565b60405180910390fd5b600260005560c08101514310620002db5760405162461bcd60e51b8152600401620002a79062001fec565b61010081015160e082015160009081526003602052604090205410620003155760405162461bcd60e51b8152600401620002a79062001f58565b8551875114801562000328575083518751145b801562000336575082518751145b801562000344575081518751145b620003635760405162461bcd60e51b8152600401620002a790620022a8565b6001546200037688888860065462000c11565b14620003965760405162461bcd60e51b8152600401620002a79062001e6e565b60208101515181515114620003bf5760405162461bcd60e51b8152600401620002a790620020f5565b80606001515181604001515114620003eb5760405162461bcd60e51b8152600401620002a79062001e3e565b6000600654681b1bd9da58d0d85b1b60ba1b836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b6101000151604051602001620004479b9a9998979695949392919062001c5d565b6040516020818303038152906040528051906020012090506200047288888787878660075462000c63565b61010082015160e08301516000908152600360205260408120919091555b825151811015620004f857620004ef836080015184600001518381518110620004b557fe5b602002602001015185602001518481518110620004ce57fe5b60200260200101516001600160a01b031662000d6d9092919063ffffffff16565b60010162000490565b5060606200050f83608001518460a0015162000dcc565b905060005b8360400151518110156200055a576200055133856040015183815181106200053857fe5b602002602001015186606001518481518110620004ce57fe5b60010162000514565b506005546200057190600163ffffffff62000e1916565b600581905560e08401516101008501516040517f7c2bb24f8e1b3725cb613d7f11ef97d9745cc97a0e40f730621c052d684077a193620005b693929186919062001d83565b60405180910390a15050600160005550505050505050565b60026000541415620005f45760405162461bcd60e51b8152600401620002a790620022df565b6002600055620006166001600160a01b03841633308463ffffffff62000e4116565b6005546200062c90600163ffffffff62000e1916565b6005819055604051839133916001600160a01b038716917fd7767894d73c589daeca9643f445f03d7be61aad2950c117e7cbff4176fca7e491620006729187916200234f565b60405180910390a45050600160005550565b60055481565b60036020526000908152604090205481565b60026000541415620006c25760405162461bcd60e51b8152600401620002a790620022df565b600260008181556001600160a01b038416815260209190915260409020548311620007015760405162461bcd60e51b8152600401620002a79062001ecb565b804310620007235760405162461bcd60e51b8152600401620002a79062002098565b8a518c5114801562000736575088518c51145b801562000744575087518c51145b801562000752575086518c51145b620007715760405162461bcd60e51b8152600401620002a790620022a8565b600154620007848d8d8d60065462000c11565b14620007a45760405162461bcd60e51b8152600401620002a79062001e6e565b84518651148015620007b7575083518651145b620007d65760405162461bcd60e51b8152600401620002a79062001f21565b620008348c8c8b8b8b6006546f0e8e4c2dce6c2c6e8d2dedc84c2e8c6d60831b8d8d8d8d8d8d6040516020016200081598979695949392919062001d0c565b6040516020818303038152906040528051906020012060075462000c63565b6001600160a01b0382166000908152600260205260408120849055805b8751811015620008d757620008a38782815181106200086c57fe5b60200260200101518983815181106200088157fe5b6020026020010151866001600160a01b031662000d6d9092919063ffffffff16565b620008cc868281518110620008b457fe5b60200260200101518362000e1990919063ffffffff16565b915060010162000851565b50620008f46001600160a01b038416338363ffffffff62000d6d16565b506005546200090b90600163ffffffff62000e1916565b60058190556040516001600160a01b0384169185917f02c7e81975f8edb86e2a0c038b7b86a49c744236abf0f6177ff5afc6986ab708916200094d9162001c0d565b60405180910390a35050600160005550505050505050505050565b60045481565b60065481565b620009828484848462000c11565b5050505050565b60009081526003602052604090205490565b620009ac8787878787878762000c63565b50505050505050565b60026020526000908152604090205481565b60026000541415620009ed5760405162461bcd60e51b8152600401620002a790620022df565b600260005583871162000a145760405162461bcd60e51b8152600401620002a790620021ca565b875189511462000a385760405162461bcd60e51b8152600401620002a79062002136565b8451865114801562000a4b575082518651145b801562000a59575081518651145b801562000a67575080518651145b62000a865760405162461bcd60e51b8152600401620002a790620022a8565b60015462000a9987878760065462000c11565b1462000ab95760405162461bcd60e51b8152600401620002a79062001e6e565b600062000acb8a8a8a60065462000c11565b905062000ae087878686868660075462000c63565b6001818155600489905560055462000afe9163ffffffff62000e1916565b600581905560405189917fb119f1f36224601586b5037da909ecf37e83864dddea5d32ad4e32ac1d97e62b9162000b3a91908e908e9062002316565b60405180910390a2505060016000555050505050505050565b60075481565b60015481565b60003084848460405162000b7390620010d0565b62000b82949392919062001ba5565b604051809103906000f08015801562000b9f573d6000803e3d6000fd5b5060055490915062000bb990600163ffffffff62000e1916565b60058190556040516001600160a01b038316917f82fe3a4fa49c6382d0c085746698ddbbafe6c2bf61285b19410644b5b26287c79162000c029189918991899189919062001de8565b60405180910390a25050505050565b6040516000906918da1958dadc1bda5b9d60b21b90829062000c40908590849088908b908b9060200162001c16565b60408051808303601f190181529190528051602090910120979650505050505050565b6000805b885181101562000d405786818151811062000c7e57fe5b602002602001015160ff1660001462000d375762000cf089828151811062000ca257fe5b60200260200101518589848151811062000cb857fe5b602002602001015189858151811062000ccd57fe5b602002602001015189868151811062000ce257fe5b602002602001015162000e6b565b62000d0f5760405162461bcd60e51b8152600401620002a7906200200f565b87818151811062000d1c57fe5b6020026020010151820191508282111562000d375762000d40565b60010162000c67565b5081811162000d635760405162461bcd60e51b8152600401620002a7906200216d565b5050505050505050565b62000dc78363a9059cbb60e01b848460405160240162000d8f92919062001bf4565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262000f0b565b505050565b606062000e1083836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525062000fa2565b90505b92915050565b60008282018381101562000e105760405162461bcd60e51b8152600401620002a79062001fb5565b62000e65846323b872dd60e01b85858560405160240162000d8f9392919062001b81565b50505050565b6000808560405160200162000e81919062001b50565b6040516020818303038152906040528051906020012090506001818686866040516000815260200160405260405162000ebe949392919062001db5565b6020604051602081039080840390855afa15801562000ee1573d6000803e3d6000fd5b505050602060405103516001600160a01b0316876001600160a01b03161491505095945050505050565b606062000f62826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662000fa29092919063ffffffff16565b80519091501562000dc7578080602001905181019062000f839190620019b2565b62000dc75760405162461bcd60e51b8152600401620002a7906200225e565b606062000fb3848460008562000fbd565b90505b9392505050565b60608247101562000fe25760405162461bcd60e51b8152600401620002a79062002052565b62000fed856200108c565b6200100c5760405162461bcd60e51b8152600401620002a79062002227565b60006060866001600160a01b031685876040516200102b919062001b32565b60006040518083038185875af1925050503d80600081146200106a576040519150601f19603f3d011682016040523d82523d6000602084013e6200106f565b606091505b50915091506200108182828662001092565b979650505050505050565b3b151590565b60608315620010a357508162000fb6565b825115620010b45782518084602001fd5b8160405162461bcd60e51b8152600401620002a7919062001dd3565b610fc180620023d483390190565b80356001600160a01b038116811462000e1357600080fd5b600082601f83011262001107578081fd5b81356200111e620011188262002384565b6200235d565b8181529150602080830190848101818402860182018710156200114057600080fd5b60005b848110156200116b57620011588883620010de565b8452928201929082019060010162001143565b505050505092915050565b600082601f83011262001187578081fd5b813562001198620011188262002384565b818152915060208083019084810181840286018201871015620011ba57600080fd5b60005b848110156200116b57813584529282019290820190600101620011bd565b600082601f830112620011ec578081fd5b8135620011fd620011188262002384565b8181529150602080830190848101818402860182018710156200121f57600080fd5b60005b848110156200116b57620012378883620013dd565b8452928201929082019060010162001222565b600082601f8301126200125b578081fd5b81356001600160401b0381111562001271578182fd5b62001286601f8201601f19166020016200235d565b91508082528360208285010111156200129e57600080fd5b8060208401602084013760009082016020015292915050565b6000610120808385031215620012cb578182fd5b620012d6816200235d565b91505081356001600160401b0380821115620012f157600080fd5b620012ff8583860162001176565b835260208401359150808211156200131657600080fd5b6200132485838601620010f6565b602084015260408401359150808211156200133e57600080fd5b6200134c8583860162001176565b604084015260608401359150808211156200136657600080fd5b6200137485838601620010f6565b6060840152620013888560808601620010de565b608084015260a0840135915080821115620013a257600080fd5b50620013b1848285016200124a565b60a08301525060c082013560c082015260e082013560e082015261010080830135818301525092915050565b803560ff8116811462000e1357600080fd5b60006020828403121562001401578081fd5b62000e108383620010de565b60008060006060848603121562001422578182fd5b83356001600160a01b038116811462001439578283fd5b95602085013595506040909401359392505050565b600080600080600080600060e0888a03121562001469578283fd5b87356001600160401b038082111562001480578485fd5b6200148e8b838c01620010f6565b985060208a0135915080821115620014a4578485fd5b620014b28b838c0162001176565b975060408a0135915080821115620014c8578485fd5b620014d68b838c01620011db565b965060608a0135915080821115620014ec578485fd5b620014fa8b838c0162001176565b955060808a013591508082111562001510578485fd5b506200151f8a828b0162001176565b93505060a0880135915060c0880135905092959891949750929550565b60008060008060008060008060006101208a8c0312156200155b578182fd5b89356001600160401b038082111562001572578384fd5b620015808d838e01620010f6565b9a5060208c013591508082111562001596578384fd5b620015a48d838e0162001176565b995060408c0135985060608c0135915080821115620015c1578384fd5b620015cf8d838e01620010f6565b975060808c0135915080821115620015e5578384fd5b620015f38d838e0162001176565b965060a08c0135955060c08c013591508082111562001610578384fd5b6200161e8d838e01620011db565b945060e08c013591508082111562001634578384fd5b620016428d838e0162001176565b93506101008c013591508082111562001659578283fd5b50620016688c828d0162001176565b9150509295985092959850929598565b6000806000806000806000806000806000806101808d8f0312156200169b578586fd5b6001600160401b038d351115620016b0578586fd5b620016bf8e8e358f01620010f6565b9b506001600160401b0360208e01351115620016d9578586fd5b620016eb8e60208f01358f0162001176565b9a5060408d013599506001600160401b0360608e013511156200170c578586fd5b6200171e8e60608f01358f01620011db565b98506001600160401b0360808e0135111562001738578586fd5b6200174a8e60808f01358f0162001176565b97506001600160401b0360a08e0135111562001764578586fd5b620017768e60a08f01358f0162001176565b96506001600160401b0360c08e0135111562001790578586fd5b620017a28e60c08f01358f0162001176565b95506001600160401b0360e08e01351115620017bc578283fd5b620017ce8e60e08f01358f01620010f6565b94506001600160401b036101008e01351115620017e9578283fd5b620017fc8e6101008f01358f0162001176565b93506101208d01359250620018168e6101408f01620010de565b91506101608d013590509295989b509295989b509295989b565b600080600080600080600060e0888a0312156200184b578081fd5b87356001600160401b038082111562001862578283fd5b620018708b838c01620010f6565b985060208a013591508082111562001886578283fd5b620018948b838c0162001176565b975060408a0135965060608a0135915080821115620018b1578283fd5b620018bf8b838c01620011db565b955060808a0135915080821115620018d5578283fd5b620018e38b838c0162001176565b945060a08a0135915080821115620018f9578283fd5b620019078b838c0162001176565b935060c08a01359150808211156200191d578283fd5b506200192c8a828b01620012b7565b91505092959891949750929550565b6000806000806080858703121562001951578182fd5b84356001600160401b038082111562001968578384fd5b6200197688838901620010f6565b955060208701359150808211156200198c578384fd5b506200199b8782880162001176565b949794965050505060408301359260600135919050565b600060208284031215620019c4578081fd5b8151801515811462000e10578182fd5b600060208284031215620019e6578081fd5b5035919050565b6000806000806080858703121562001a03578182fd5b84356001600160401b038082111562001a1a578384fd5b62001a28888389016200124a565b9550602087013591508082111562001a3e578384fd5b62001a4c888389016200124a565b9450604087013591508082111562001a62578384fd5b5062001a71878288016200124a565b92505062001a838660608701620013dd565b905092959194509250565b6000815180845260208085019450808401835b8381101562001ac85781516001600160a01b03168752958201959082019060010162001aa1565b509495945050505050565b6000815180845260208085019450808401835b8381101562001ac85781518752958201959082019060010162001ae6565b6000815180845262001b1e816020860160208601620023a4565b601f01601f19169290920160200192915050565b6000825162001b46818460208701620023a4565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038516815260806020820181905260009062001bcb9083018662001b04565b828103604084015262001bdf818662001b04565b91505060ff8316606083015295945050505050565b6001600160a01b03929092168252602082015260400190565b90815260200190565b600086825285602083015284604083015260a0606083015262001c3d60a083018562001a8e565b828103608084015262001c51818562001ad3565b98975050505050505050565b60006101608d83528c602084015280604084015262001c7f8184018d62001ad3565b838103606085015262001c93818d62001a8e565b915050828103608084015262001caa818b62001ad3565b83810360a085015262001cbe818b62001a8e565b6001600160a01b038a1660c086015284810360e0860152915062001ce59050818862001b04565b61010084019690965250506101208101929092526101409091015298975050505050505050565b60006101008a835289602084015280604084015262001d2e8184018a62001ad3565b838103606085015262001d42818a62001a8e565b915050828103608084015262001d59818862001ad3565b60a084019690965250506001600160a01b039290921660c083015260e09091015295945050505050565b60008582528460208301526080604083015262001da4608083018562001b04565b905082606083015295945050505050565b93845260ff9290921660208401526040830152606082015260800190565b60006020825262000e10602083018462001b04565b600060a0825262001dfd60a083018862001b04565b828103602084015262001e11818862001b04565b838103604085015262001e25818862001b04565b60ff969096166060850152505050608001529392505050565b6020808252601690820152754d616c666f726d6564206c697374206f66206665657360501b604082015260600190565b6020808252603f908201527f537570706c6965642063757272656e742076616c696461746f727320616e642060408201527f706f7765727320646f206e6f74206d6174636820636865636b706f696e742e00606082015260800190565b60208082526036908201527f4e6577206261746368206e6f6e6365206d7573742062652067726561746572206040820152757468616e207468652063757272656e74206e6f6e636560501b606082015260800190565b6020808252601f908201527f4d616c666f726d6564206261746368206f66207472616e73616374696f6e7300604082015260600190565b6020808252603d908201527f4e657720696e76616c69646174696f6e206e6f6e6365206d757374206265206760408201527f726561746572207468616e207468652063757272656e74206e6f6e6365000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b602080825260099082015268151a5b5959081bdd5d60ba1b604082015260600190565b60208082526023908201527f56616c696461746f72207369676e617475726520646f6573206e6f74206d617460408201526231b41760e91b606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252603b908201527f42617463682074696d656f7574206d757374206265206772656174657220746860408201527f616e207468652063757272656e7420626c6f636b206865696768740000000000606082015260800190565b60208082526021908201527f4d616c666f726d6564206c697374206f6620746f6b656e207472616e736665726040820152607360f81b606082015260800190565b6020808252601b908201527f4d616c666f726d6564206e65772076616c696461746f72207365740000000000604082015260600190565b6020808252603c908201527f5375626d69747465642076616c696461746f7220736574207369676e6174757260408201527f657320646f206e6f74206861766520656e6f75676820706f7765722e00000000606082015260800190565b60208082526037908201527f4e65772076616c736574206e6f6e6365206d757374206265206772656174657260408201527f207468616e207468652063757272656e74206e6f6e6365000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f4d616c666f726d65642063757272656e742076616c696461746f722073657400604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008482526060602083015262002331606083018562001a8e565b828103604084015262002345818562001ad3565b9695505050505050565b918252602082015260400190565b6040518181016001600160401b03811182821017156200237c57600080fd5b604052919050565b60006001600160401b038211156200239a578081fd5b5060209081020190565b60005b83811015620023c1578181015183820152602001620023a7565b8381111562000e65575050600091015256fe6080604052600160ff1b6006553480156200001957600080fd5b5060405162000fc138038062000fc1833981810160405260808110156200003f57600080fd5b8151602083018051604051929492938301929190846401000000008211156200006757600080fd5b9083019060208201858111156200007d57600080fd5b82516401000000008111828201881017156200009857600080fd5b82525081516020918201929091019080838360005b83811015620000c7578181015183820152602001620000ad565b50505050905090810190601f168015620000f55780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011957600080fd5b9083019060208201858111156200012f57600080fd5b82516401000000008111828201881017156200014a57600080fd5b82525081516020918201929091019080838360005b83811015620001795781810151838201526020016200015f565b50505050905090810190601f168015620001a75780820380516001836020036101000a031916815260200191505b5060405260209081015185519093508592508491620001cc91600391850190620003b9565b508051620001e2906004906020840190620003b9565b50506005805460ff191660121790555062000206816001600160e01b036200022416565b6200021a846006546200023a60201b60201c565b505050506200045e565b6005805460ff191660ff92909216919091179055565b6001600160a01b03821662000296576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620002ad600083836001600160e01b036200035216565b620002c9816002546200035760201b620009b61790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620002fc918390620009b662000357821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b505050565b600082820183811015620003b2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003fc57805160ff19168380011785556200042c565b828001600101855582156200042c579182015b828111156200042c5782518255916020019190600101906200040f565b506200043a9291506200043e565b5090565b6200045b91905b808211156200043a576000815560010162000445565b90565b610b53806200046e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80633950935111610071578063395093511461021257806370a082311461023e57806395d89b4114610264578063a457c2d71461026c578063a9059cbb14610298578063dd62ed3e146102c4576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd146101905780632ebdf54d146101c6578063313ce567146101f4575b600080fd5b6100c16102f2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610388565b604080519115158252519081900360200190f35b61017e6103a5565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b038135811691602081013590911690604001356103ab565b6101f2600480360360408110156101dc57600080fd5b506001600160a01b038135169060200135610438565b005b6101fc610446565b6040805160ff9092168252519081900360200190f35b6101626004803603604081101561022857600080fd5b506001600160a01b03813516906020013561044f565b61017e6004803603602081101561025457600080fd5b50356001600160a01b03166104a3565b6100c16104be565b6101626004803603604081101561028257600080fd5b506001600160a01b03813516906020013561051f565b610162600480360360408110156102ae57600080fd5b506001600160a01b03813516906020013561058d565b61017e600480360360408110156102da57600080fd5b506001600160a01b03813581169160200135166105a1565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b820191906000526020600020905b81548152906001019060200180831161036157829003601f168201915b5050505050905090565b600061039c6103956105cc565b84846105d0565b50600192915050565b60025490565b60006103b88484846106bc565b61042e846103c46105cc565b61042985604051806060016040528060288152602001610a88602891396001600160a01b038a166000908152600160205260408120906104026105cc565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61082316565b6105d0565b5060019392505050565b61044282826108ba565b5050565b60055460ff1690565b600061039c61045c6105cc565b84610429856001600061046d6105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6109b616565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b600061039c61052c6105cc565b8461042985604051806060016040528060258152602001610af960259139600160006105566105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61082316565b600061039c61059a6105cc565b84846106bc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106155760405162461bcd60e51b8152600401808060200182810382526024815260200180610ad56024913960400191505060405180910390fd5b6001600160a01b03821661065a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a406022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107015760405162461bcd60e51b8152600401808060200182810382526025815260200180610ab06025913960400191505060405180910390fd5b6001600160a01b0382166107465760405162461bcd60e51b8152600401808060200182810382526023815260200180610a1d6023913960400191505060405180910390fd5b610751838383610a17565b61079481604051806060016040528060268152602001610a62602691396001600160a01b038616600090815260208190526040902054919063ffffffff61082316565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107c9908263ffffffff6109b616565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108b25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561087757818101518382015260200161085f565b50505050905090810190601f1680156108a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038216610915576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61092160008383610a17565b600254610934908263ffffffff6109b616565b6002556001600160a01b038216600090815260208190526040902054610960908263ffffffff6109b616565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015610a10576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220465410ed025b5712ee2eaddad7a20856f64710d3b57e1ff91396130750dfabd564736f6c63430006060033a264697066735822122018de9c84330245743d440a39eb3a986a4b6ba93368acb80508a288ff06657a3d64736f6c63430006060033", - "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620001185760003560e01c8063c227c30b11620000a5578063e3cb9f62116200006f578063e3cb9f621462000224578063e5a2b5d2146200023b578063f2b533071462000245578063f7955637146200024f5762000118565b8063c227c30b14620001c8578063c9d194d514620001df578063db7c4e5714620001f6578063df97174b146200020d5762000118565b80637dfb6f8611620000e75780637dfb6f86146200018657806383b435db146200019d578063b56561fe14620001b4578063bdda81d414620001be5762000118565b8063011b2174146200011d5780630c246c82146200014c5780631ffbe7f9146200016557806373b20547146200017c575b600080fd5b620001346200012e366004620013ef565b62000266565b60405162000143919062001c0d565b60405180910390f35b620001636200015d36600462001830565b62000281565b005b62000163620001763660046200140d565b620005ce565b6200013462000684565b6200013462000197366004620019d4565b6200068a565b62000163620001ae36600462001678565b6200069c565b6200013462000968565b620001346200096e565b62000163620001d93660046200193b565b62000974565b62000134620001f0366004620019d4565b62000989565b62000163620002073660046200144e565b6200099b565b620001346200021e366004620013ef565b620009b5565b62000163620002353660046200153c565b620009c7565b6200013462000b53565b6200013462000b59565b6200016362000260366004620019ed565b62000b5f565b6001600160a01b031660009081526002602052604090205490565b60026000541415620002b05760405162461bcd60e51b8152600401620002a790620022df565b60405180910390fd5b600260005560c08101514310620002db5760405162461bcd60e51b8152600401620002a79062001fec565b61010081015160e082015160009081526003602052604090205410620003155760405162461bcd60e51b8152600401620002a79062001f58565b8551875114801562000328575083518751145b801562000336575082518751145b801562000344575081518751145b620003635760405162461bcd60e51b8152600401620002a790620022a8565b6001546200037688888860065462000c11565b14620003965760405162461bcd60e51b8152600401620002a79062001e6e565b60208101515181515114620003bf5760405162461bcd60e51b8152600401620002a790620020f5565b80606001515181604001515114620003eb5760405162461bcd60e51b8152600401620002a79062001e3e565b6000600654681b1bd9da58d0d85b1b60ba1b836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b6101000151604051602001620004479b9a9998979695949392919062001c5d565b6040516020818303038152906040528051906020012090506200047288888787878660075462000c63565b61010082015160e08301516000908152600360205260408120919091555b825151811015620004f857620004ef836080015184600001518381518110620004b557fe5b602002602001015185602001518481518110620004ce57fe5b60200260200101516001600160a01b031662000d6d9092919063ffffffff16565b60010162000490565b5060606200050f83608001518460a0015162000dcc565b905060005b8360400151518110156200055a576200055133856040015183815181106200053857fe5b602002602001015186606001518481518110620004ce57fe5b60010162000514565b506005546200057190600163ffffffff62000e1916565b600581905560e08401516101008501516040517f7c2bb24f8e1b3725cb613d7f11ef97d9745cc97a0e40f730621c052d684077a193620005b693929186919062001d83565b60405180910390a15050600160005550505050505050565b60026000541415620005f45760405162461bcd60e51b8152600401620002a790620022df565b6002600055620006166001600160a01b03841633308463ffffffff62000e4116565b6005546200062c90600163ffffffff62000e1916565b6005819055604051839133916001600160a01b038716917fd7767894d73c589daeca9643f445f03d7be61aad2950c117e7cbff4176fca7e491620006729187916200234f565b60405180910390a45050600160005550565b60055481565b60036020526000908152604090205481565b60026000541415620006c25760405162461bcd60e51b8152600401620002a790620022df565b600260008181556001600160a01b038416815260209190915260409020548311620007015760405162461bcd60e51b8152600401620002a79062001ecb565b804310620007235760405162461bcd60e51b8152600401620002a79062002098565b8a518c5114801562000736575088518c51145b801562000744575087518c51145b801562000752575086518c51145b620007715760405162461bcd60e51b8152600401620002a790620022a8565b600154620007848d8d8d60065462000c11565b14620007a45760405162461bcd60e51b8152600401620002a79062001e6e565b84518651148015620007b7575083518651145b620007d65760405162461bcd60e51b8152600401620002a79062001f21565b620008348c8c8b8b8b6006546f0e8e4c2dce6c2c6e8d2dedc84c2e8c6d60831b8d8d8d8d8d8d6040516020016200081598979695949392919062001d0c565b6040516020818303038152906040528051906020012060075462000c63565b6001600160a01b0382166000908152600260205260408120849055805b8751811015620008d757620008a38782815181106200086c57fe5b60200260200101518983815181106200088157fe5b6020026020010151866001600160a01b031662000d6d9092919063ffffffff16565b620008cc868281518110620008b457fe5b60200260200101518362000e1990919063ffffffff16565b915060010162000851565b50620008f46001600160a01b038416338363ffffffff62000d6d16565b506005546200090b90600163ffffffff62000e1916565b60058190556040516001600160a01b0384169185917f02c7e81975f8edb86e2a0c038b7b86a49c744236abf0f6177ff5afc6986ab708916200094d9162001c0d565b60405180910390a35050600160005550505050505050505050565b60045481565b60065481565b620009828484848462000c11565b5050505050565b60009081526003602052604090205490565b620009ac8787878787878762000c63565b50505050505050565b60026020526000908152604090205481565b60026000541415620009ed5760405162461bcd60e51b8152600401620002a790620022df565b600260005583871162000a145760405162461bcd60e51b8152600401620002a790620021ca565b875189511462000a385760405162461bcd60e51b8152600401620002a79062002136565b8451865114801562000a4b575082518651145b801562000a59575081518651145b801562000a67575080518651145b62000a865760405162461bcd60e51b8152600401620002a790620022a8565b60015462000a9987878760065462000c11565b1462000ab95760405162461bcd60e51b8152600401620002a79062001e6e565b600062000acb8a8a8a60065462000c11565b905062000ae087878686868660075462000c63565b6001818155600489905560055462000afe9163ffffffff62000e1916565b600581905560405189917fb119f1f36224601586b5037da909ecf37e83864dddea5d32ad4e32ac1d97e62b9162000b3a91908e908e9062002316565b60405180910390a2505060016000555050505050505050565b60075481565b60015481565b60003084848460405162000b7390620010d0565b62000b82949392919062001ba5565b604051809103906000f08015801562000b9f573d6000803e3d6000fd5b5060055490915062000bb990600163ffffffff62000e1916565b60058190556040516001600160a01b038316917f82fe3a4fa49c6382d0c085746698ddbbafe6c2bf61285b19410644b5b26287c79162000c029189918991899189919062001de8565b60405180910390a25050505050565b6040516000906918da1958dadc1bda5b9d60b21b90829062000c40908590849088908b908b9060200162001c16565b60408051808303601f190181529190528051602090910120979650505050505050565b6000805b885181101562000d405786818151811062000c7e57fe5b602002602001015160ff1660001462000d375762000cf089828151811062000ca257fe5b60200260200101518589848151811062000cb857fe5b602002602001015189858151811062000ccd57fe5b602002602001015189868151811062000ce257fe5b602002602001015162000e6b565b62000d0f5760405162461bcd60e51b8152600401620002a7906200200f565b87818151811062000d1c57fe5b6020026020010151820191508282111562000d375762000d40565b60010162000c67565b5081811162000d635760405162461bcd60e51b8152600401620002a7906200216d565b5050505050505050565b62000dc78363a9059cbb60e01b848460405160240162000d8f92919062001bf4565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262000f0b565b505050565b606062000e1083836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525062000fa2565b90505b92915050565b60008282018381101562000e105760405162461bcd60e51b8152600401620002a79062001fb5565b62000e65846323b872dd60e01b85858560405160240162000d8f9392919062001b81565b50505050565b6000808560405160200162000e81919062001b50565b6040516020818303038152906040528051906020012090506001818686866040516000815260200160405260405162000ebe949392919062001db5565b6020604051602081039080840390855afa15801562000ee1573d6000803e3d6000fd5b505050602060405103516001600160a01b0316876001600160a01b03161491505095945050505050565b606062000f62826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662000fa29092919063ffffffff16565b80519091501562000dc7578080602001905181019062000f839190620019b2565b62000dc75760405162461bcd60e51b8152600401620002a7906200225e565b606062000fb3848460008562000fbd565b90505b9392505050565b60608247101562000fe25760405162461bcd60e51b8152600401620002a79062002052565b62000fed856200108c565b6200100c5760405162461bcd60e51b8152600401620002a79062002227565b60006060866001600160a01b031685876040516200102b919062001b32565b60006040518083038185875af1925050503d80600081146200106a576040519150601f19603f3d011682016040523d82523d6000602084013e6200106f565b606091505b50915091506200108182828662001092565b979650505050505050565b3b151590565b60608315620010a357508162000fb6565b825115620010b45782518084602001fd5b8160405162461bcd60e51b8152600401620002a7919062001dd3565b610fc180620023d483390190565b80356001600160a01b038116811462000e1357600080fd5b600082601f83011262001107578081fd5b81356200111e620011188262002384565b6200235d565b8181529150602080830190848101818402860182018710156200114057600080fd5b60005b848110156200116b57620011588883620010de565b8452928201929082019060010162001143565b505050505092915050565b600082601f83011262001187578081fd5b813562001198620011188262002384565b818152915060208083019084810181840286018201871015620011ba57600080fd5b60005b848110156200116b57813584529282019290820190600101620011bd565b600082601f830112620011ec578081fd5b8135620011fd620011188262002384565b8181529150602080830190848101818402860182018710156200121f57600080fd5b60005b848110156200116b57620012378883620013dd565b8452928201929082019060010162001222565b600082601f8301126200125b578081fd5b81356001600160401b0381111562001271578182fd5b62001286601f8201601f19166020016200235d565b91508082528360208285010111156200129e57600080fd5b8060208401602084013760009082016020015292915050565b6000610120808385031215620012cb578182fd5b620012d6816200235d565b91505081356001600160401b0380821115620012f157600080fd5b620012ff8583860162001176565b835260208401359150808211156200131657600080fd5b6200132485838601620010f6565b602084015260408401359150808211156200133e57600080fd5b6200134c8583860162001176565b604084015260608401359150808211156200136657600080fd5b6200137485838601620010f6565b6060840152620013888560808601620010de565b608084015260a0840135915080821115620013a257600080fd5b50620013b1848285016200124a565b60a08301525060c082013560c082015260e082013560e082015261010080830135818301525092915050565b803560ff8116811462000e1357600080fd5b60006020828403121562001401578081fd5b62000e108383620010de565b60008060006060848603121562001422578182fd5b83356001600160a01b038116811462001439578283fd5b95602085013595506040909401359392505050565b600080600080600080600060e0888a03121562001469578283fd5b87356001600160401b038082111562001480578485fd5b6200148e8b838c01620010f6565b985060208a0135915080821115620014a4578485fd5b620014b28b838c0162001176565b975060408a0135915080821115620014c8578485fd5b620014d68b838c01620011db565b965060608a0135915080821115620014ec578485fd5b620014fa8b838c0162001176565b955060808a013591508082111562001510578485fd5b506200151f8a828b0162001176565b93505060a0880135915060c0880135905092959891949750929550565b60008060008060008060008060006101208a8c0312156200155b578182fd5b89356001600160401b038082111562001572578384fd5b620015808d838e01620010f6565b9a5060208c013591508082111562001596578384fd5b620015a48d838e0162001176565b995060408c0135985060608c0135915080821115620015c1578384fd5b620015cf8d838e01620010f6565b975060808c0135915080821115620015e5578384fd5b620015f38d838e0162001176565b965060a08c0135955060c08c013591508082111562001610578384fd5b6200161e8d838e01620011db565b945060e08c013591508082111562001634578384fd5b620016428d838e0162001176565b93506101008c013591508082111562001659578283fd5b50620016688c828d0162001176565b9150509295985092959850929598565b6000806000806000806000806000806000806101808d8f0312156200169b578586fd5b6001600160401b038d351115620016b0578586fd5b620016bf8e8e358f01620010f6565b9b506001600160401b0360208e01351115620016d9578586fd5b620016eb8e60208f01358f0162001176565b9a5060408d013599506001600160401b0360608e013511156200170c578586fd5b6200171e8e60608f01358f01620011db565b98506001600160401b0360808e0135111562001738578586fd5b6200174a8e60808f01358f0162001176565b97506001600160401b0360a08e0135111562001764578586fd5b620017768e60a08f01358f0162001176565b96506001600160401b0360c08e0135111562001790578586fd5b620017a28e60c08f01358f0162001176565b95506001600160401b0360e08e01351115620017bc578283fd5b620017ce8e60e08f01358f01620010f6565b94506001600160401b036101008e01351115620017e9578283fd5b620017fc8e6101008f01358f0162001176565b93506101208d01359250620018168e6101408f01620010de565b91506101608d013590509295989b509295989b509295989b565b600080600080600080600060e0888a0312156200184b578081fd5b87356001600160401b038082111562001862578283fd5b620018708b838c01620010f6565b985060208a013591508082111562001886578283fd5b620018948b838c0162001176565b975060408a0135965060608a0135915080821115620018b1578283fd5b620018bf8b838c01620011db565b955060808a0135915080821115620018d5578283fd5b620018e38b838c0162001176565b945060a08a0135915080821115620018f9578283fd5b620019078b838c0162001176565b935060c08a01359150808211156200191d578283fd5b506200192c8a828b01620012b7565b91505092959891949750929550565b6000806000806080858703121562001951578182fd5b84356001600160401b038082111562001968578384fd5b6200197688838901620010f6565b955060208701359150808211156200198c578384fd5b506200199b8782880162001176565b949794965050505060408301359260600135919050565b600060208284031215620019c4578081fd5b8151801515811462000e10578182fd5b600060208284031215620019e6578081fd5b5035919050565b6000806000806080858703121562001a03578182fd5b84356001600160401b038082111562001a1a578384fd5b62001a28888389016200124a565b9550602087013591508082111562001a3e578384fd5b62001a4c888389016200124a565b9450604087013591508082111562001a62578384fd5b5062001a71878288016200124a565b92505062001a838660608701620013dd565b905092959194509250565b6000815180845260208085019450808401835b8381101562001ac85781516001600160a01b03168752958201959082019060010162001aa1565b509495945050505050565b6000815180845260208085019450808401835b8381101562001ac85781518752958201959082019060010162001ae6565b6000815180845262001b1e816020860160208601620023a4565b601f01601f19169290920160200192915050565b6000825162001b46818460208701620023a4565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038516815260806020820181905260009062001bcb9083018662001b04565b828103604084015262001bdf818662001b04565b91505060ff8316606083015295945050505050565b6001600160a01b03929092168252602082015260400190565b90815260200190565b600086825285602083015284604083015260a0606083015262001c3d60a083018562001a8e565b828103608084015262001c51818562001ad3565b98975050505050505050565b60006101608d83528c602084015280604084015262001c7f8184018d62001ad3565b838103606085015262001c93818d62001a8e565b915050828103608084015262001caa818b62001ad3565b83810360a085015262001cbe818b62001a8e565b6001600160a01b038a1660c086015284810360e0860152915062001ce59050818862001b04565b61010084019690965250506101208101929092526101409091015298975050505050505050565b60006101008a835289602084015280604084015262001d2e8184018a62001ad3565b838103606085015262001d42818a62001a8e565b915050828103608084015262001d59818862001ad3565b60a084019690965250506001600160a01b039290921660c083015260e09091015295945050505050565b60008582528460208301526080604083015262001da4608083018562001b04565b905082606083015295945050505050565b93845260ff9290921660208401526040830152606082015260800190565b60006020825262000e10602083018462001b04565b600060a0825262001dfd60a083018862001b04565b828103602084015262001e11818862001b04565b838103604085015262001e25818862001b04565b60ff969096166060850152505050608001529392505050565b6020808252601690820152754d616c666f726d6564206c697374206f66206665657360501b604082015260600190565b6020808252603f908201527f537570706c6965642063757272656e742076616c696461746f727320616e642060408201527f706f7765727320646f206e6f74206d6174636820636865636b706f696e742e00606082015260800190565b60208082526036908201527f4e6577206261746368206e6f6e6365206d7573742062652067726561746572206040820152757468616e207468652063757272656e74206e6f6e636560501b606082015260800190565b6020808252601f908201527f4d616c666f726d6564206261746368206f66207472616e73616374696f6e7300604082015260600190565b6020808252603d908201527f4e657720696e76616c69646174696f6e206e6f6e6365206d757374206265206760408201527f726561746572207468616e207468652063757272656e74206e6f6e6365000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b602080825260099082015268151a5b5959081bdd5d60ba1b604082015260600190565b60208082526023908201527f56616c696461746f72207369676e617475726520646f6573206e6f74206d617460408201526231b41760e91b606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252603b908201527f42617463682074696d656f7574206d757374206265206772656174657220746860408201527f616e207468652063757272656e7420626c6f636b206865696768740000000000606082015260800190565b60208082526021908201527f4d616c666f726d6564206c697374206f6620746f6b656e207472616e736665726040820152607360f81b606082015260800190565b6020808252601b908201527f4d616c666f726d6564206e65772076616c696461746f72207365740000000000604082015260600190565b6020808252603c908201527f5375626d69747465642076616c696461746f7220736574207369676e6174757260408201527f657320646f206e6f74206861766520656e6f75676820706f7765722e00000000606082015260800190565b60208082526037908201527f4e65772076616c736574206e6f6e6365206d757374206265206772656174657260408201527f207468616e207468652063757272656e74206e6f6e6365000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f4d616c666f726d65642063757272656e742076616c696461746f722073657400604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008482526060602083015262002331606083018562001a8e565b828103604084015262002345818562001ad3565b9695505050505050565b918252602082015260400190565b6040518181016001600160401b03811182821017156200237c57600080fd5b604052919050565b60006001600160401b038211156200239a578081fd5b5060209081020190565b60005b83811015620023c1578181015183820152602001620023a7565b8381111562000e65575050600091015256fe6080604052600160ff1b6006553480156200001957600080fd5b5060405162000fc138038062000fc1833981810160405260808110156200003f57600080fd5b8151602083018051604051929492938301929190846401000000008211156200006757600080fd5b9083019060208201858111156200007d57600080fd5b82516401000000008111828201881017156200009857600080fd5b82525081516020918201929091019080838360005b83811015620000c7578181015183820152602001620000ad565b50505050905090810190601f168015620000f55780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011957600080fd5b9083019060208201858111156200012f57600080fd5b82516401000000008111828201881017156200014a57600080fd5b82525081516020918201929091019080838360005b83811015620001795781810151838201526020016200015f565b50505050905090810190601f168015620001a75780820380516001836020036101000a031916815260200191505b5060405260209081015185519093508592508491620001cc91600391850190620003b9565b508051620001e2906004906020840190620003b9565b50506005805460ff191660121790555062000206816001600160e01b036200022416565b6200021a846006546200023a60201b60201c565b505050506200045e565b6005805460ff191660ff92909216919091179055565b6001600160a01b03821662000296576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620002ad600083836001600160e01b036200035216565b620002c9816002546200035760201b620009b61790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620002fc918390620009b662000357821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b505050565b600082820183811015620003b2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003fc57805160ff19168380011785556200042c565b828001600101855582156200042c579182015b828111156200042c5782518255916020019190600101906200040f565b506200043a9291506200043e565b5090565b6200045b91905b808211156200043a576000815560010162000445565b90565b610b53806200046e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80633950935111610071578063395093511461021257806370a082311461023e57806395d89b4114610264578063a457c2d71461026c578063a9059cbb14610298578063dd62ed3e146102c4576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd146101905780632ebdf54d146101c6578063313ce567146101f4575b600080fd5b6100c16102f2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610388565b604080519115158252519081900360200190f35b61017e6103a5565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b038135811691602081013590911690604001356103ab565b6101f2600480360360408110156101dc57600080fd5b506001600160a01b038135169060200135610438565b005b6101fc610446565b6040805160ff9092168252519081900360200190f35b6101626004803603604081101561022857600080fd5b506001600160a01b03813516906020013561044f565b61017e6004803603602081101561025457600080fd5b50356001600160a01b03166104a3565b6100c16104be565b6101626004803603604081101561028257600080fd5b506001600160a01b03813516906020013561051f565b610162600480360360408110156102ae57600080fd5b506001600160a01b03813516906020013561058d565b61017e600480360360408110156102da57600080fd5b506001600160a01b03813581169160200135166105a1565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b820191906000526020600020905b81548152906001019060200180831161036157829003601f168201915b5050505050905090565b600061039c6103956105cc565b84846105d0565b50600192915050565b60025490565b60006103b88484846106bc565b61042e846103c46105cc565b61042985604051806060016040528060288152602001610a88602891396001600160a01b038a166000908152600160205260408120906104026105cc565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61082316565b6105d0565b5060019392505050565b61044282826108ba565b5050565b60055460ff1690565b600061039c61045c6105cc565b84610429856001600061046d6105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6109b616565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561037e5780601f106103535761010080835404028352916020019161037e565b600061039c61052c6105cc565b8461042985604051806060016040528060258152602001610af960259139600160006105566105cc565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61082316565b600061039c61059a6105cc565b84846106bc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106155760405162461bcd60e51b8152600401808060200182810382526024815260200180610ad56024913960400191505060405180910390fd5b6001600160a01b03821661065a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a406022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107015760405162461bcd60e51b8152600401808060200182810382526025815260200180610ab06025913960400191505060405180910390fd5b6001600160a01b0382166107465760405162461bcd60e51b8152600401808060200182810382526023815260200180610a1d6023913960400191505060405180910390fd5b610751838383610a17565b61079481604051806060016040528060268152602001610a62602691396001600160a01b038616600090815260208190526040902054919063ffffffff61082316565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107c9908263ffffffff6109b616565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108b25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561087757818101518382015260200161085f565b50505050905090810190601f1680156108a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038216610915576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61092160008383610a17565b600254610934908263ffffffff6109b616565b6002556001600160a01b038216600090815260208190526040902054610960908263ffffffff6109b616565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015610a10576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220465410ed025b5712ee2eaddad7a20856f64710d3b57e1ff91396130750dfabd564736f6c63430006060033a264697066735822122018de9c84330245743d440a39eb3a986a4b6ba93368acb80508a288ff06657a3d64736f6c63430006060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/basic-bandwidth-generation/cache/solidity-files-cache.json b/contracts/basic-bandwidth-generation/cache/solidity-files-cache.json index 39dba74c8f..f653f82935 100644 --- a/contracts/basic-bandwidth-generation/cache/solidity-files-cache.json +++ b/contracts/basic-bandwidth-generation/cache/solidity-files-cache.json @@ -2,11 +2,11 @@ "_format": "hh-sol-cache-2", "files": { "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/contracts/BandwidthGenerator.sol": { - "lastModificationDate": 1639657373736, - "contentHash": "ac31a05f19ad88d4c28011a830d29b56", + "lastModificationDate": 1641813499577, + "contentHash": "019fffdd8521017f63b3e923d292c025", "sourceName": "contracts/BandwidthGenerator.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -31,21 +31,21 @@ "./CosmosToken.sol", "./Gravity.sol", "@openzeppelin/contracts/access/Ownable.sol", - "@openzeppelin/contracts/math/SafeMath.sol" + "@openzeppelin/contracts/utils/math/SafeMath.sol" ], "versionPragmas": [ - "0.6.6" + "0.8.10" ], "artifacts": [ "BandwidthGenerator" ] }, "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/contracts/CosmosToken.sol": { - "lastModificationDate": 1639657191231, - "contentHash": "0f05f96ee3c1151b6cd4b699aa3167e9", + "lastModificationDate": 1641811013678, + "contentHash": "fc5dd09fe73bc6cfece970f702a3aba1", "sourceName": "contracts/CosmosToken.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -70,18 +70,18 @@ "@openzeppelin/contracts/token/ERC20/ERC20.sol" ], "versionPragmas": [ - "^0.6.6" + "0.8.10" ], "artifacts": [ "CosmosERC20" ] }, "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/contracts/Gravity.sol": { - "lastModificationDate": 1639657191231, - "contentHash": "eaa1cd71cea24d419ef5f67a66dc672e", + "lastModificationDate": 1641810221576, + "contentHash": "0d6dae561f7b541bafb892b8593a08ac", "sourceName": "contracts/Gravity.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -103,26 +103,26 @@ } }, "imports": [ - "@openzeppelin/contracts/math/SafeMath.sol", "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "@openzeppelin/contracts/security/ReentrancyGuard.sol", "@openzeppelin/contracts/utils/Address.sol", - "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", "./CosmosToken.sol" ], "versionPragmas": [ - "^0.6.6" + "0.8.10" ], "artifacts": [ "Gravity" ] }, "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/access/Ownable.sol": { - "lastModificationDate": 1639657303711, - "contentHash": "6748815a5b45c4aeeda56819f41190e0", + "lastModificationDate": 1641812554274, + "contentHash": "4fe56b59ced59d87df6b796758f62895", "sourceName": "@openzeppelin/contracts/access/Ownable.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -147,18 +147,18 @@ "../utils/Context.sol" ], "versionPragmas": [ - ">=0.6.0 <0.8.0" + "^0.8.0" ], "artifacts": [ "Ownable" ] }, - "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/math/SafeMath.sol": { - "lastModificationDate": 1639657303763, - "contentHash": "e03e12206057e809eb76c5f681170c32", - "sourceName": "@openzeppelin/contracts/math/SafeMath.sol", + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/utils/math/SafeMath.sol": { + "lastModificationDate": 1641812554378, + "contentHash": "5365090efc586b728719e562ebfed0d6", + "sourceName": "@openzeppelin/contracts/utils/math/SafeMath.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -181,18 +181,18 @@ }, "imports": [], "versionPragmas": [ - ">=0.6.0 <0.8.0" + "^0.8.0" ], "artifacts": [ "SafeMath" ] }, "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "lastModificationDate": 1639657303507, - "contentHash": "8065b340476f61365c076897199425f1", + "lastModificationDate": 1641812553614, + "contentHash": "2cd550cedf51b8d294607dad5023d717", "sourceName": "@openzeppelin/contracts/token/ERC20/ERC20.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -214,57 +214,23 @@ } }, "imports": [ - "../../utils/Context.sol", "./IERC20.sol", - "../../math/SafeMath.sol" + "./extensions/IERC20Metadata.sol", + "../../utils/Context.sol" ], "versionPragmas": [ - ">=0.6.0 <0.8.0" + "^0.8.0" ], "artifacts": [ "ERC20" ] }, - "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/utils/Context.sol": { - "lastModificationDate": 1639657303395, - "contentHash": "2adbd82f6d055a4751566d4671512b03", - "sourceName": "@openzeppelin/contracts/utils/Context.sol", - "solcConfig": { - "version": "0.6.6", - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers" - ], - "": [ - "ast" - ] - } - } - } - }, - "imports": [], - "versionPragmas": [ - ">=0.6.0 <0.8.0" - ], - "artifacts": [ - "Context" - ] - }, "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "lastModificationDate": 1639657303639, - "contentHash": "e0a41531d159d3a32f84b7a3ecf9fabb", + "lastModificationDate": 1641812554110, + "contentHash": "0eac3e1a83ee62326ca007811285b274", "sourceName": "@openzeppelin/contracts/token/ERC20/IERC20.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -287,18 +253,18 @@ }, "imports": [], "versionPragmas": [ - ">=0.6.0 <0.8.0" + "^0.8.0" ], "artifacts": [ "IERC20" ] }, - "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { - "lastModificationDate": 1639657303759, - "contentHash": "33e22842646d746e5c4124c2fdc051aa", - "sourceName": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "lastModificationDate": 1641812554118, + "contentHash": "aa1be06992a99bb7393b26a6af3c4dfb", + "sourceName": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -320,23 +286,92 @@ } }, "imports": [ - "./IERC20.sol", - "../../math/SafeMath.sol", - "../../utils/Address.sol" + "../IERC20.sol" ], "versionPragmas": [ - ">=0.6.0 <0.8.0" + "^0.8.0" + ], + "artifacts": [ + "IERC20Metadata" + ] + }, + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/utils/Context.sol": { + "lastModificationDate": 1641812553346, + "contentHash": "851485d5b925529b1a2f34a0be077891", + "sourceName": "@openzeppelin/contracts/utils/Context.sol", + "solcConfig": { + "version": "0.8.10", + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ], + "": [ + "ast" + ] + } + } + } + }, + "imports": [], + "versionPragmas": [ + "^0.8.0" + ], + "artifacts": [ + "Context" + ] + }, + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "lastModificationDate": 1641812554370, + "contentHash": "d37406082a74a9b6b114de522fcb6349", + "sourceName": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "solcConfig": { + "version": "0.8.10", + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ], + "": [ + "ast" + ] + } + } + } + }, + "imports": [ + "../IERC20.sol", + "../../../utils/Address.sol" + ], + "versionPragmas": [ + "^0.8.0" ], "artifacts": [ "SafeERC20" ] }, - "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/utils/Address.sol": { - "lastModificationDate": 1639657303363, - "contentHash": "7aa46886ff5abe7515496208a5e2ce5a", - "sourceName": "@openzeppelin/contracts/utils/Address.sol", + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "lastModificationDate": 1641812554322, + "contentHash": "53fbff678f378956efcb207fa748eaa6", + "sourceName": "@openzeppelin/contracts/security/ReentrancyGuard.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -359,18 +394,52 @@ }, "imports": [], "versionPragmas": [ - ">=0.6.2 <0.8.0" + "^0.8.0" + ], + "artifacts": [ + "ReentrancyGuard" + ] + }, + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/utils/Address.sol": { + "lastModificationDate": 1641812553270, + "contentHash": "c5f6c4e4df069c789e7d84b4c3011913", + "sourceName": "@openzeppelin/contracts/utils/Address.sol", + "solcConfig": { + "version": "0.8.10", + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ], + "": [ + "ast" + ] + } + } + } + }, + "imports": [], + "versionPragmas": [ + "^0.8.0" ], "artifacts": [ "Address" ] }, - "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/utils/ReentrancyGuard.sol": { - "lastModificationDate": 1639657303747, - "contentHash": "1c60f58cee45c61469e1aea31e4dd879", - "sourceName": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "lastModificationDate": 1641812553414, + "contentHash": "197dbfaf7146845fa76331a4c9980e9f", + "sourceName": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", "solcConfig": { - "version": "0.6.6", + "version": "0.8.10", "settings": { "optimizer": { "enabled": true, @@ -393,10 +462,87 @@ }, "imports": [], "versionPragmas": [ - ">=0.6.0 <0.8.0" + "^0.8.0" ], "artifacts": [ - "ReentrancyGuard" + "ECDSA" + ] + }, + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/contracts/test-contracts/TestCosmosToken.sol": { + "lastModificationDate": 1641813266722, + "contentHash": "957b6079ee0d5a6e048fce8555c14dee", + "sourceName": "contracts/test-contracts/TestCosmosToken.sol", + "solcConfig": { + "version": "0.8.10", + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ], + "": [ + "ast" + ] + } + } + } + }, + "imports": [ + "@openzeppelin/contracts/token/ERC20/ERC20.sol" + ], + "versionPragmas": [ + "0.8.10" + ], + "artifacts": [ + "TestCosmosERC20" + ] + }, + "/home/max/dev/nymtech/nym/contracts/basic-bandwidth-generation/contracts/test-contracts/TestGravity.sol": { + "lastModificationDate": 1641813465624, + "contentHash": "5c725464b149a3862c88db62891d8f66", + "sourceName": "contracts/test-contracts/TestGravity.sol", + "solcConfig": { + "version": "0.8.10", + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ], + "": [ + "ast" + ] + } + } + } + }, + "imports": [ + "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "@openzeppelin/contracts/security/ReentrancyGuard.sol", + "@openzeppelin/contracts/utils/Address.sol", + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", + "./TestCosmosToken.sol" + ], + "versionPragmas": [ + "0.8.10" + ], + "artifacts": [ + "Gravity" ] } } diff --git a/contracts/basic-bandwidth-generation/contracts/BandwidthGenerator.sol b/contracts/basic-bandwidth-generation/contracts/BandwidthGenerator.sol index 2438476670..ba1b7d587a 100644 --- a/contracts/basic-bandwidth-generation/contracts/BandwidthGenerator.sol +++ b/contracts/basic-bandwidth-generation/contracts/BandwidthGenerator.sol @@ -1,9 +1,9 @@ -pragma solidity 0.6.6; +pragma solidity 0.8.10; import "./CosmosToken.sol"; import "./Gravity.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/utils/math/SafeMath.sol"; /** * @title BandwidthGenerator @@ -28,7 +28,7 @@ contract BandwidthGenerator is Ownable { uint256 Bandwidth, uint256 indexed VerificationKey, bytes SignedVerificationKey, - bytes32 indexed CosmosRecipient + string indexed CosmosRecipient ); event RatioChanged( @@ -39,7 +39,7 @@ contract BandwidthGenerator is Ownable { * @param _erc20 Address of the erc20NYM deployed through the Gravity Bridge. * @param _gravityBridge Address of the deployed Gravity Bridge. */ - constructor(CosmosERC20 _erc20, Gravity _gravityBridge) public { + constructor(CosmosERC20 _erc20, Gravity _gravityBridge) { require(address(_erc20) != address(0), "BandwidthGenerator: erc20 address cannot be null"); require(address(_gravityBridge) != address(0), "BandwidthGenerator: gravity bridge address cannot be null"); erc20 = _erc20; @@ -65,7 +65,7 @@ contract BandwidthGenerator is Ownable { * @param _signedVerificationKey Number of erc20NYMs to spend signed by _verificationKey for auth on Cosmos Blockchain. * @param _cosmosRecipient Address of the recipient of payment on Nym Cosmos Blockchain. */ - function generateBasicBandwidthCredential(uint256 _amount, uint256 _verificationKey, bytes memory _signedVerificationKey, bytes32 _cosmosRecipient) public { + function generateBasicBandwidthCredential(uint256 _amount, uint256 _verificationKey, bytes memory _signedVerificationKey, string memory _cosmosRecipient) public { require(_signedVerificationKey.length == 64, "BandwidthGenerator: Signature doesn't have 64 bytes"); erc20.transferFrom(msg.sender, address(this), _amount); erc20.approve(address(gravityBridge), _amount); diff --git a/contracts/basic-bandwidth-generation/contracts/CosmosToken.sol b/contracts/basic-bandwidth-generation/contracts/CosmosToken.sol index a2714161b5..9c5556cd79 100644 --- a/contracts/basic-bandwidth-generation/contracts/CosmosToken.sol +++ b/contracts/basic-bandwidth-generation/contracts/CosmosToken.sol @@ -1,33 +1,35 @@ -pragma solidity ^0.6.6; +//SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.10; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -/** -* This is a slightly modified version of the cosmos erc20 contract -* which I have done for unit testing. -* -* All that has been changed is the MAX_UINT variable to allow -* me to mint some tokens more easily in unit tests, and the -* addition of the public mint() function. - */ - contract CosmosERC20 is ERC20 { - /* canonical amount */ - // uint256 MAX_UINT = 2**256 - 1; + uint256 MAX_UINT = 2**256 - 1; + uint8 private cosmosDecimals; + address private gravityAddress; - /* unit testing amount */ - uint256 HALF_MAX_UINT = 2**256 / 2; + // This override ensures we return the proper number of decimals + // for the cosmos token + function decimals() public view virtual override returns (uint8) { + return cosmosDecimals; + } + + // This is not an accurate total supply. Instead this is the total supply + // of the given cosmos asset on Ethereum at this moment in time. Keeping + // a totally accurate supply would require constant updates from the Cosmos + // side, while in theory this could be piggy-backed on some existing bridge + // operation it's a lot of complextiy to add so we chose to forgoe it. + function totalSupply() public view virtual override returns (uint256) { + return MAX_UINT - balanceOf(gravityAddress); + } constructor( address _gravityAddress, string memory _name, string memory _symbol, uint8 _decimals - ) public ERC20(_name, _symbol) { - _setupDecimals(_decimals); - _mint(_gravityAddress, HALF_MAX_UINT); + ) ERC20(_name, _symbol) { + cosmosDecimals = _decimals; + gravityAddress = _gravityAddress; + _mint(_gravityAddress, MAX_UINT); } - - function mintForUnitTesting(address _to, uint _amount) public { - _mint(_to, _amount); - } -} +} \ No newline at end of file diff --git a/contracts/basic-bandwidth-generation/contracts/Gravity.sol b/contracts/basic-bandwidth-generation/contracts/Gravity.sol index 15bca4aab8..0b541280e1 100644 --- a/contracts/basic-bandwidth-generation/contracts/Gravity.sol +++ b/contracts/basic-bandwidth-generation/contracts/Gravity.sol @@ -1,13 +1,27 @@ -pragma solidity ^0.6.6; +//SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.10; -import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; -import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./CosmosToken.sol"; -pragma experimental ABIEncoderV2; +error InvalidSignature(); +error InvalidValsetNonce(uint256 newNonce, uint256 currentNonce); +error InvalidBatchNonce(uint256 newNonce, uint256 currentNonce); +error InvalidLogicCallNonce(uint256 newNonce, uint256 currentNonce); +error InvalidLogicCallTransfers(); +error InvalidLogicCallFees(); +error InvalidSendToCosmos(); +error IncorrectCheckpoint(); +error MalformedNewValidatorSet(); +error MalformedCurrentValidatorSet(); +error MalformedBatch(); +error InsufficientPower(uint256 cumulativePower, uint256 powerThreshold); +error BatchTimedOut(); +error LogicCallTimedOut(); // This is being used purely to avoid stack too deep errors struct LogicCallArgs { @@ -26,10 +40,36 @@ struct LogicCallArgs { uint256 invalidationNonce; } +// This is used purely to avoid stack too deep errors +// represents everything about a given validator set +struct ValsetArgs { + // the validators in this set, represented by an Ethereum address + address[] validators; + // the powers of the given validators in the same order as above + uint256[] powers; + // the nonce of this validator set + uint256 valsetNonce; + // the reward amount denominated in the below reward token, can be + // set to zero + uint256 rewardAmount; + // the reward token, should be set to the zero address if not being used + address rewardToken; +} + +// This represents a validator signature +struct Signature { + uint8 v; + bytes32 r; + bytes32 s; +} + contract Gravity is ReentrancyGuard { - using SafeMath for uint256; using SafeERC20 for IERC20; + // The number of 'votes' required to execute a valset + // update or batch execution, set to 2/3 of 2^32 + uint256 constant constant_powerThreshold = 2863311530; + // These are updated often bytes32 public state_lastValsetCheckpoint; mapping(address => uint256) public state_lastBatchNonces; @@ -39,9 +79,8 @@ contract Gravity is ReentrancyGuard { // value indicating that no events have yet been submitted uint256 public state_lastEventNonce = 1; - // These are set once at initialization - bytes32 public state_gravityId; - uint256 public state_powerThreshold; + // This is set once at initialization + bytes32 public immutable state_gravityId; // TransactionBatchExecutedEvent and SendToCosmosEvent both include the field _eventNonce. // This is incremented every time one of these events is emitted. It is checked by the @@ -57,7 +96,7 @@ contract Gravity is ReentrancyGuard { event SendToCosmosEvent( address indexed _tokenContract, address indexed _sender, - bytes32 indexed _destination, + string _destination, uint256 _amount, uint256 _eventNonce ); @@ -73,6 +112,8 @@ contract Gravity is ReentrancyGuard { event ValsetUpdatedEvent( uint256 indexed _newValsetNonce, uint256 _eventNonce, + uint256 _rewardAmount, + address _rewardToken, address[] _validators, uint256[] _powers ); @@ -85,42 +126,26 @@ contract Gravity is ReentrancyGuard { // TEST FIXTURES // These are here to make it easier to measure gas usage. They should be removed before production - function testMakeCheckpoint( - address[] memory _validators, - uint256[] memory _powers, - uint256 _valsetNonce, - bytes32 _gravityId - ) public pure { - makeCheckpoint(_validators, _powers, _valsetNonce, _gravityId); + function testMakeCheckpoint(ValsetArgs calldata _valsetArgs, bytes32 _gravityId) external pure { + makeCheckpoint(_valsetArgs, _gravityId); } function testCheckValidatorSignatures( - address[] memory _currentValidators, - uint256[] memory _currentPowers, - uint8[] memory _v, - bytes32[] memory _r, - bytes32[] memory _s, + ValsetArgs calldata _currentValset, + Signature[] calldata _sigs, bytes32 _theHash, uint256 _powerThreshold - ) public pure { - checkValidatorSignatures( - _currentValidators, - _currentPowers, - _v, - _r, - _s, - _theHash, - _powerThreshold - ); + ) external pure { + checkValidatorSignatures(_currentValset, _sigs, _theHash, _powerThreshold); } // END TEST FIXTURES - function lastBatchNonce(address _erc20Address) public view returns (uint256) { + function lastBatchNonce(address _erc20Address) external view returns (uint256) { return state_lastBatchNonces[_erc20Address]; } - function lastLogicCallNonce(bytes32 _invalidation_id) public view returns (uint256) { + function lastLogicCallNonce(bytes32 _invalidation_id) external view returns (uint256) { return state_invalidationMapping[_invalidation_id]; } @@ -128,13 +153,23 @@ contract Gravity is ReentrancyGuard { function verifySig( address _signer, bytes32 _theHash, - uint8 _v, - bytes32 _r, - bytes32 _s + Signature calldata _sig ) private pure returns (bool) { - bytes32 messageDigest = - keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _theHash)); - return _signer == ecrecover(messageDigest, _v, _r, _s); + bytes32 messageDigest = keccak256( + abi.encodePacked("\x19Ethereum Signed Message:\n32", _theHash) + ); + return _signer == ECDSA.recover(messageDigest, _sig.v, _sig.r, _sig.s); + } + + // Utility function to determine that a validator set and signatures are well formed + function validateValset(ValsetArgs calldata _valset, Signature[] calldata _sigs) private pure { + // Check that current validators, powers, and signatures (v,r,s) set is well-formed + if ( + _valset.validators.length != _valset.powers.length || + _valset.validators.length != _sigs.length + ) { + revert MalformedCurrentValidatorSet(); + } } // Make a new checkpoint from the supplied validator set @@ -145,47 +180,51 @@ contract Gravity is ReentrancyGuard { // Where h is the keccak256 hash function. // The validator powers must be decreasing or equal. This is important for checking the signatures on the // next valset, since it allows the caller to stop verifying signatures once a quorum of signatures have been verified. - function makeCheckpoint( - address[] memory _validators, - uint256[] memory _powers, - uint256 _valsetNonce, - bytes32 _gravityId - ) private pure returns (bytes32) { + function makeCheckpoint(ValsetArgs memory _valsetArgs, bytes32 _gravityId) + private + pure + returns (bytes32) + { // bytes32 encoding of the string "checkpoint" bytes32 methodName = 0x636865636b706f696e7400000000000000000000000000000000000000000000; - bytes32 checkpoint = - keccak256(abi.encode(_gravityId, methodName, _valsetNonce, _validators, _powers)); + bytes32 checkpoint = keccak256( + abi.encode( + _gravityId, + methodName, + _valsetArgs.valsetNonce, + _valsetArgs.validators, + _valsetArgs.powers, + _valsetArgs.rewardAmount, + _valsetArgs.rewardToken + ) + ); return checkpoint; } function checkValidatorSignatures( // The current validator set and their powers - address[] memory _currentValidators, - uint256[] memory _currentPowers, + ValsetArgs calldata _currentValset, // The current validator's signatures - uint8[] memory _v, - bytes32[] memory _r, - bytes32[] memory _s, + Signature[] calldata _sigs, // This is what we are checking they have signed bytes32 _theHash, uint256 _powerThreshold ) private pure { uint256 cumulativePower = 0; - for (uint256 i = 0; i < _currentValidators.length; i++) { + for (uint256 i = 0; i < _currentValset.validators.length; i++) { // If v is set to 0, this signifies that it was not possible to get a signature from this validator and we skip evaluation // (In a valid signature, it is either 27 or 28) - if (_v[i] != 0) { + if (_sigs[i].v != 0) { // Check that the current validator has signed off on the hash - require( - verifySig(_currentValidators[i], _theHash, _v[i], _r[i], _s[i]), - "Validator signature does not match." - ); + if (!verifySig(_currentValset.validators[i], _theHash, _sigs[i])) { + revert InvalidSignature(); + } // Sum up cumulative power - cumulativePower = cumulativePower + _currentPowers[i]; + cumulativePower = cumulativePower + _currentValset.powers[i]; // Break early to avoid wasting gas if (cumulativePower > _powerThreshold) { @@ -195,76 +234,81 @@ contract Gravity is ReentrancyGuard { } // Check that there was enough power - require( - cumulativePower > _powerThreshold, - "Submitted validator set signatures do not have enough power." - ); + if (cumulativePower <= _powerThreshold) { + revert InsufficientPower(cumulativePower, _powerThreshold); + } // Success } // This updates the valset by checking that the validators in the current valset have signed off on the // new valset. The signatures supplied are the signatures of the current valset over the checkpoint hash // generated from the new valset. - // Anyone can call this function, but they must supply valid signatures of state_powerThreshold of the current valset over + // Anyone can call this function, but they must supply valid signatures of constant_powerThreshold of the current valset over // the new valset. function updateValset( // The new version of the validator set - address[] memory _newValidators, - uint256[] memory _newPowers, - uint256 _newValsetNonce, + ValsetArgs calldata _newValset, // The current validators that approve the change - address[] memory _currentValidators, - uint256[] memory _currentPowers, - uint256 _currentValsetNonce, + ValsetArgs calldata _currentValset, // These are arrays of the parts of the current validator's signatures - uint8[] memory _v, - bytes32[] memory _r, - bytes32[] memory _s - ) public nonReentrant { + Signature[] calldata _sigs + ) external { // CHECKS // Check that the valset nonce is greater than the old one - require( - _newValsetNonce > _currentValsetNonce, - "New valset nonce must be greater than the current nonce" - ); + if (_newValset.valsetNonce <= _currentValset.valsetNonce) { + revert InvalidValsetNonce({ + newNonce: _newValset.valsetNonce, + currentNonce: _currentValset.valsetNonce + }); + } + + // Check that the valset nonce is less than a million nonces forward from the old one + // this makes it difficult for an attacker to lock out the contract by getting a single + // bad validator set through with uint256 max nonce + if (_newValset.valsetNonce > _currentValset.valsetNonce + 1000000) { + revert InvalidValsetNonce({ + newNonce: _newValset.valsetNonce, + currentNonce: _currentValset.valsetNonce + }); + } // Check that new validators and powers set is well-formed - require(_newValidators.length == _newPowers.length, "Malformed new validator set"); + if ( + _newValset.validators.length != _newValset.powers.length || + _newValset.validators.length == 0 + ) { + revert MalformedNewValidatorSet(); + } // Check that current validators, powers, and signatures (v,r,s) set is well-formed - require( - _currentValidators.length == _currentPowers.length && - _currentValidators.length == _v.length && - _currentValidators.length == _r.length && - _currentValidators.length == _s.length, - "Malformed current validator set" - ); + validateValset(_currentValset, _sigs); + + // Check cumulative power to ensure the contract has sufficient power to actually + // pass a vote + uint256 cumulativePower = 0; + for (uint256 i = 0; i < _newValset.powers.length; i++) { + cumulativePower = cumulativePower + _newValset.powers[i]; + if (cumulativePower > constant_powerThreshold) { + break; + } + } + if (cumulativePower <= constant_powerThreshold) { + revert InsufficientPower({ + cumulativePower: cumulativePower, + powerThreshold: constant_powerThreshold + }); + } // Check that the supplied current validator set matches the saved checkpoint - require( - makeCheckpoint( - _currentValidators, - _currentPowers, - _currentValsetNonce, - state_gravityId - ) == state_lastValsetCheckpoint, - "Supplied current validators and powers do not match checkpoint." - ); + if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) { + revert IncorrectCheckpoint(); + } // Check that enough current validators have signed off on the new validator set - bytes32 newCheckpoint = - makeCheckpoint(_newValidators, _newPowers, _newValsetNonce, state_gravityId); + bytes32 newCheckpoint = makeCheckpoint(_newValset, state_gravityId); - checkValidatorSignatures( - _currentValidators, - _currentPowers, - _v, - _r, - _s, - newCheckpoint, - state_powerThreshold - ); + checkValidatorSignatures(_currentValset, _sigs, newCheckpoint, constant_powerThreshold); // ACTIONS @@ -273,83 +317,87 @@ contract Gravity is ReentrancyGuard { state_lastValsetCheckpoint = newCheckpoint; // Store new nonce - state_lastValsetNonce = _newValsetNonce; + state_lastValsetNonce = _newValset.valsetNonce; + + // Send submission reward to msg.sender if reward token is a valid value + if (_newValset.rewardToken != address(0) && _newValset.rewardAmount != 0) { + IERC20(_newValset.rewardToken).safeTransfer(msg.sender, _newValset.rewardAmount); + } // LOGS - state_lastEventNonce = state_lastEventNonce.add(1); - emit ValsetUpdatedEvent(_newValsetNonce, state_lastEventNonce, _newValidators, _newPowers); + + state_lastEventNonce = state_lastEventNonce + 1; + emit ValsetUpdatedEvent( + _newValset.valsetNonce, + state_lastEventNonce, + _newValset.rewardAmount, + _newValset.rewardToken, + _newValset.validators, + _newValset.powers + ); } // submitBatch processes a batch of Cosmos -> Ethereum transactions by sending the tokens in the transactions // to the destination addresses. It is approved by the current Cosmos validator set. - // Anyone can call this function, but they must supply valid signatures of state_powerThreshold of the current valset over + // Anyone can call this function, but they must supply valid signatures of constant_powerThreshold of the current valset over // the batch. function submitBatch( // The validators that approve the batch - address[] memory _currentValidators, - uint256[] memory _currentPowers, - uint256 _currentValsetNonce, + ValsetArgs calldata _currentValset, // These are arrays of the parts of the validators signatures - uint8[] memory _v, - bytes32[] memory _r, - bytes32[] memory _s, + Signature[] calldata _sigs, // The batch of transactions - uint256[] memory _amounts, - address[] memory _destinations, - uint256[] memory _fees, + uint256[] calldata _amounts, + address[] calldata _destinations, + uint256[] calldata _fees, uint256 _batchNonce, address _tokenContract, // a block height beyond which this batch is not valid // used to provide a fee-free timeout uint256 _batchTimeout - ) public nonReentrant { + ) external nonReentrant { // CHECKS scoped to reduce stack depth { // Check that the batch nonce is higher than the last nonce for this token - require( - state_lastBatchNonces[_tokenContract] < _batchNonce, - "New batch nonce must be greater than the current nonce" - ); + if (_batchNonce <= state_lastBatchNonces[_tokenContract]) { + revert InvalidBatchNonce({ + newNonce: _batchNonce, + currentNonce: state_lastBatchNonces[_tokenContract] + }); + } + + // Check that the batch nonce is less than one million nonces forward from the old one + // this makes it difficult for an attacker to lock out the contract by getting a single + // bad batch through with uint256 max nonce + if (_batchNonce > state_lastBatchNonces[_tokenContract] + 1000000) { + revert InvalidBatchNonce({ + newNonce: _batchNonce, + currentNonce: state_lastBatchNonces[_tokenContract] + }); + } // Check that the block height is less than the timeout height - require( - block.number < _batchTimeout, - "Batch timeout must be greater than the current block height" - ); + if (block.number >= _batchTimeout) { + revert BatchTimedOut(); + } // Check that current validators, powers, and signatures (v,r,s) set is well-formed - require( - _currentValidators.length == _currentPowers.length && - _currentValidators.length == _v.length && - _currentValidators.length == _r.length && - _currentValidators.length == _s.length, - "Malformed current validator set" - ); + validateValset(_currentValset, _sigs); // Check that the supplied current validator set matches the saved checkpoint - require( - makeCheckpoint( - _currentValidators, - _currentPowers, - _currentValsetNonce, - state_gravityId - ) == state_lastValsetCheckpoint, - "Supplied current validators and powers do not match checkpoint." - ); + if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) { + revert IncorrectCheckpoint(); + } // Check that the transaction batch is well-formed - require( - _amounts.length == _destinations.length && _amounts.length == _fees.length, - "Malformed batch of transactions" - ); + if (_amounts.length != _destinations.length || _amounts.length != _fees.length) { + revert MalformedBatch(); + } // Check that enough current validators have signed off on the transaction batch and valset checkValidatorSignatures( - _currentValidators, - _currentPowers, - _v, - _r, - _s, + _currentValset, + _sigs, // Get hash of the transaction batch and checkpoint keccak256( abi.encode( @@ -364,7 +412,7 @@ contract Gravity is ReentrancyGuard { _batchTimeout ) ), - state_powerThreshold + constant_powerThreshold ); // ACTIONS @@ -377,7 +425,7 @@ contract Gravity is ReentrancyGuard { uint256 totalFee; for (uint256 i = 0; i < _amounts.length; i++) { IERC20(_tokenContract).safeTransfer(_destinations[i], _amounts[i]); - totalFee = totalFee.add(_fees[i]); + totalFee = totalFee + _fees[i]; } // Send transaction fees to msg.sender @@ -387,7 +435,7 @@ contract Gravity is ReentrancyGuard { // LOGS scoped to reduce stack depth { - state_lastEventNonce = state_lastEventNonce.add(1); + state_lastEventNonce = state_lastEventNonce + 1; emit TransactionBatchExecutedEvent(_batchNonce, _tokenContract, state_lastEventNonce); } } @@ -403,61 +451,48 @@ contract Gravity is ReentrancyGuard { // for each call. function submitLogicCall( // The validators that approve the call - address[] memory _currentValidators, - uint256[] memory _currentPowers, - uint256 _currentValsetNonce, + ValsetArgs calldata _currentValset, // These are arrays of the parts of the validators signatures - uint8[] memory _v, - bytes32[] memory _r, - bytes32[] memory _s, + Signature[] calldata _sigs, LogicCallArgs memory _args - ) public nonReentrant { + ) external nonReentrant { // CHECKS scoped to reduce stack depth { // Check that the call has not timed out - require(block.number < _args.timeOut, "Timed out"); + if (block.number >= _args.timeOut) { + revert LogicCallTimedOut(); + } // Check that the invalidation nonce is higher than the last nonce for this invalidation Id - require( - state_invalidationMapping[_args.invalidationId] < _args.invalidationNonce, - "New invalidation nonce must be greater than the current nonce" - ); + if (state_invalidationMapping[_args.invalidationId] >= _args.invalidationNonce) { + revert InvalidLogicCallNonce({ + newNonce: _args.invalidationNonce, + currentNonce: state_invalidationMapping[_args.invalidationId] + }); + } + + // note the lack of nonce skipping check, it's not needed here since an attacker + // will never be able to fill the invalidationId space, therefore a nonce lockout + // is simply not possible // Check that current validators, powers, and signatures (v,r,s) set is well-formed - require( - _currentValidators.length == _currentPowers.length && - _currentValidators.length == _v.length && - _currentValidators.length == _r.length && - _currentValidators.length == _s.length, - "Malformed current validator set" - ); + validateValset(_currentValset, _sigs); // Check that the supplied current validator set matches the saved checkpoint - require( - makeCheckpoint( - _currentValidators, - _currentPowers, - _currentValsetNonce, - state_gravityId - ) == state_lastValsetCheckpoint, - "Supplied current validators and powers do not match checkpoint." - ); + if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) { + revert IncorrectCheckpoint(); + } - // Check that the token transfer list is well-formed - require( - _args.transferAmounts.length == _args.transferTokenContracts.length, - "Malformed list of token transfers" - ); + if (_args.transferAmounts.length != _args.transferTokenContracts.length) { + revert InvalidLogicCallTransfers(); + } - // Check that the fee list is well-formed - require( - _args.feeAmounts.length == _args.feeTokenContracts.length, - "Malformed list of fees" - ); + if (_args.feeAmounts.length != _args.feeTokenContracts.length) { + revert InvalidLogicCallFees(); + } } - - bytes32 argsHash = - keccak256( + { + bytes32 argsHash = keccak256( abi.encode( state_gravityId, // bytes32 encoding of "logicCall" @@ -474,17 +509,13 @@ contract Gravity is ReentrancyGuard { ) ); - { // Check that enough current validators have signed off on the transaction batch and valset checkValidatorSignatures( - _currentValidators, - _currentPowers, - _v, - _r, - _s, + _currentValset, + _sigs, // Get hash of the transaction batch and checkpoint argsHash, - state_powerThreshold + constant_powerThreshold ); } @@ -511,7 +542,7 @@ contract Gravity is ReentrancyGuard { // LOGS scoped to reduce stack depth { - state_lastEventNonce = state_lastEventNonce.add(1); + state_lastEventNonce = state_lastEventNonce + 1; emit LogicCallEvent( _args.invalidationId, _args.invalidationNonce, @@ -523,31 +554,50 @@ contract Gravity is ReentrancyGuard { function sendToCosmos( address _tokenContract, - bytes32 _destination, + string calldata _destination, uint256 _amount - ) public nonReentrant { + ) external nonReentrant { + // we snapshot our current balance of this token + uint256 ourStartingBalance = IERC20(_tokenContract).balanceOf(address(this)); + + // attempt to transfer the user specified amount IERC20(_tokenContract).safeTransferFrom(msg.sender, address(this), _amount); - state_lastEventNonce = state_lastEventNonce.add(1); + + // check what this particular ERC20 implementation actually gave us, since it doesn't + // have to be at all related to the _amount + uint256 ourEndingBalance = IERC20(_tokenContract).balanceOf(address(this)); + + // a very strange ERC20 may trigger this condition, if we didn't have this we would + // underflow, so it's mostly just an error message printer + if (ourEndingBalance <= ourStartingBalance) { + revert InvalidSendToCosmos(); + } + + state_lastEventNonce = state_lastEventNonce + 1; + + // emit to Cosmos the actual amount our balance has changed, rather than the user + // provided amount. This protects against a small set of wonky ERC20 behavior, like + // burning on send but not tokens that for example change every users balance every day. emit SendToCosmosEvent( _tokenContract, msg.sender, _destination, - _amount, + ourEndingBalance - ourStartingBalance, state_lastEventNonce ); } function deployERC20( - string memory _cosmosDenom, - string memory _name, - string memory _symbol, + string calldata _cosmosDenom, + string calldata _name, + string calldata _symbol, uint8 _decimals - ) public { + ) external { // Deploy an ERC20 with entire supply granted to Gravity.sol CosmosERC20 erc20 = new CosmosERC20(address(this), _name, _symbol, _decimals); // Fire an event to let the Cosmos module know - state_lastEventNonce = state_lastEventNonce.add(1); + state_lastEventNonce = state_lastEventNonce + 1; emit ERC20DeployedEvent( _cosmosDenom, address(erc20), @@ -561,41 +611,53 @@ contract Gravity is ReentrancyGuard { constructor( // A unique identifier for this gravity instance to use in signatures bytes32 _gravityId, - // How much voting power is needed to approve operations - uint256 _powerThreshold, - // The validator set + // The validator set, not in valset args format since many of it's + // arguments would never be used in this case address[] memory _validators, uint256[] memory _powers - ) public { + ) { // CHECKS // Check that validators, powers, and signatures (v,r,s) set is well-formed - require(_validators.length == _powers.length, "Malformed current validator set"); + if (_validators.length != _powers.length || _validators.length == 0) { + revert MalformedCurrentValidatorSet(); + } // Check cumulative power to ensure the contract has sufficient power to actually // pass a vote uint256 cumulativePower = 0; for (uint256 i = 0; i < _powers.length; i++) { cumulativePower = cumulativePower + _powers[i]; - if (cumulativePower > _powerThreshold) { + if (cumulativePower > constant_powerThreshold) { break; } } - require( - cumulativePower > _powerThreshold, - "Submitted validator set signatures do not have enough power." - ); + if (cumulativePower <= constant_powerThreshold) { + revert InsufficientPower({ + cumulativePower: cumulativePower, + powerThreshold: constant_powerThreshold + }); + } - bytes32 newCheckpoint = makeCheckpoint(_validators, _powers, 0, _gravityId); + ValsetArgs memory _valset; + _valset = ValsetArgs(_validators, _powers, 0, 0, address(0)); + + bytes32 newCheckpoint = makeCheckpoint(_valset, _gravityId); // ACTIONS state_gravityId = _gravityId; - state_powerThreshold = _powerThreshold; state_lastValsetCheckpoint = newCheckpoint; // LOGS - emit ValsetUpdatedEvent(state_lastValsetNonce, state_lastEventNonce, _validators, _powers); + emit ValsetUpdatedEvent( + state_lastValsetNonce, + state_lastEventNonce, + 0, + address(0), + _validators, + _powers + ); } -} +} \ No newline at end of file diff --git a/contracts/basic-bandwidth-generation/contracts/test-contracts/TestCosmosToken.sol b/contracts/basic-bandwidth-generation/contracts/test-contracts/TestCosmosToken.sol new file mode 100644 index 0000000000..9c88d8defd --- /dev/null +++ b/contracts/basic-bandwidth-generation/contracts/test-contracts/TestCosmosToken.sol @@ -0,0 +1,55 @@ +//SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.10; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +/** +* This is a slightly modified version of the cosmos erc20 contract +* which I have done for unit testing. +* +* All that has been changed is the MAX_UINT variable to allow +* me to mint some tokens more easily in unit tests, and the +* addition of the public mint() function. +*/ + + +contract TestCosmosERC20 is ERC20 { + /* canonical amount */ + // uint256 MAX_UINT = 2**256 - 1; + + /* unit testing amount */ + uint256 HALF_MAX_UINT = 2**256 / 2; + + uint8 private cosmosDecimals; + address private gravityAddress; + + // This override ensures we return the proper number of decimals + // for the cosmos token + function decimals() public view virtual override returns (uint8) { + return cosmosDecimals; + } + + // This is not an accurate total supply. Instead this is the total supply + // of the given cosmos asset on Ethereum at this moment in time. Keeping + // a totally accurate supply would require constant updates from the Cosmos + // side, while in theory this could be piggy-backed on some existing bridge + // operation it's a lot of complextiy to add so we chose to forgoe it. + function totalSupply() public view virtual override returns (uint256) { + return HALF_MAX_UINT - balanceOf(gravityAddress); + } + + constructor( + address _gravityAddress, + string memory _name, + string memory _symbol, + uint8 _decimals + ) ERC20(_name, _symbol) { + cosmosDecimals = _decimals; + gravityAddress = _gravityAddress; + _mint(_gravityAddress, HALF_MAX_UINT); + } + + // Additional function for our (nym repo) unit tests with bridge + function mintForUnitTesting(address _to, uint _amount) public { + _mint(_to, _amount); + } +} \ No newline at end of file diff --git a/contracts/basic-bandwidth-generation/contracts/test-contracts/TestGravity.sol b/contracts/basic-bandwidth-generation/contracts/test-contracts/TestGravity.sol new file mode 100644 index 0000000000..58e52dd83c --- /dev/null +++ b/contracts/basic-bandwidth-generation/contracts/test-contracts/TestGravity.sol @@ -0,0 +1,671 @@ +//SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.10; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; +import "@openzeppelin/contracts/utils/Address.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "./TestCosmosToken.sol"; + +/** +* This is a slightly modified version of the gravity bridge contract +* which I have done for unit testing. +* +* All that has been changed is ___ +*/ + +error InvalidSignature(); +error InvalidValsetNonce(uint256 newNonce, uint256 currentNonce); +error InvalidBatchNonce(uint256 newNonce, uint256 currentNonce); +error InvalidLogicCallNonce(uint256 newNonce, uint256 currentNonce); +error InvalidLogicCallTransfers(); +error InvalidLogicCallFees(); +error InvalidSendToCosmos(); +error IncorrectCheckpoint(); +error MalformedNewValidatorSet(); +error MalformedCurrentValidatorSet(); +error MalformedBatch(); +error InsufficientPower(uint256 cumulativePower, uint256 powerThreshold); +error BatchTimedOut(); +error LogicCallTimedOut(); + +// This is being used purely to avoid stack too deep errors +struct LogicCallArgs { + // Transfers out to the logic contract + uint256[] transferAmounts; + address[] transferTokenContracts; + // The fees (transferred to msg.sender) + uint256[] feeAmounts; + address[] feeTokenContracts; + // The arbitrary logic call + address logicContractAddress; + bytes payload; + // Invalidation metadata + uint256 timeOut; + bytes32 invalidationId; + uint256 invalidationNonce; +} + +// This is used purely to avoid stack too deep errors +// represents everything about a given validator set +struct ValsetArgs { + // the validators in this set, represented by an Ethereum address + address[] validators; + // the powers of the given validators in the same order as above + uint256[] powers; + // the nonce of this validator set + uint256 valsetNonce; + // the reward amount denominated in the below reward token, can be + // set to zero + uint256 rewardAmount; + // the reward token, should be set to the zero address if not being used + address rewardToken; +} + +// This represents a validator signature +struct Signature { + uint8 v; + bytes32 r; + bytes32 s; +} + +contract Gravity is ReentrancyGuard { + using SafeERC20 for IERC20; + + // The number of 'votes' required to execute a valset + // update or batch execution, set to 2/3 of 2^32 + uint256 constant constant_powerThreshold = 2863311530; + + // These are updated often + bytes32 public state_lastValsetCheckpoint; + mapping(address => uint256) public state_lastBatchNonces; + mapping(bytes32 => uint256) public state_invalidationMapping; + uint256 public state_lastValsetNonce = 0; + // event nonce zero is reserved by the Cosmos module as a special + // value indicating that no events have yet been submitted + uint256 public state_lastEventNonce = 1; + + // This is set once at initialization + bytes32 public immutable state_gravityId; + + // TransactionBatchExecutedEvent and SendToCosmosEvent both include the field _eventNonce. + // This is incremented every time one of these events is emitted. It is checked by the + // Cosmos module to ensure that all events are received in order, and that none are lost. + // + // ValsetUpdatedEvent does not include the field _eventNonce because it is never submitted to the Cosmos + // module. It is purely for the use of relayers to allow them to successfully submit batches. + event TransactionBatchExecutedEvent( + uint256 indexed _batchNonce, + address indexed _token, + uint256 _eventNonce + ); + event SendToCosmosEvent( + address indexed _tokenContract, + address indexed _sender, + string _destination, + uint256 _amount, + uint256 _eventNonce + ); + event ERC20DeployedEvent( + // FYI: Can't index on a string without doing a bunch of weird stuff + string _cosmosDenom, + address indexed _tokenContract, + string _name, + string _symbol, + uint8 _decimals, + uint256 _eventNonce + ); + event ValsetUpdatedEvent( + uint256 indexed _newValsetNonce, + uint256 _eventNonce, + uint256 _rewardAmount, + address _rewardToken, + address[] _validators, + uint256[] _powers + ); + event LogicCallEvent( + bytes32 _invalidationId, + uint256 _invalidationNonce, + bytes _returnData, + uint256 _eventNonce + ); + + // TEST FIXTURES + // These are here to make it easier to measure gas usage. They should be removed before production + function testMakeCheckpoint(ValsetArgs calldata _valsetArgs, bytes32 _gravityId) external pure { + makeCheckpoint(_valsetArgs, _gravityId); + } + + function testCheckValidatorSignatures( + ValsetArgs calldata _currentValset, + Signature[] calldata _sigs, + bytes32 _theHash, + uint256 _powerThreshold + ) external pure { + checkValidatorSignatures(_currentValset, _sigs, _theHash, _powerThreshold); + } + + // END TEST FIXTURES + + function lastBatchNonce(address _erc20Address) external view returns (uint256) { + return state_lastBatchNonces[_erc20Address]; + } + + function lastLogicCallNonce(bytes32 _invalidation_id) external view returns (uint256) { + return state_invalidationMapping[_invalidation_id]; + } + + // Utility function to verify geth style signatures + function verifySig( + address _signer, + bytes32 _theHash, + Signature calldata _sig + ) private pure returns (bool) { + bytes32 messageDigest = keccak256( + abi.encodePacked("\x19Ethereum Signed Message:\n32", _theHash) + ); + return _signer == ECDSA.recover(messageDigest, _sig.v, _sig.r, _sig.s); + } + + // Utility function to determine that a validator set and signatures are well formed + function validateValset(ValsetArgs calldata _valset, Signature[] calldata _sigs) private pure { + // Check that current validators, powers, and signatures (v,r,s) set is well-formed + if ( + _valset.validators.length != _valset.powers.length || + _valset.validators.length != _sigs.length + ) { + revert MalformedCurrentValidatorSet(); + } + } + + // Make a new checkpoint from the supplied validator set + // A checkpoint is a hash of all relevant information about the valset. This is stored by the contract, + // instead of storing the information directly. This saves on storage and gas. + // The format of the checkpoint is: + // h(gravityId, "checkpoint", valsetNonce, validators[], powers[]) + // Where h is the keccak256 hash function. + // The validator powers must be decreasing or equal. This is important for checking the signatures on the + // next valset, since it allows the caller to stop verifying signatures once a quorum of signatures have been verified. + function makeCheckpoint(ValsetArgs memory _valsetArgs, bytes32 _gravityId) + private + pure + returns (bytes32) + { + // bytes32 encoding of the string "checkpoint" + bytes32 methodName = 0x636865636b706f696e7400000000000000000000000000000000000000000000; + + bytes32 checkpoint = keccak256( + abi.encode( + _gravityId, + methodName, + _valsetArgs.valsetNonce, + _valsetArgs.validators, + _valsetArgs.powers, + _valsetArgs.rewardAmount, + _valsetArgs.rewardToken + ) + ); + + return checkpoint; + } + + function checkValidatorSignatures( + // The current validator set and their powers + ValsetArgs calldata _currentValset, + // The current validator's signatures + Signature[] calldata _sigs, + // This is what we are checking they have signed + bytes32 _theHash, + uint256 _powerThreshold + ) private pure { + uint256 cumulativePower = 0; + + for (uint256 i = 0; i < _currentValset.validators.length; i++) { + // If v is set to 0, this signifies that it was not possible to get a signature from this validator and we skip evaluation + // (In a valid signature, it is either 27 or 28) + if (_sigs[i].v != 0) { + // Check that the current validator has signed off on the hash + if (!verifySig(_currentValset.validators[i], _theHash, _sigs[i])) { + revert InvalidSignature(); + } + + // Sum up cumulative power + cumulativePower = cumulativePower + _currentValset.powers[i]; + + // Break early to avoid wasting gas + if (cumulativePower > _powerThreshold) { + break; + } + } + } + + // Check that there was enough power + if (cumulativePower <= _powerThreshold) { + revert InsufficientPower(cumulativePower, _powerThreshold); + } + // Success + } + + // This updates the valset by checking that the validators in the current valset have signed off on the + // new valset. The signatures supplied are the signatures of the current valset over the checkpoint hash + // generated from the new valset. + // Anyone can call this function, but they must supply valid signatures of constant_powerThreshold of the current valset over + // the new valset. + function updateValset( + // The new version of the validator set + ValsetArgs calldata _newValset, + // The current validators that approve the change + ValsetArgs calldata _currentValset, + // These are arrays of the parts of the current validator's signatures + Signature[] calldata _sigs + ) external { + // CHECKS + + // Check that the valset nonce is greater than the old one + if (_newValset.valsetNonce <= _currentValset.valsetNonce) { + revert InvalidValsetNonce({ + newNonce: _newValset.valsetNonce, + currentNonce: _currentValset.valsetNonce + }); + } + + // Check that the valset nonce is less than a million nonces forward from the old one + // this makes it difficult for an attacker to lock out the contract by getting a single + // bad validator set through with uint256 max nonce + if (_newValset.valsetNonce > _currentValset.valsetNonce + 1000000) { + revert InvalidValsetNonce({ + newNonce: _newValset.valsetNonce, + currentNonce: _currentValset.valsetNonce + }); + } + + // Check that new validators and powers set is well-formed + if ( + _newValset.validators.length != _newValset.powers.length || + _newValset.validators.length == 0 + ) { + revert MalformedNewValidatorSet(); + } + + // Check that current validators, powers, and signatures (v,r,s) set is well-formed + validateValset(_currentValset, _sigs); + + // Check cumulative power to ensure the contract has sufficient power to actually + // pass a vote + uint256 cumulativePower = 0; + for (uint256 i = 0; i < _newValset.powers.length; i++) { + cumulativePower = cumulativePower + _newValset.powers[i]; + if (cumulativePower > constant_powerThreshold) { + break; + } + } + if (cumulativePower <= constant_powerThreshold) { + revert InsufficientPower({ + cumulativePower: cumulativePower, + powerThreshold: constant_powerThreshold + }); + } + + // Check that the supplied current validator set matches the saved checkpoint + if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) { + revert IncorrectCheckpoint(); + } + + // Check that enough current validators have signed off on the new validator set + bytes32 newCheckpoint = makeCheckpoint(_newValset, state_gravityId); + + checkValidatorSignatures(_currentValset, _sigs, newCheckpoint, constant_powerThreshold); + + // ACTIONS + + // Stored to be used next time to validate that the valset + // supplied by the caller is correct. + state_lastValsetCheckpoint = newCheckpoint; + + // Store new nonce + state_lastValsetNonce = _newValset.valsetNonce; + + // Send submission reward to msg.sender if reward token is a valid value + if (_newValset.rewardToken != address(0) && _newValset.rewardAmount != 0) { + IERC20(_newValset.rewardToken).safeTransfer(msg.sender, _newValset.rewardAmount); + } + + // LOGS + + state_lastEventNonce = state_lastEventNonce + 1; + emit ValsetUpdatedEvent( + _newValset.valsetNonce, + state_lastEventNonce, + _newValset.rewardAmount, + _newValset.rewardToken, + _newValset.validators, + _newValset.powers + ); + } + + // submitBatch processes a batch of Cosmos -> Ethereum transactions by sending the tokens in the transactions + // to the destination addresses. It is approved by the current Cosmos validator set. + // Anyone can call this function, but they must supply valid signatures of constant_powerThreshold of the current valset over + // the batch. + function submitBatch( + // The validators that approve the batch + ValsetArgs calldata _currentValset, + // These are arrays of the parts of the validators signatures + Signature[] calldata _sigs, + // The batch of transactions + uint256[] calldata _amounts, + address[] calldata _destinations, + uint256[] calldata _fees, + uint256 _batchNonce, + address _tokenContract, + // a block height beyond which this batch is not valid + // used to provide a fee-free timeout + uint256 _batchTimeout + ) external nonReentrant { + // CHECKS scoped to reduce stack depth + { + // Check that the batch nonce is higher than the last nonce for this token + if (_batchNonce <= state_lastBatchNonces[_tokenContract]) { + revert InvalidBatchNonce({ + newNonce: _batchNonce, + currentNonce: state_lastBatchNonces[_tokenContract] + }); + } + + // Check that the batch nonce is less than one million nonces forward from the old one + // this makes it difficult for an attacker to lock out the contract by getting a single + // bad batch through with uint256 max nonce + if (_batchNonce > state_lastBatchNonces[_tokenContract] + 1000000) { + revert InvalidBatchNonce({ + newNonce: _batchNonce, + currentNonce: state_lastBatchNonces[_tokenContract] + }); + } + + // Check that the block height is less than the timeout height + if (block.number >= _batchTimeout) { + revert BatchTimedOut(); + } + + // Check that current validators, powers, and signatures (v,r,s) set is well-formed + validateValset(_currentValset, _sigs); + + // Check that the supplied current validator set matches the saved checkpoint + if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) { + revert IncorrectCheckpoint(); + } + + // Check that the transaction batch is well-formed + if (_amounts.length != _destinations.length || _amounts.length != _fees.length) { + revert MalformedBatch(); + } + + // Check that enough current validators have signed off on the transaction batch and valset + checkValidatorSignatures( + _currentValset, + _sigs, + // Get hash of the transaction batch and checkpoint + keccak256( + abi.encode( + state_gravityId, + // bytes32 encoding of "transactionBatch" + 0x7472616e73616374696f6e426174636800000000000000000000000000000000, + _amounts, + _destinations, + _fees, + _batchNonce, + _tokenContract, + _batchTimeout + ) + ), + constant_powerThreshold + ); + + // ACTIONS + + // Store batch nonce + state_lastBatchNonces[_tokenContract] = _batchNonce; + + { + // Send transaction amounts to destinations + uint256 totalFee; + for (uint256 i = 0; i < _amounts.length; i++) { + IERC20(_tokenContract).safeTransfer(_destinations[i], _amounts[i]); + totalFee = totalFee + _fees[i]; + } + + // Send transaction fees to msg.sender + IERC20(_tokenContract).safeTransfer(msg.sender, totalFee); + } + } + + // LOGS scoped to reduce stack depth + { + state_lastEventNonce = state_lastEventNonce + 1; + emit TransactionBatchExecutedEvent(_batchNonce, _tokenContract, state_lastEventNonce); + } + } + + // This makes calls to contracts that execute arbitrary logic + // First, it gives the logic contract some tokens + // Then, it gives msg.senders tokens for fees + // Then, it calls an arbitrary function on the logic contract + // invalidationId and invalidationNonce are used for replay prevention. + // They can be used to implement a per-token nonce by setting the token + // address as the invalidationId and incrementing the nonce each call. + // They can be used for nonce-free replay prevention by using a different invalidationId + // for each call. + function submitLogicCall( + // The validators that approve the call + ValsetArgs calldata _currentValset, + // These are arrays of the parts of the validators signatures + Signature[] calldata _sigs, + LogicCallArgs memory _args + ) external nonReentrant { + // CHECKS scoped to reduce stack depth + { + // Check that the call has not timed out + if (block.number >= _args.timeOut) { + revert LogicCallTimedOut(); + } + + // Check that the invalidation nonce is higher than the last nonce for this invalidation Id + if (state_invalidationMapping[_args.invalidationId] >= _args.invalidationNonce) { + revert InvalidLogicCallNonce({ + newNonce: _args.invalidationNonce, + currentNonce: state_invalidationMapping[_args.invalidationId] + }); + } + + // note the lack of nonce skipping check, it's not needed here since an attacker + // will never be able to fill the invalidationId space, therefore a nonce lockout + // is simply not possible + + // Check that current validators, powers, and signatures (v,r,s) set is well-formed + validateValset(_currentValset, _sigs); + + // Check that the supplied current validator set matches the saved checkpoint + if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) { + revert IncorrectCheckpoint(); + } + + if (_args.transferAmounts.length != _args.transferTokenContracts.length) { + revert InvalidLogicCallTransfers(); + } + + if (_args.feeAmounts.length != _args.feeTokenContracts.length) { + revert InvalidLogicCallFees(); + } + } + { + bytes32 argsHash = keccak256( + abi.encode( + state_gravityId, + // bytes32 encoding of "logicCall" + 0x6c6f67696343616c6c0000000000000000000000000000000000000000000000, + _args.transferAmounts, + _args.transferTokenContracts, + _args.feeAmounts, + _args.feeTokenContracts, + _args.logicContractAddress, + _args.payload, + _args.timeOut, + _args.invalidationId, + _args.invalidationNonce + ) + ); + + // Check that enough current validators have signed off on the transaction batch and valset + checkValidatorSignatures( + _currentValset, + _sigs, + // Get hash of the transaction batch and checkpoint + argsHash, + constant_powerThreshold + ); + } + + // ACTIONS + + // Update invaldiation nonce + state_invalidationMapping[_args.invalidationId] = _args.invalidationNonce; + + // Send tokens to the logic contract + for (uint256 i = 0; i < _args.transferAmounts.length; i++) { + IERC20(_args.transferTokenContracts[i]).safeTransfer( + _args.logicContractAddress, + _args.transferAmounts[i] + ); + } + + // Make call to logic contract + bytes memory returnData = Address.functionCall(_args.logicContractAddress, _args.payload); + + // Send fees to msg.sender + for (uint256 i = 0; i < _args.feeAmounts.length; i++) { + IERC20(_args.feeTokenContracts[i]).safeTransfer(msg.sender, _args.feeAmounts[i]); + } + + // LOGS scoped to reduce stack depth + { + state_lastEventNonce = state_lastEventNonce + 1; + emit LogicCallEvent( + _args.invalidationId, + _args.invalidationNonce, + returnData, + state_lastEventNonce + ); + } + } + + function sendToCosmos( + address _tokenContract, + string calldata _destination, + uint256 _amount + ) external nonReentrant { + // we snapshot our current balance of this token + uint256 ourStartingBalance = IERC20(_tokenContract).balanceOf(address(this)); + + // attempt to transfer the user specified amount + IERC20(_tokenContract).safeTransferFrom(msg.sender, address(this), _amount); + + // check what this particular ERC20 implementation actually gave us, since it doesn't + // have to be at all related to the _amount + uint256 ourEndingBalance = IERC20(_tokenContract).balanceOf(address(this)); + + // a very strange ERC20 may trigger this condition, if we didn't have this we would + // underflow, so it's mostly just an error message printer + if (ourEndingBalance <= ourStartingBalance) { + revert InvalidSendToCosmos(); + } + + state_lastEventNonce = state_lastEventNonce + 1; + + // emit to Cosmos the actual amount our balance has changed, rather than the user + // provided amount. This protects against a small set of wonky ERC20 behavior, like + // burning on send but not tokens that for example change every users balance every day. + emit SendToCosmosEvent( + _tokenContract, + msg.sender, + _destination, + ourEndingBalance - ourStartingBalance, + state_lastEventNonce + ); + } + + function deployERC20( + string calldata _cosmosDenom, + string calldata _name, + string calldata _symbol, + uint8 _decimals + ) external { + // NOTE this is an edit made for the nym codebase unit tests - in the canonical bridge it is the entire token supply + // Deploy an ERC20 with half of entire supply granted to Gravity.sol + TestCosmosERC20 erc20 = new TestCosmosERC20(address(this), _name, _symbol, _decimals); + + // Fire an event to let the Cosmos module know + state_lastEventNonce = state_lastEventNonce + 1; + emit ERC20DeployedEvent( + _cosmosDenom, + address(erc20), + _name, + _symbol, + _decimals, + state_lastEventNonce + ); + } + + constructor( + // A unique identifier for this gravity instance to use in signatures + bytes32 _gravityId, + // The validator set, not in valset args format since many of it's + // arguments would never be used in this case + address[] memory _validators, + uint256[] memory _powers + ) { + // CHECKS + + // Check that validators, powers, and signatures (v,r,s) set is well-formed + if (_validators.length != _powers.length || _validators.length == 0) { + revert MalformedCurrentValidatorSet(); + } + + // Check cumulative power to ensure the contract has sufficient power to actually + // pass a vote + uint256 cumulativePower = 0; + for (uint256 i = 0; i < _powers.length; i++) { + cumulativePower = cumulativePower + _powers[i]; + if (cumulativePower > constant_powerThreshold) { + break; + } + } + if (cumulativePower <= constant_powerThreshold) { + revert InsufficientPower({ + cumulativePower: cumulativePower, + powerThreshold: constant_powerThreshold + }); + } + + ValsetArgs memory _valset; + _valset = ValsetArgs(_validators, _powers, 0, 0, address(0)); + + bytes32 newCheckpoint = makeCheckpoint(_valset, _gravityId); + + // ACTIONS + + state_gravityId = _gravityId; + state_lastValsetCheckpoint = newCheckpoint; + + // LOGS + + emit ValsetUpdatedEvent( + state_lastValsetNonce, + state_lastEventNonce, + 0, + address(0), + _validators, + _powers + ); + } +} \ No newline at end of file diff --git a/contracts/basic-bandwidth-generation/hardhat.config.js b/contracts/basic-bandwidth-generation/hardhat.config.js index f3e7fbb0cb..4b2c6cbb68 100644 --- a/contracts/basic-bandwidth-generation/hardhat.config.js +++ b/contracts/basic-bandwidth-generation/hardhat.config.js @@ -8,15 +8,15 @@ require('dotenv').config({ path: require('find-config')('.env') }); */ module.exports = { solidity: { - version: "0.6.6", + version: "0.8.10", settings: { optimizer: { enabled: true } } }, - paths: { - artifacts: "./artifacts/contracts" - }, + // paths: { + // artifacts: "./artifacts/contracts" + // }, networks: { // rinkeby: { // url: process.env.RINKEBY_URL, //Infura url with projectId diff --git a/contracts/basic-bandwidth-generation/package-lock.json b/contracts/basic-bandwidth-generation/package-lock.json index 110d9ce2e9..ff7cc4bb1f 100644 --- a/contracts/basic-bandwidth-generation/package-lock.json +++ b/contracts/basic-bandwidth-generation/package-lock.json @@ -1556,9 +1556,9 @@ } }, "@openzeppelin/contracts": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.4.1.tgz", - "integrity": "sha512-o+pHCf/yMLSlV5MkDQEzEQL402i6SoRnktru+0rdSxVEFZcTzzGhZCAtZjUFyKGazMSv1TilzMg+RbED1N8XHQ==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.3.1.tgz", + "integrity": "sha512-QjgbPPlmDK2clK1hzjw2ROfY8KA5q+PfhDUUxZFEBCZP9fi6d5FuNoh/Uq0oCTMEKPmue69vhX2jcl0N/tFKGw==" }, "@openzeppelin/test-helpers": { "version": "0.5.15", diff --git a/contracts/basic-bandwidth-generation/package.json b/contracts/basic-bandwidth-generation/package.json index 933fd6e4e7..14503ac52e 100644 --- a/contracts/basic-bandwidth-generation/package.json +++ b/contracts/basic-bandwidth-generation/package.json @@ -12,7 +12,7 @@ "dependencies": { "@nomiclabs/hardhat-truffle5": "^2.0.2", "@nomiclabs/hardhat-web3": "^2.0.0", - "@openzeppelin/contracts": "^4.3.2", + "@openzeppelin/contracts": "4.3.1", "@openzeppelin/test-helpers": "^0.5.15", "dotenv": "^10.0.0", "find-config": "^1.0.0"