@vaimee/my3sec-contracts
Version:
A set of contracts that implements the My3Sec protocol
180 lines (179 loc) • 7.57 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimeWallet__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
{
inputs: [],
name: "ExceededLoggableTime",
type: "error",
},
{
inputs: [],
name: "InitParamsInvalid",
type: "error",
},
{
inputs: [],
name: "NotHub",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint8",
name: "version",
type: "uint8",
},
],
name: "Initialized",
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",
},
{
inputs: [
{
internalType: "address",
name: "hub",
type: "address",
},
],
name: "__HubControllable_init",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "hub",
type: "address",
},
],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
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: "hub",
type: "address",
},
],
name: "setHub",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "profileId",
type: "uint256",
},
{
internalType: "uint256",
name: "time",
type: "uint256",
},
],
name: "spendTimeFor",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
];
const _bytecode = "0x608060405234801561001057600080fd5b50610655806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100b2578063c4d66de8146100d1578063f2fde38b146100e4578063f414c97d146100f757600080fd5b806331962cdc14610082578063581823bd14610097578063715018a6146100aa575b600080fd5b610095610090366004610539565b61010a565b005b6100956100a5366004610569565b61015b565b610095610256565b603354604080516001600160a01b039092168252519081900360200190f35b6100956100df366004610539565b61026a565b6100956100f2366004610539565b610382565b610095610105366004610539565b6103fb565b610112610433565b6001600160a01b038116610139576040516348be0eb360e01b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b03163314610186576040516313bd2e8360e31b815260040160405180910390fd5b6201518081106101a95760405163a4fd7c6b60e01b815260040160405180910390fd5b60006101b8620151804261058b565b6000848152606660205260409020549091508111156101f0576000928352606660209081526040808520929092556067905290912055565b600083815260676020526040902054620151809061020f9084906105ad565b111561022e5760405163a4fd7c6b60e01b815260040160405180910390fd5b6000838152606760205260408120805484929061024c9084906105ad565b9091555050505050565b61025e610433565b610268600061048d565b565b600054610100900460ff161580801561028a5750600054600160ff909116105b806102a45750303b1580156102a4575060005460ff166001145b61030c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561032f576000805461ff0019166101001790555b610338826103fb565b801561037e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61038a610433565b6001600160a01b0381166103ef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610303565b6103f88161048d565b50565b600054610100900460ff166104225760405162461bcd60e51b8152600401610303906105d4565b61042a6104df565b6103f88161010a565b6033546001600160a01b031633146102685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610303565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166105065760405162461bcd60e51b8152600401610303906105d4565b610268600054610100900460ff166105305760405162461bcd60e51b8152600401610303906105d4565b6102683361048d565b60006020828403121561054b57600080fd5b81356001600160a01b038116811461056257600080fd5b9392505050565b6000806040838503121561057c57600080fd5b50508035926020909101359150565b6000826105a857634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156105ce57634e487b7160e01b600052601160045260246000fd5b92915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122020ea110b67ffae398c19dfe59a8d96bf1b97a91c49c320b599e1d598d52df29a64736f6c63430008110033";
const isSuperArgs = (xs) => xs.length > 1;
class TimeWallet__factory extends ethers_1.ContractFactory {
constructor(...args) {
if (isSuperArgs(args)) {
super(...args);
}
else {
super(_abi, _bytecode, args[0]);
}
}
deploy(overrides) {
return super.deploy(overrides || {});
}
getDeployTransaction(overrides) {
return super.getDeployTransaction(overrides || {});
}
attach(address) {
return super.attach(address);
}
connect(signer) {
return super.connect(signer);
}
static createInterface() {
return new ethers_1.utils.Interface(_abi);
}
static connect(address, signerOrProvider) {
return new ethers_1.Contract(address, _abi, signerOrProvider);
}
}
exports.TimeWallet__factory = TimeWallet__factory;
TimeWallet__factory.bytecode = _bytecode;
TimeWallet__factory.abi = _abi;