@vaimee/my3sec-contracts
Version:
A set of contracts that implements the My3Sec protocol
228 lines (227 loc) • 9.69 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SkillWallet__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
{
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: "uint256",
name: "profileID",
type: "uint256",
},
{
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "getSkill",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "profileID",
type: "uint256",
},
],
name: "getSkillCount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
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: [
{
internalType: "uint256",
name: "profileID",
type: "uint256",
},
{
internalType: "uint256",
name: "skillID",
type: "uint256",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "recordExperience",
outputs: [],
stateMutability: "nonpayable",
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: "address",
name: "newOwner",
type: "address",
},
],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
];
const _bytecode = "0x608060405234801561001057600080fd5b50610833806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a59acb8511610066578063a59acb85146100e8578063b74044bc14610109578063c4d66de814610131578063f2fde38b14610144578063f414c97d1461015757600080fd5b806331962cdc14610098578063715018a6146100ad5780638da5cb5b146100b557806395933f88146100d5575b600080fd5b6100ab6100a63660046106eb565b61016a565b005b6100ab6101bb565b6033546040516001600160a01b0390911681526020015b60405180910390f35b6100ab6100e3366004610714565b6101cf565b6100fb6100f6366004610740565b610235565b6040519081526020016100cc565b61011c610117366004610759565b610253565b604080519283526020830191909152016100cc565b6100ab61013f3660046106eb565b61027a565b6100ab6101523660046106eb565b610392565b6100ab6101653660046106eb565b61040b565b610172610443565b6001600160a01b038116610199576040516348be0eb360e01b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b0392909216919091179055565b6101c3610443565b6101cd600061049d565b565b6065546001600160a01b031633146101fa576040516313bd2e8360e31b815260040160405180910390fd5b60008381526066602052604081209061021382856104ef565b915061022d905084610225858461077b565b84919061050b565b505050505050565b600081815260666020526040812061024c81610520565b9392505050565b6000828152606660205260408120819061026d8185610531565b92509250505b9250929050565b600054610100900460ff161580801561029a5750600054600160ff909116105b806102b45750303b1580156102b4575060005460ff166001145b61031c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561033f576000805461ff0019166101001790555b6103488261040b565b801561038e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61039a610443565b6001600160a01b0381166103ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610313565b6104088161049d565b50565b600054610100900460ff166104325760405162461bcd60e51b81526004016103139061079c565b61043a610540565b6104088161016a565b6033546001600160a01b031633146101cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610313565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008080806104fe868661056f565b9097909650945050505050565b60006105188484846105a9565b949350505050565b600061052b826105c6565b92915050565b60008080806104fe86866105d1565b600054610100900460ff166105675760405162461bcd60e51b81526004016103139061079c565b6101cd6105fc565b600081815260028301602052604081205481908061059e57610591858561062c565b9250600091506102739050565b600192509050610273565b600082815260028401602052604081208290556105188484610638565b600061052b82610644565b600080806105df858561064e565b600081815260029690960160205260409095205494959350505050565b600054610100900460ff166106235760405162461bcd60e51b81526004016103139061079c565b6101cd3361049d565b600061024c838361065a565b600061024c8383610672565b600061052b825490565b600061024c83836106c1565b6000818152600183016020526040812054151561024c565b60008181526001830160205260408120546106b95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561052b565b50600061052b565b60008260000182815481106106d8576106d86107e7565b9060005260206000200154905092915050565b6000602082840312156106fd57600080fd5b81356001600160a01b038116811461024c57600080fd5b60008060006060848603121561072957600080fd5b505081359360208301359350604090920135919050565b60006020828403121561075257600080fd5b5035919050565b6000806040838503121561076c57600080fd5b50508035926020909101359150565b8082018082111561052b57634e487b7160e01b600052601160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220ed0f82d598bb3d4c7cdfc630696ea6fe1b7f7e954afa53048cf62f8771f8f42e64736f6c63430008110033";
const isSuperArgs = (xs) => xs.length > 1;
class SkillWallet__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.SkillWallet__factory = SkillWallet__factory;
SkillWallet__factory.bytecode = _bytecode;
SkillWallet__factory.abi = _abi;