/* Generated by ts-generator ver. 0.0.8 */ /* tslint:disable */ import { Contract, ContractFactory, Signer } from "ethers"; import { Provider } from "ethers/providers"; import { UnsignedTransaction } from "ethers/utils/transaction"; import { TransactionOverrides } from "."; import { TokenLocking } from "./TokenLocking"; export class TokenLockingFactory extends ContractFactory { constructor(signer?: Signer) { super(_abi, _bytecode, signer); } deploy(overrides?: TransactionOverrides): Promise { return super.deploy(overrides) as Promise; } getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { return super.getDeployTransaction(overrides); } attach(address: string): TokenLocking { return super.attach(address) as TokenLocking; } connect(signer: Signer): TokenLockingFactory { return super.connect(signer) as TokenLockingFactory; } static connect( address: string, signerOrProvider: Signer | Provider ): TokenLocking { return new Contract(address, _abi, signerOrProvider) as TokenLocking; } } const _abi = [ { constant: false, inputs: [ { name: "owner_", type: "address" } ], name: "setOwner", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [ { name: "authority_", type: "address" } ], name: "setAuthority", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: true, inputs: [], name: "owner", outputs: [ { name: "", type: "address" } ], payable: false, stateMutability: "view", type: "function" }, { constant: true, inputs: [], name: "authority", outputs: [ { name: "", type: "address" } ], payable: false, stateMutability: "view", type: "function" }, { anonymous: false, inputs: [ { indexed: true, name: "authority", type: "address" } ], name: "LogSetAuthority", type: "event" }, { anonymous: false, inputs: [ { indexed: true, name: "owner", type: "address" } ], name: "LogSetOwner", type: "event" }, { anonymous: false, inputs: [ { indexed: false, name: "colonyNetwork", type: "address" } ], name: "ColonyNetworkSet", type: "event" }, { anonymous: false, inputs: [ { indexed: false, name: "token", type: "address" }, { indexed: false, name: "lockCount", type: "uint256" } ], name: "TokenLocked", type: "event" }, { anonymous: false, inputs: [ { indexed: false, name: "token", type: "address" }, { indexed: false, name: "user", type: "address" }, { indexed: false, name: "lockId", type: "uint256" } ], name: "UserTokenUnlocked", type: "event" }, { anonymous: false, inputs: [ { indexed: false, name: "token", type: "address" }, { indexed: false, name: "user", type: "address" }, { indexed: false, name: "amount", type: "uint256" }, { indexed: false, name: "timestamp", type: "uint256" } ], name: "UserTokenDeposited", type: "event" }, { anonymous: false, inputs: [ { indexed: false, name: "token", type: "address" }, { indexed: false, name: "user", type: "address" }, { indexed: false, name: "amount", type: "uint256" } ], name: "UserTokenWithdrawn", type: "event" }, { anonymous: false, inputs: [ { indexed: false, name: "miner", type: "address" }, { indexed: false, name: "beneficiary", type: "address" }, { indexed: false, name: "tokensLost", type: "uint256" } ], name: "ReputationMinerPenalised", type: "event" }, { constant: false, inputs: [ { name: "_colonyNetwork", type: "address" } ], name: "setColonyNetwork", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: true, inputs: [], name: "getColonyNetwork", outputs: [ { name: "", type: "address" } ], payable: false, stateMutability: "view", type: "function" }, { constant: false, inputs: [ { name: "_token", type: "address" } ], name: "lockToken", outputs: [ { name: "", type: "uint256" } ], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [ { name: "_token", type: "address" }, { name: "_user", type: "address" }, { name: "_lockId", type: "uint256" } ], name: "unlockTokenForUser", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [ { name: "_token", type: "address" }, { name: "_lockId", type: "uint256" } ], name: "incrementLockCounterTo", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [ { name: "_token", type: "address" }, { name: "_amount", type: "uint256" } ], name: "deposit", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [ { name: "_token", type: "address" }, { name: "_amount", type: "uint256" } ], name: "withdraw", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [ { name: "_stakers", type: "address[]" }, { name: "_beneficiary", type: "address" }, { name: "_amount", type: "uint256" } ], name: "punishStakers", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: true, inputs: [ { name: "_token", type: "address" } ], name: "getTotalLockCount", outputs: [ { name: "", type: "uint256" } ], payable: false, stateMutability: "view", type: "function" }, { constant: true, inputs: [ { name: "_token", type: "address" }, { name: "_user", type: "address" } ], name: "getUserLock", outputs: [ { components: [ { name: "lockCount", type: "uint256" }, { name: "balance", type: "uint256" }, { name: "timestamp", type: "uint256" } ], name: "lock", type: "tuple" } ], payable: false, stateMutability: "view", type: "function" } ]; const _bytecode = "0x60806040819052600180546001600160a01b03191633908117909155907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2611d84806100516000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80634e5e83951161008c5780638da5cb5b116100665780638da5cb5b146101d4578063bf503823146101dc578063bf7e214f146101ef578063f3fef3a314610204576100ea565b80634e5e8395146101995780636d7bd889146101ae5780637a9e5e4b146101c1576100ea565b80631c20ed99116100c85780631c20ed99146101405780631ca55574146101535780631cc17c521461016657806347e7ef2414610186576100ea565b806303e27b42146100ef57806310693fcd1461010457806313af40351461012d575b600080fd5b6101026100fd36600461149d565b610217565b005b61011761011236600461149d565b6102ab565b6040516101249190611c77565b60405180910390f35b61010261013b36600461149d565b6103c5565b61010261014e366004611598565b61044a565b61011761016136600461149d565b6107cf565b6101796101743660046114e1565b6107ea565b6040516101249190611c69565b610102610194366004611568565b610841565b6101a1610ac5565b6040516101249190611a6a565b6101026101bc36600461151b565b610ad4565b6101026101cf3660046115ee565b610c93565b6101a1610d14565b6101026101ea366004611568565b610d23565b6101f7610db3565b6040516101249190611b7b565b610102610212366004611568565b610dc2565b61022d336000356001600160e01b0319166111ce565b61025557604051600160e51b62461bcd02815260040161024c90611b99565b60405180910390fd5b600380546001600160a01b0319166001600160a01b0383161790556040517faac08694cb36f6250aa0c27b058ab1542ec8a9289c0a3af21af36cdfaf1b46cc906102a0908390611a6a565b60405180910390a150565b600354604051600160e01b63db0dd7ff0281526000916001600160a01b03169063db0dd7ff906102df903390600401611a78565b60206040518083038186803b1580156102f757600080fd5b505afa15801561030b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061032f91908101906115d0565b61034e57604051600160e51b62461bcd02815260040161024c90611bf9565b6001600160a01b0382166000908152600560205260409081902080546001019081905590517ff9626bca62c59d77fa45a204dc096874ee066a5c5e124aa9ce6c438dbdf7387a916103a191859190611b5f565b60405180910390a1506001600160a01b031660009081526005602052604090205490565b6103db336000356001600160e01b0319166111ce565b6103fa57604051600160e51b62461bcd02815260040161024c90611b99565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b600354604051600160e21b633cb216670281526001600160a01b039091169063f2c8599c9061047e90600190600401611b6d565b60206040518083038186803b15801561049657600080fd5b505afa1580156104aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104ce91908101906114c3565b6001600160a01b0316336001600160a01b03161461050157604051600160e51b62461bcd02815260040161024c90611c19565b60035460408051600160e01b63731bc22f02815290516000926001600160a01b03169163731bc22f916004808301926020929190829003018186803b15801561054957600080fd5b505afa15801561055d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061058191908101906114c3565b6001600160a01b03166321df0da76040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b957600080fd5b505afa1580156105cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105f191908101906114c3565b90506000805b85518110156107c7576001600160a01b0383166000908152600460205260408120875161065d929089908590811061062b57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010154856112af565b91506106c760046000856001600160a01b03166001600160a01b03168152602001908152602001600020600088848151811061069557fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010154836112c6565b6001600160a01b038416600090815260046020526040812088519091908990859081106106f057fe5b6020908102919091018101516001600160a01b0390811683528282019390935260409182016000908120600190810195909555878416815260048252828120938a1681529290529020015461074590836112ec565b6001600160a01b038085166000908152600460209081526040808320938a168352929052206001015585517f51cae99a709e7fb360c44b4b49079ac46304ab5b2322a2855a129811dafdefc39087908390811061079e57fe5b602002602001015186846040516107b793929190611b51565b60405180910390a16001016105f7565b505050505050565b6001600160a01b031660009081526005602052604090205490565b6107f261134c565b506001600160a01b039182166000908152600460209081526040808320939094168252918252829020825160608101845281548152600182015492810192909252600201549181019190915290565b6001600160a01b03821660009081526004602090815260408083203384529091529020600101548290156108bc576001600160a01b0381166000908152600560209081526040808320546004835281842033855290925290912054146108bc57604051600160e51b62461bcd02815260040161024c90611bc9565b600082116108df57604051600160e51b62461bcd02815260040161024c90611c39565b604051600160e01b6323b872dd0281526001600160a01b038416906323b872dd9061091290339030908790600401611a86565b602060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061096491908101906115d0565b61098357604051600160e51b62461bcd02815260040161024c90611c09565b6001600160a01b038316600090815260046020908152604080832033845290915290206001810154835b6001600160c01b03821015806109ca57506001600160c01b038110155b156109dd576002918290049190046109ad565b60006109ed8460010154876112ec565b905060006109fb84846112ec565b610a1b610a0c868860020154611312565b610a168642611312565b6112ec565b81610a2257fe5b604080516060810182526001600160a01b038c16600081815260056020908152848220548452808401898152969095048385018181529282526004865284822033808452965290849020925183559451600183015551600290910155519192507ff55b0151d50819699161c8aded687da573680e059b1775eb51715a4e3100d9e991610ab3918b9186908690611aeb565b60405180910390a15050505050505050565b6003546001600160a01b031690565b600354604051600160e01b63db0dd7ff0281526001600160a01b039091169063db0dd7ff90610b07903390600401611a78565b60206040518083038186803b158015610b1f57600080fd5b505afa158015610b33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b5791908101906115d0565b610b7657604051600160e51b62461bcd02815260040161024c90611bf9565b6001600160a01b038316600090815260056020526040902054811115610bb157604051600160e51b62461bcd02815260040161024c90611be9565b6001600160a01b038084166000908152600460209081526040808320938616835292905290812054610be49083906112c6565b905080610c0657604051600160e51b62461bcd02815260040161024c90611c29565b80600114610c2957604051600160e51b62461bcd02815260040161024c90611c59565b6001600160a01b0380851660009081526004602090815260408083209387168352929052819020839055517f66d1ba6a7bba8a64b1341777e1e7721371ab2824e4b50ec33c687036451fe7f090610c8590869086908690611b51565b60405180910390a150505050565b610ca9336000356001600160e01b0319166111ce565b610cc857604051600160e51b62461bcd02815260040161024c90611b99565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b6001546001600160a01b031681565b6001600160a01b0382166000908152600560205260409020548111801590610d6d57506001600160a01b038216600090815260046020908152604080832033845290915290205481115b610d8c57604051600160e51b62461bcd02815260040161024c90611bd9565b6001600160a01b039091166000908152600460209081526040808320338452909152902055565b6000546001600160a01b031681565b6001600160a01b0382166000908152600460209081526040808320338452909152902060010154829015610e3d576001600160a01b038116600090815260056020908152604080832054600483528184203385529092529091205414610e3d57604051600160e51b62461bcd02815260040161024c90611bc9565b826000600360009054906101000a90046001600160a01b03166001600160a01b031663731bc22f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8e57600080fd5b505afa158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ec691908101906114c3565b6001600160a01b03166321df0da76040518163ffffffff1660e01b815260040160206040518083038186803b158015610efe57600080fd5b505afa158015610f12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f3691908101906114c3565b9050806001600160a01b0316826001600160a01b0316141561107857600354604051600160e21b633cb216670281526000916001600160a01b03169063f2c8599c90610f8790600190600401611b6d565b60206040518083038186803b158015610f9f57600080fd5b505afa158015610fb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610fd791908101906114c3565b6001600160a01b0316638896d5d6336040518263ffffffff1660e01b81526004016110029190611a78565b60806040518083038186803b15801561101a57600080fd5b505afa15801561102e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611052919081019061160c565b519050801561107657604051600160e51b62461bcd02815260040161024c90611c49565b505b6000841161109b57604051600160e51b62461bcd02815260040161024c90611c39565b6001600160a01b03851660009081526004602090815260408083203384529091529020600101546110cc90856112c6565b6001600160a01b038616600081815260046020818152604080842033808652925292839020600101949094559051600160e01b63a9059cbb028152919263a9059cbb9261111b92899101611aae565b602060405180830381600087803b15801561113557600080fd5b505af1158015611149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061116d91908101906115d0565b61118c57604051600160e51b62461bcd02815260040161024c90611c09565b7f01e2c71b014f62b55400e8becdca80c6a907b5cc36c7a5789443c3ed5e5799278533866040516111bf93929190611ad0565b60405180910390a15050505050565b60006001600160a01b0383163014156111e9575060016112a9565b6001546001600160a01b0384811691161415611207575060016112a9565b6000546001600160a01b031661121f575060006112a9565b600054604051600160e01b63b70096130281526001600160a01b039091169063b70096139061125690869030908790600401611b29565b60206040518083038186803b15801561126e57600080fd5b505afa158015611282573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506112a691908101906115d0565b90505b92915050565b6000818311156112bf57816112a6565b5090919050565b808203828111156112a957604051600160e51b62461bcd02815260040161024c90611b89565b808201828110156112a957604051600160e51b62461bcd02815260040161024c90611bb9565b600081158061132d5750508082028282828161132a57fe5b04145b6112a957604051600160e51b62461bcd02815260040161024c90611ba9565b60405180606001604052806000815260200160008152602001600081525090565b80356112a981611d18565b80516112a981611d18565b600082601f83011261139457600080fd5b81356113a76113a282611cac565b611c85565b915081818352602084019350602081019050838560208402820111156113cc57600080fd5b60005b838110156113f857816113e2888261136d565b84525060209283019291909101906001016113cf565b5050505092915050565b80516112a981611d2f565b80516112a981611d38565b80356112a981611d41565b60006080828403121561143557600080fd5b61143f6080611c85565b9050600061144d848461140d565b825250602061145e8484830161140d565b60208301525060406114728482850161140d565b60408301525060606114868482850161140d565b60608301525092915050565b80356112a981611d38565b6000602082840312156114af57600080fd5b60006114bb848461136d565b949350505050565b6000602082840312156114d557600080fd5b60006114bb8484611378565b600080604083850312156114f457600080fd5b6000611500858561136d565b92505060206115118582860161136d565b9150509250929050565b60008060006060848603121561153057600080fd5b600061153c868661136d565b935050602061154d8682870161136d565b925050604061155e86828701611492565b9150509250925092565b6000806040838503121561157b57600080fd5b6000611587858561136d565b925050602061151185828601611492565b6000806000606084860312156115ad57600080fd5b833567ffffffffffffffff8111156115c457600080fd5b61153c86828701611383565b6000602082840312156115e257600080fd5b60006114bb8484611402565b60006020828403121561160057600080fd5b60006114bb8484611418565b60006080828403121561161e57600080fd5b60006114bb8484611423565b61163381611d0d565b82525050565b61163381611cd6565b61163381611ce1565b61163381611ce9565b61163381611cf6565b600061166a601583611ccd565b7f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000815260200192915050565b60006116a3601483611ccd565b7f64732d617574682d756e617574686f72697a6564000000000000000000000000815260200192915050565b60006116dc601483611ccd565b7f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000815260200192915050565b6000611715601483611ccd565b7f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000815260200192915050565b600061174e602183611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d746f6b656e2d6c6f636b658152600160fa1b601902602082015260400192915050565b6000611794602483611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d696e76616c69642d6c6f638152600160e21b631acb5a5902602082015260400192915050565b60006117dd601b83611ccd565b7f636f6c6f6e792d746f6b656e2d696e76616c69642d6c6f636b69640000000000815260200192915050565b6000611816602683611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d73656e6465722d6e6f742d8152600160d01b65636f6c6f6e7902602082015260400192915050565b6000611861602483611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d7472616e736665722d66618152600160e21b631a5b195902602082015260400192915050565b60006118aa603783611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d73656e6465722d6e6f742d81527f72657075746174696f6e2d6d696e696e672d6379636c65000000000000000000602082015260400192915050565b6000611909601d83611ccd565b7f636f6c6f6e792d746f6b656e2d616c72656164792d756e6c6f636b6564000000815260200192915050565b6000611942602383611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d696e76616c69642d616d6f8152600160ea1b621d5b9d02602082015260400192915050565b600061198a602383611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d686173682d7375626d69748152600160ea1b621d195902602082015260400192915050565b60006119d2602e83611ccd565b7f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6861732d70726576696f7581527f732d6163746976652d6c6f636b73000000000000000000000000000000000000602082015260400192915050565b80516060830190611a358482611a61565b506020820151611a486020850182611a61565b506040820151611a5b6040850182611a61565b50505050565b61163381611ce6565b602081016112a98284611639565b602081016112a9828461162a565b60608101611a94828661162a565b611aa16020830185611639565b6114bb6040830184611a61565b60408101611abc828561162a565b611ac96020830184611a61565b9392505050565b60608101611ade8286611639565b611aa1602083018561162a565b60808101611af98287611639565b611b06602083018661162a565b611b136040830185611a61565b611b206060830184611a61565b95945050505050565b60608101611b378286611639565b611b446020830185611639565b6114bb604083018461164b565b60608101611a948286611639565b60408101611abc8285611639565b602081016112a98284611642565b602081016112a98284611654565b602080825281016112a98161165d565b602080825281016112a981611696565b602080825281016112a9816116cf565b602080825281016112a981611708565b602080825281016112a981611741565b602080825281016112a981611787565b602080825281016112a9816117d0565b602080825281016112a981611809565b602080825281016112a981611854565b602080825281016112a98161189d565b602080825281016112a9816118fc565b602080825281016112a981611935565b602080825281016112a98161197d565b602080825281016112a9816119c5565b606081016112a98284611a24565b602081016112a98284611a61565b60405181810167ffffffffffffffff81118282101715611ca457600080fd5b604052919050565b600067ffffffffffffffff821115611cc357600080fd5b5060209081020190565b90815260200190565b60006112a982611d01565b151590565b90565b6001600160e01b03191690565b60006112a982611cd6565b6001600160a01b031690565b60006112a982611cf6565b611d2181611cd6565b8114611d2c57600080fd5b50565b611d2181611ce1565b611d2181611ce6565b611d2181611cf656fea265627a7a72305820e9c0ec388852236a4133a053ca3a0ae459181e592f2ae323eed933ce6fa88fcd6c6578706572696d656e74616cf50037";