feat: add foreign key constraints and metrics for blockchain node

This commit is contained in:
oib
2025-09-28 06:04:30 +02:00
parent c1926136fb
commit fb60505cdf
189 changed files with 15678 additions and 158 deletions

View File

@ -0,0 +1,25 @@
{
"name": "@aitbc/aitbc-sdk",
"version": "0.1.0",
"description": "AITBC JavaScript SDK for coordinator receipts",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.json",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"cross-fetch": "^4.0.0"
},
"devDependencies": {
"@types/node": "^20.11.30",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
},
"keywords": ["aitbc", "sdk", "receipts"],
"author": "AITBC Team",
"license": "MIT"
}

View File

@ -0,0 +1,23 @@
import { describe, expect, it } from "vitest";
import { AitbcClient } from "./client";
const createClient = () =>
new AitbcClient({
baseUrl: "https://api.example.com",
apiKey: "test-key",
fetchImpl: async (input: RequestInfo | URL, init?: RequestInit) =>
new Response(JSON.stringify({ job_id: "job", candidates: [] }), {
status: 200,
headers: { "Content-Type": "application/json" },
}),
});
describe("AitbcClient", () => {
it("sends match requests", async () => {
const client = createClient();
const response = await client.match({ jobId: "job" });
expect(response.jobId).toBe("job");
expect(response.candidates).toEqual([]);
});
});

View File

@ -0,0 +1,138 @@
import type {
ClientOptions,
MatchRequest,
MatchResponse,
HealthResponse,
MetricsResponse,
WalletSignRequest,
WalletSignResponse,
RequestOptions,
} from "./types";
const DEFAULT_HEADERS = {
"Content-Type": "application/json",
Accept: "application/json",
};
export class AitbcClient {
private readonly baseUrl: string;
private readonly apiKey?: string;
private readonly basicAuth?: ClientOptions["basicAuth"];
private readonly fetchImpl: typeof fetch;
constructor(options: ClientOptions) {
this.baseUrl = options.baseUrl.replace(/\/$/, "");
this.apiKey = options.apiKey;
this.basicAuth = options.basicAuth;
this.fetchImpl = options.fetchImpl ?? fetch;
}
async match(payload: MatchRequest, options?: RequestOptions): Promise<MatchResponse> {
const raw = await this.request<any>("POST", "/v1/match", {
...options,
body: JSON.stringify({
job_id: payload.jobId,
requirements: payload.requirements ?? {},
hints: payload.hints ?? {},
top_k: payload.topK ?? 1,
}),
});
return {
jobId: raw.job_id,
candidates: (raw.candidates ?? []).map((candidate: any) => ({
minerId: candidate.miner_id,
addr: candidate.addr,
proto: candidate.proto,
score: candidate.score,
explain: candidate.explain,
etaMs: candidate.eta_ms,
price: candidate.price,
})),
};
}
async health(options?: RequestOptions): Promise<HealthResponse> {
const raw = await this.request<any>("GET", "/v1/health", options);
return {
status: raw.status,
db: raw.db,
redis: raw.redis,
minersOnline: raw.miners_online,
dbError: raw.db_error ?? null,
redisError: raw.redis_error ?? null,
};
}
async metrics(options?: RequestOptions): Promise<MetricsResponse> {
const response = await this.rawRequest("GET", "/metrics", options);
const raw = await response.text();
return { raw };
}
async sign(request: WalletSignRequest, options?: RequestOptions): Promise<WalletSignResponse> {
return this.request<WalletSignResponse>("POST", `/v1/wallets/${encodeURIComponent(request.walletId)}/sign`, {
...options,
body: JSON.stringify({
password: request.password,
message_base64: request.messageBase64,
}),
});
}
private async request<T>(method: string, path: string, options: RequestOptions = {}): Promise<T> {
const response = await this.rawRequest(method, path, options);
const text = await response.text();
if (!response.ok) {
throw new Error(`AITBC request failed (${response.status}): ${text || response.statusText}`);
}
return text ? (JSON.parse(text) as T) : ({} as T);
}
private async rawRequest(method: string, path: string, options: RequestOptions = {}): Promise<Response> {
const url = this.buildUrl(path, options.query);
const headers = this.buildHeaders(options.headers);
return this.fetchImpl(url, {
method,
...options,
headers,
});
}
private buildUrl(path: string, query?: RequestOptions["query"]): string {
const url = new URL(`${this.baseUrl}${path}`);
if (query) {
for (const [key, value] of Object.entries(query)) {
if (value !== undefined) {
url.searchParams.set(key, String(value));
}
}
}
return url.toString();
}
private buildHeaders(extra?: HeadersInit): HeadersInit {
const headers: Record<string, string> = { ...DEFAULT_HEADERS };
if (this.apiKey) {
headers["X-Api-Key"] = this.apiKey;
}
if (this.basicAuth) {
const token = btoa(`${this.basicAuth.username}:${this.basicAuth.password}`);
headers["Authorization"] = `Basic ${token}`;
}
if (extra) {
if (extra instanceof Headers) {
extra.forEach((value, key) => {
headers[key] = value;
});
} else if (Array.isArray(extra)) {
for (const [key, value] of extra) {
headers[key] = value;
}
} else {
Object.assign(headers, extra as Record<string, string>);
}
}
return headers;
}
}

View File

@ -0,0 +1,59 @@
export interface MatchRequest {
jobId: string;
requirements?: Record<string, unknown>;
hints?: Record<string, unknown>;
topK?: number;
}
export interface MatchCandidate {
minerId: string;
addr: string;
proto: string;
score: number;
explain?: string;
etaMs?: number;
price?: number;
}
export interface MatchResponse {
jobId: string;
candidates: MatchCandidate[];
}
export interface HealthResponse {
status: "ok" | "degraded";
db: boolean;
redis: boolean;
minersOnline: number;
dbError?: string | null;
redisError?: string | null;
}
export interface MetricsResponse {
raw: string;
}
export interface WalletSignRequest {
walletId: string;
password: string;
messageBase64: string;
}
export interface WalletSignResponse {
walletId: string;
signatureBase64: string;
}
export interface ClientOptions {
baseUrl: string;
apiKey?: string;
basicAuth?: {
username: string;
password: string;
};
fetchImpl?: typeof fetch;
}
export interface RequestOptions extends RequestInit {
query?: Record<string, string | number | boolean | undefined>;
}

View File

@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "Node",
"declaration": true,
"declarationDir": "dist",
"outDir": "dist",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*.ts"],
"exclude": ["dist", "node_modules"]
}

View File

@ -2,6 +2,7 @@
from .receipts import (
CoordinatorReceiptClient,
ReceiptPage,
ReceiptVerification,
SignatureValidation,
verify_receipt,
@ -10,6 +11,7 @@ from .receipts import (
__all__ = [
"CoordinatorReceiptClient",
"ReceiptPage",
"ReceiptVerification",
"SignatureValidation",
"verify_receipt",

View File

@ -1,7 +1,8 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Dict, Iterable, List, Optional
import time
from dataclasses import dataclass, field
from typing import Any, Dict, Iterable, Iterator, List, Optional
import httpx
import base64
@ -14,6 +15,7 @@ class SignatureValidation:
key_id: str
valid: bool
algorithm: str = "Ed25519"
reason: Optional[str] = None
@dataclass
@ -28,12 +30,58 @@ class ReceiptVerification:
return False
return all(att.valid for att in self.coordinator_attestations)
def failure_reasons(self) -> List[str]:
reasons: List[str] = []
if not self.miner_signature.valid:
key_part = self.miner_signature.key_id or "unknown"
reasons.append(f"miner_signature_invalid:{key_part}")
for att in self.coordinator_attestations:
if not att.valid:
key_part = att.key_id or "unknown"
reasons.append(f"coordinator_attestation_invalid:{key_part}")
return reasons
@dataclass
class ReceiptFailure:
receipt_id: str
reasons: List[str]
verification: ReceiptVerification
@dataclass
class ReceiptStatus:
job_id: str
total: int
verified_count: int
failed: List[ReceiptVerification] = field(default_factory=list)
latest_verified: Optional[ReceiptVerification] = None
failure_reasons: Dict[str, int] = field(default_factory=dict)
failures: List[ReceiptFailure] = field(default_factory=list)
@property
def all_verified(self) -> bool:
return self.total > 0 and self.verified_count == self.total
@property
def has_failures(self) -> bool:
return bool(self.failures)
class CoordinatorReceiptClient:
def __init__(self, base_url: str, api_key: str, timeout: float = 10.0) -> None:
def __init__(
self,
base_url: str,
api_key: str,
timeout: float = 10.0,
max_retries: int = 3,
backoff_seconds: float = 0.5,
) -> None:
self.base_url = base_url.rstrip("/")
self.api_key = api_key
self.timeout = timeout
self.max_retries = max_retries
self.backoff_seconds = backoff_seconds
def _client(self) -> httpx.Client:
return httpx.Client(
@ -43,28 +91,139 @@ class CoordinatorReceiptClient:
)
def fetch_latest(self, job_id: str) -> Optional[Dict[str, Any]]:
with self._client() as client:
resp = client.get(f"/v1/jobs/{job_id}/receipt")
if resp.status_code == 404:
return None
resp.raise_for_status()
return resp.json()
resp = self._request("GET", f"/v1/jobs/{job_id}/receipt", allow_404=True)
if resp is None:
return None
return resp.json()
def fetch_history(self, job_id: str) -> List[Dict[str, Any]]:
with self._client() as client:
resp = client.get(f"/v1/jobs/{job_id}/receipts")
resp.raise_for_status()
data = resp.json()
if isinstance(data, dict) and isinstance(data.get("items"), list):
return data["items"]
raise ValueError("unexpected receipt history response shape")
return list(self.iter_receipts(job_id=job_id))
def iter_receipts(self, job_id: str, page_size: int = 100) -> Iterator[Dict[str, Any]]:
cursor: Optional[str] = None
while True:
page = self.fetch_receipts_page(job_id=job_id, cursor=cursor, limit=page_size)
for item in page.items:
yield item
if not page.next_cursor:
break
cursor = page.next_cursor
def fetch_receipts_page(
self,
*,
job_id: str,
cursor: Optional[str] = None,
limit: Optional[int] = 100,
) -> "ReceiptPage":
params: Dict[str, Any] = {}
if cursor:
params["cursor"] = cursor
if limit is not None:
params["limit"] = limit
response = self._request("GET", f"/v1/jobs/{job_id}/receipts", params=params)
payload = response.json()
if isinstance(payload, list):
items = payload
next_cursor: Optional[str] = None
raw: Dict[str, Any] = {"items": items}
else:
items = list(payload.get("items") or [])
next_cursor = payload.get("next_cursor") or payload.get("next") or payload.get("cursor")
raw = payload
return ReceiptPage(items=items, next_cursor=next_cursor, raw=raw)
def summarize_receipts(self, job_id: str, page_size: int = 100) -> "ReceiptStatus":
receipts = list(self.iter_receipts(job_id=job_id, page_size=page_size))
if not receipts:
return ReceiptStatus(job_id=job_id, total=0, verified_count=0, failed=[], latest_verified=None)
verifications = verify_receipts(receipts)
verified = [v for v in verifications if v.verified]
failed = [v for v in verifications if not v.verified]
failures: List[ReceiptFailure] = []
reason_counts: Dict[str, int] = {}
for verification in failed:
reasons = verification.failure_reasons()
receipt_id = str(
verification.receipt.get("receipt_id")
or verification.receipt.get("id")
or verification.receipt.get("uuid")
or ""
)
for reason in reasons:
reason_counts[reason] = reason_counts.get(reason, 0) + 1
failures.append(ReceiptFailure(receipt_id=receipt_id, reasons=reasons, verification=verification))
latest_verified = verified[-1] if verified else None
return ReceiptStatus(
job_id=job_id,
total=len(verifications),
verified_count=len(verified),
failed=failed,
latest_verified=latest_verified,
failure_reasons=reason_counts,
failures=failures,
)
def _request(
self,
method: str,
url: str,
*,
params: Optional[Dict[str, Any]] = None,
allow_404: bool = False,
) -> Optional[httpx.Response]:
attempt = 0
while True:
try:
with self._client() as client:
response = client.request(method=method, url=url, params=params)
except httpx.HTTPError:
if attempt >= self.max_retries:
raise
attempt += 1
time.sleep(self.backoff_seconds * (2 ** (attempt - 1)))
continue
if response.status_code == 404 and allow_404:
return None
if response.status_code in {429} or response.status_code >= 500:
if attempt >= self.max_retries:
response.raise_for_status()
else:
attempt += 1
time.sleep(self.backoff_seconds * (2 ** (attempt - 1)))
continue
response.raise_for_status()
return response
@dataclass
class ReceiptPage:
items: List[Dict[str, Any]]
next_cursor: Optional[str] = None
raw: Dict[str, Any] = field(default_factory=dict)
def _verify_signature(payload: Dict[str, Any], signature: Dict[str, Any]) -> SignatureValidation:
key_id = signature.get("key_id", "")
verifier = ReceiptVerifier(_decode_key(key_id))
valid = verifier.verify(payload, signature)
return SignatureValidation(key_id=key_id, valid=valid)
try:
valid = verifier.verify(payload, signature)
reason: Optional[str] = None if valid else "signature mismatch"
except Exception as exc: # pragma: no cover - verifier could raise on malformed payloads
valid = False
reason = str(exc) or "signature verification error"
algorithm = signature.get("algorithm") or "Ed25519"
return SignatureValidation(key_id=key_id, valid=valid, algorithm=algorithm, reason=reason)
def verify_receipt(receipt: Dict[str, Any]) -> ReceiptVerification:

View File

@ -4,12 +4,16 @@ from dataclasses import dataclass
from typing import Dict, List, Optional
import pytest
import httpx
from nacl.signing import SigningKey
from aitbc_crypto.signing import ReceiptSigner
from aitbc_sdk.receipts import (
CoordinatorReceiptClient,
ReceiptFailure,
ReceiptPage,
ReceiptStatus,
ReceiptVerification,
verify_receipt,
verify_receipts,
@ -53,6 +57,8 @@ def test_verify_receipt_success(sample_payload: Dict[str, object]) -> None:
assert isinstance(result, ReceiptVerification)
assert result.miner_signature.valid is True
assert result.verified is True
assert result.failure_reasons() == []
assert result.miner_signature.reason is None
def test_verify_receipt_failure(sample_payload: Dict[str, object]) -> None:
@ -63,6 +69,8 @@ def test_verify_receipt_failure(sample_payload: Dict[str, object]) -> None:
result = verify_receipt(receipt)
assert result.miner_signature.valid is False
assert result.verified is False
assert result.failure_reasons() == [f"miner_signature_invalid:{result.miner_signature.key_id}"]
assert result.miner_signature.reason == "signature mismatch"
def test_verify_receipts_batch(sample_payload: Dict[str, object]) -> None:
@ -84,33 +92,20 @@ class _DummyResponse:
def raise_for_status(self) -> None:
if self.status_code >= 400:
raise Exception(f"HTTP {self.status_code}")
class _DummyClient:
def __init__(self, responses: List[_DummyResponse]):
self._responses = responses
def get(self, url: str, *args, **kwargs) -> _DummyResponse:
if not self._responses:
raise AssertionError("no more responses configured")
return self._responses.pop(0)
def __enter__(self) -> "_DummyClient":
return self
def __exit__(self, exc_type, exc, tb) -> None:
pass
raise httpx.HTTPStatusError(
f"HTTP {self.status_code}", request=None, response=httpx.Response(self.status_code)
)
def test_coordinator_receipt_client_latest(monkeypatch, sample_payload: Dict[str, object]) -> None:
signing_key = SigningKey.generate()
receipt = _sign_receipt(sample_payload, signing_key)
def _mock_client(self) -> _DummyClient:
return _DummyClient([_DummyResponse(200, receipt)])
def _mock_request(self, method, url, params=None, allow_404=False):
assert method == "GET"
return _DummyResponse(200, receipt)
monkeypatch.setattr(CoordinatorReceiptClient, "_client", _mock_client)
monkeypatch.setattr(CoordinatorReceiptClient, "_request", _mock_request)
client = CoordinatorReceiptClient("https://coordinator", "api")
fetched = client.fetch_latest("job-123")
@ -121,10 +116,11 @@ def test_coordinator_receipt_client_history(monkeypatch, sample_payload: Dict[st
signing_key = SigningKey.generate()
receipts = [_sign_receipt(sample_payload, signing_key)]
def _mock_client(self) -> _DummyClient:
return _DummyClient([_DummyResponse(200, {"items": receipts})])
def _mock_request(self, method, url, params=None, allow_404=False):
assert method == "GET"
return _DummyResponse(200, {"items": receipts})
monkeypatch.setattr(CoordinatorReceiptClient, "_client", _mock_client)
monkeypatch.setattr(CoordinatorReceiptClient, "_request", _mock_request)
client = CoordinatorReceiptClient("https://coordinator", "api")
history = client.fetch_history("job-123")
@ -132,10 +128,153 @@ def test_coordinator_receipt_client_history(monkeypatch, sample_payload: Dict[st
def test_coordinator_receipt_client_latest_404(monkeypatch) -> None:
def _mock_client(self) -> _DummyClient:
return _DummyClient([_DummyResponse(404, {})])
def _mock_request(self, method, url, params=None, allow_404=False):
assert allow_404 is True
return None
monkeypatch.setattr(CoordinatorReceiptClient, "_client", _mock_client)
monkeypatch.setattr(CoordinatorReceiptClient, "_request", _mock_request)
client = CoordinatorReceiptClient("https://coordinator", "api")
assert client.fetch_latest("job-missing") is None
def test_fetch_receipts_page_list(monkeypatch, sample_payload: Dict[str, object]) -> None:
items = [_sign_receipt(sample_payload, SigningKey.generate())]
def _mock_request(self, method, url, params=None, allow_404=False):
return _DummyResponse(200, items)
monkeypatch.setattr(CoordinatorReceiptClient, "_request", _mock_request)
client = CoordinatorReceiptClient("https://coordinator", "api")
page = client.fetch_receipts_page(job_id="job-1")
assert isinstance(page, ReceiptPage)
assert page.items == items
assert page.next_cursor is None
def test_fetch_receipts_page_dict_with_cursor(monkeypatch, sample_payload: Dict[str, object]) -> None:
signing_key = SigningKey.generate()
receipts = [_sign_receipt(sample_payload, signing_key)]
responses = [
_DummyResponse(200, {"items": receipts, "next_cursor": "cursor-1"}),
_DummyResponse(200, {"items": receipts, "next": None}),
]
def _mock_request(self, method, url, params=None, allow_404=False):
assert method == "GET"
return responses.pop(0)
monkeypatch.setattr(CoordinatorReceiptClient, "_request", _mock_request)
client = CoordinatorReceiptClient("https://coordinator", "api")
first_page = client.fetch_receipts_page(job_id="job-1")
assert first_page.next_cursor == "cursor-1"
second_page = client.fetch_receipts_page(job_id="job-1", cursor=first_page.next_cursor)
assert second_page.next_cursor is None
def test_iter_receipts_handles_pagination(monkeypatch, sample_payload: Dict[str, object]) -> None:
signing_key = SigningKey.generate()
receipt_a = _sign_receipt(sample_payload, signing_key)
receipt_b = _sign_receipt(sample_payload, signing_key)
responses = [
_DummyResponse(200, {"items": [receipt_a], "next_cursor": "cursor-2"}),
_DummyResponse(200, {"items": [receipt_b]}),
]
def _mock_request(self, method, url, params=None, allow_404=False):
return responses.pop(0)
monkeypatch.setattr(CoordinatorReceiptClient, "_request", _mock_request)
client = CoordinatorReceiptClient("https://coordinator", "api")
collected = list(client.iter_receipts("job-123", page_size=1))
assert collected == [receipt_a, receipt_b]
def test_request_retries_on_transient(monkeypatch, sample_payload: Dict[str, object]) -> None:
responses: List[object] = [
httpx.ReadTimeout("timeout"),
_DummyResponse(429, {}),
_DummyResponse(200, {}),
]
class _RetryClient:
def __init__(self, shared: List[object]):
self._shared = shared
def request(self, method: str, url: str, params=None):
obj = self._shared.pop(0)
if isinstance(obj, Exception):
raise obj
return obj
def __enter__(self) -> "_RetryClient":
return self
def __exit__(self, exc_type, exc, tb) -> None:
pass
def _mock_client(self):
return _RetryClient(responses)
monkeypatch.setattr(CoordinatorReceiptClient, "_client", _mock_client)
monkeypatch.setattr("aitbc_sdk.receipts.time.sleep", lambda *_args: None)
client = CoordinatorReceiptClient("https://coordinator", "api", max_retries=3)
response = client._request("GET", "/v1/jobs/job-1/receipts")
assert isinstance(response, _DummyResponse)
assert response.status_code == 200
def test_summarize_receipts_all_verified(monkeypatch, sample_payload: Dict[str, object]) -> None:
signing_key = SigningKey.generate()
receipts = [_sign_receipt(sample_payload, signing_key) for _ in range(2)]
def _fake_iter(self, job_id: str, page_size: int = 100):
yield from receipts
monkeypatch.setattr(CoordinatorReceiptClient, "iter_receipts", _fake_iter)
client = CoordinatorReceiptClient("https://coordinator", "api")
status = client.summarize_receipts("job-verified")
assert isinstance(status, ReceiptStatus)
assert status.total == 2
assert status.verified_count == 2
assert status.all_verified is True
assert status.has_failures is False
assert status.failure_reasons == {}
assert status.failures == []
assert isinstance(status.latest_verified, ReceiptVerification)
def test_summarize_receipts_with_failures(monkeypatch, sample_payload: Dict[str, object]) -> None:
signing_key = SigningKey.generate()
good = _sign_receipt(sample_payload, signing_key)
bad = dict(good)
bad["metadata"] = {"job_payload": {"task": "tampered"}}
receipts = [good, bad]
def _fake_iter(self, job_id: str, page_size: int = 100):
yield from receipts
monkeypatch.setattr(CoordinatorReceiptClient, "iter_receipts", _fake_iter)
client = CoordinatorReceiptClient("https://coordinator", "api")
status = client.summarize_receipts("job-mixed")
assert status.total == 2
assert status.verified_count == 1
assert status.all_verified is False
assert status.has_failures is True
assert status.failure_reasons # not empty
assert status.failure_reasons[next(iter(status.failure_reasons))] == 1
assert len(status.failures) == 1
failure = status.failures[0]
assert isinstance(failure, ReceiptFailure)
assert failure.reasons
assert failure.verification.miner_signature.valid is False

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,236 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "AccessControl",
"sourceName": "@openzeppelin/contracts/access/AccessControl.sol",
"abi": [
{
"inputs": [],
"name": "AccessControlBadConfirmation",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "bytes32",
"name": "neededRole",
"type": "bytes32"
}
],
"name": "AccessControlUnauthorizedAccount",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "grantRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "callerConfirmation",
"type": "address"
}
],
"name": "renounceRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "revokeRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,204 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IAccessControl",
"sourceName": "@openzeppelin/contracts/access/IAccessControl.sol",
"abi": [
{
"inputs": [],
"name": "AccessControlBadConfirmation",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "bytes32",
"name": "neededRole",
"type": "bytes32"
}
],
"name": "AccessControlUnauthorizedAccount",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "grantRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "callerConfirmation",
"type": "address"
}
],
"name": "renounceRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "revokeRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,113 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IERC1155Errors",
"sourceName": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ERC1155InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC1155InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idsLength",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "valuesLength",
"type": "uint256"
}
],
"name": "ERC1155InvalidArrayLength",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "ERC1155InvalidOperator",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC1155InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC1155InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "ERC1155MissingApprovalForAll",
"type": "error"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,97 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IERC20Errors",
"sourceName": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,114 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IERC721Errors",
"sourceName": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "ERC721IncorrectOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ERC721InsufficientApproval",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC721InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "ERC721InvalidOperator",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "ERC721InvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC721InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC721InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ERC721NonexistentToken",
"type": "error"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,319 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "ERC20",
"sourceName": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"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": "value",
"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": [],
"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": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,194 @@
{
"_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": "value",
"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": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,233 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IERC20Metadata",
"sourceName": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.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": "value",
"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": [],
"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": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Context",
"sourceName": "@openzeppelin/contracts/utils/Context.sol",
"abi": [],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Panic",
"sourceName": "@openzeppelin/contracts/utils/Panic.sol",
"abi": [],
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fec73f632edd47d0e7ae9933b51e8f4da78eb465818c4263bebf6623ab05aff164736f6c63430008180033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fec73f632edd47d0e7ae9933b51e8f4da78eb465818c4263bebf6623ab05aff164736f6c63430008180033",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,37 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Strings",
"sourceName": "@openzeppelin/contracts/utils/Strings.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "length",
"type": "uint256"
}
],
"name": "StringsInsufficientHexLength",
"type": "error"
},
{
"inputs": [],
"name": "StringsInvalidAddressFormat",
"type": "error"
},
{
"inputs": [],
"name": "StringsInvalidChar",
"type": "error"
}
],
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d3fa6b95cf4f76e64227a9b2373ccb228efd9715fd7983e0646867999cceb9fb64736f6c63430008180033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d3fa6b95cf4f76e64227a9b2373ccb228efd9715fd7983e0646867999cceb9fb64736f6c63430008180033",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,38 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "ECDSA",
"sourceName": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol",
"abi": [
{
"inputs": [],
"name": "ECDSAInvalidSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "length",
"type": "uint256"
}
],
"name": "ECDSAInvalidSignatureLength",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "ECDSAInvalidSignatureS",
"type": "error"
}
],
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a02ae933cd95f2ee943a9a3e5cbf4c6b7a6f7cc463d2cb58fac8fce23a0ba09464736f6c63430008180033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a02ae933cd95f2ee943a9a3e5cbf4c6b7a6f7cc463d2cb58fac8fce23a0ba09464736f6c63430008180033",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "MessageHashUtils",
"sourceName": "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol",
"abi": [],
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004768bd881d67da99e00ad73ad4392265131c4d4610e2df195f48d6d1cddc06164736f6c63430008180033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122004768bd881d67da99e00ad73ad4392265131c4d4610e2df195f48d6d1cddc06164736f6c63430008180033",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,30 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "ERC165",
"sourceName": "@openzeppelin/contracts/utils/introspection/ERC165.sol",
"abi": [
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,30 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IERC165",
"sourceName": "@openzeppelin/contracts/utils/introspection/IERC165.sol",
"abi": [
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Math",
"sourceName": "@openzeppelin/contracts/utils/math/Math.sol",
"abi": [],
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a7690e42315e6899c9737c1a5db38b11240b326a07950b4befbf4ae90b02e56464736f6c63430008180033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a7690e42315e6899c9737c1a5db38b11240b326a07950b4befbf4ae90b02e56464736f6c63430008180033",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,65 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "SafeCast",
"sourceName": "@openzeppelin/contracts/utils/math/SafeCast.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint8",
"name": "bits",
"type": "uint8"
},
{
"internalType": "int256",
"name": "value",
"type": "int256"
}
],
"name": "SafeCastOverflowedIntDowncast",
"type": "error"
},
{
"inputs": [
{
"internalType": "int256",
"name": "value",
"type": "int256"
}
],
"name": "SafeCastOverflowedIntToUint",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "bits",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SafeCastOverflowedUintDowncast",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SafeCastOverflowedUintToInt",
"type": "error"
}
],
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201c97bba8d553a67561101942b2a9afa3628667de55efed8df898d3aab783793c64736f6c63430008180033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201c97bba8d553a67561101942b2a9afa3628667de55efed8df898d3aab783793c64736f6c63430008180033",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/294516b4613c993159fa474ac6e49583.json"
}

View File

@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "SignedMath",
"sourceName": "@openzeppelin/contracts/utils/math/SignedMath.sol",
"abi": [],
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220680917e17f715636462292a9029e0058e294bcd5d4d4fc83a420501ebb37147664736f6c63430008180033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220680917e17f715636462292a9029e0058e294bcd5d4d4fc83a420501ebb37147664736f6c63430008180033",
"linkReferences": {},
"deployedLinkReferences": {}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/294516b4613c993159fa474ac6e49583.json"
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/294516b4613c993159fa474ac6e49583.json"
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,686 @@
{
"_format": "hh-sol-cache-2",
"files": {
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/contracts/AIToken.sol": {
"lastModificationDate": 1758948750896,
"contentHash": "9da3e499c2dda7c4cfdc56c633b86873",
"sourceName": "contracts/AIToken.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"@openzeppelin/contracts/token/ERC20/ERC20.sol",
"@openzeppelin/contracts/access/AccessControl.sol",
"@openzeppelin/contracts/utils/cryptography/ECDSA.sol",
"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"
],
"versionPragmas": [
"^0.8.24"
],
"artifacts": [
"AIToken"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/access/AccessControl.sol": {
"lastModificationDate": 1758948616475,
"contentHash": "d0e2c05f09a3aea7cd299bbd4a435ee2",
"sourceName": "@openzeppelin/contracts/access/AccessControl.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"./IAccessControl.sol",
"../utils/Context.sol",
"../utils/introspection/ERC165.sol"
],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"AccessControl"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol": {
"lastModificationDate": 1758948616511,
"contentHash": "59dfce11284f2636db261df9b6a18f81",
"sourceName": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"./IERC20.sol",
"./extensions/IERC20Metadata.sol",
"../../utils/Context.sol",
"../../interfaces/draft-IERC6093.sol"
],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"ERC20"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol": {
"lastModificationDate": 1758948616491,
"contentHash": "81de029d56aa803972be03c5d277cb6c",
"sourceName": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"ECDSA"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": {
"lastModificationDate": 1758948616595,
"contentHash": "260f3968eefa3bbd30520cff5384cd93",
"sourceName": "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"../Strings.sol"
],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"MessageHashUtils"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/Context.sol": {
"lastModificationDate": 1758948616483,
"contentHash": "67bfbc07588eb8683b3fd8f6f909563e",
"sourceName": "@openzeppelin/contracts/utils/Context.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"Context"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"lastModificationDate": 1758948616511,
"contentHash": "0906d06dca25210d4696dcef6dad2909",
"sourceName": "@openzeppelin/contracts/utils/introspection/ERC165.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"./IERC165.sol"
],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"ERC165"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/access/IAccessControl.sol": {
"lastModificationDate": 1758948616567,
"contentHash": "def1e8f7b6cac577cf2600655bf3bdf8",
"sourceName": "@openzeppelin/contracts/access/IAccessControl.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
">=0.8.4"
],
"artifacts": [
"IAccessControl"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"lastModificationDate": 1758948616575,
"contentHash": "7074c93b1ea0a122063f26ddd1db1032",
"sourceName": "@openzeppelin/contracts/utils/introspection/IERC165.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
">=0.4.16"
],
"artifacts": [
"IERC165"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": {
"lastModificationDate": 1758948616491,
"contentHash": "5041977bbe908de2e6ed0270447f79ad",
"sourceName": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
">=0.8.4"
],
"artifacts": [
"IERC1155Errors",
"IERC20Errors",
"IERC721Errors"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": {
"lastModificationDate": 1758948616579,
"contentHash": "9261adf6457863de3e9892f51317ec89",
"sourceName": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
">=0.4.16"
],
"artifacts": [
"IERC20"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": {
"lastModificationDate": 1758948616579,
"contentHash": "513778b30d2750f5d2b9b19bbcf748a5",
"sourceName": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"../IERC20.sol"
],
"versionPragmas": [
">=0.6.2"
],
"artifacts": [
"IERC20Metadata"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/Strings.sol": {
"lastModificationDate": 1758948616623,
"contentHash": "d8f70caf0e0c77dc908176ed44812fb7",
"sourceName": "@openzeppelin/contracts/utils/Strings.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"./math/Math.sol",
"./math/SafeCast.sol",
"./math/SignedMath.sol"
],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"Strings"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/math/SafeCast.sol": {
"lastModificationDate": 1758948616611,
"contentHash": "2adca1150f58fc6f3d1f0a0f22ee7cca",
"sourceName": "@openzeppelin/contracts/utils/math/SafeCast.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"SafeCast"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/math/Math.sol": {
"lastModificationDate": 1758948616595,
"contentHash": "5ec781e33d3a9ac91ffdc83d94420412",
"sourceName": "@openzeppelin/contracts/utils/math/Math.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"../Panic.sol",
"./SafeCast.sol"
],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"Math"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol": {
"lastModificationDate": 1758948616619,
"contentHash": "ae3528afb8bdb0a7dcfba5b115ee8074",
"sourceName": "@openzeppelin/contracts/utils/math/SignedMath.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"./SafeCast.sol"
],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"SignedMath"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/node_modules/@openzeppelin/contracts/utils/Panic.sol": {
"lastModificationDate": 1758948616603,
"contentHash": "2133dc13536b4a6a98131e431fac59e1",
"sourceName": "@openzeppelin/contracts/utils/Panic.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [],
"versionPragmas": [
"^0.8.20"
],
"artifacts": [
"Panic"
]
},
"/home/oib/windsurf/aitbc/packages/solidity/aitbc-token/contracts/AITokenRegistry.sol": {
"lastModificationDate": 1758946778726,
"contentHash": "5e787829fa19b0a69c958e431fea5757",
"sourceName": "contracts/AITokenRegistry.sol",
"solcConfig": {
"version": "0.8.24",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
],
"": [
"ast"
]
}
}
}
},
"imports": [
"@openzeppelin/contracts/access/AccessControl.sol"
],
"versionPragmas": [
"^0.8.24"
],
"artifacts": [
"AITokenRegistry"
]
}
}
}

View File

@ -0,0 +1,61 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
/// @title AIToken
/// @notice ERC20 token that mints units for providers based on attested compute receipts
contract AIToken is ERC20, AccessControl {
using ECDSA for bytes32;
using MessageHashUtils for bytes32;
bytes32 public constant COORDINATOR_ROLE = keccak256("COORDINATOR_ROLE");
bytes32 public constant ATTESTOR_ROLE = keccak256("ATTESTOR_ROLE");
/// @notice Tracks consumed receipt hashes to prevent replay
mapping(bytes32 => bool) public consumedReceipts;
event ReceiptConsumed(bytes32 indexed receiptHash, address indexed provider, uint256 units, address indexed attestor);
constructor(address admin) ERC20("AIToken", "AIT") {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
/// @notice Mint tokens for a provider when coordinator submits a valid attested receipt
/// @param provider Address of the compute provider receiving minted tokens
/// @param units Amount of tokens to mint
/// @param receiptHash Unique hash representing the off-chain receipt
/// @param signature Coordinator-attested signature authorizing the mint
function mintWithReceipt(
address provider,
uint256 units,
bytes32 receiptHash,
bytes calldata signature
) external onlyRole(COORDINATOR_ROLE) {
require(provider != address(0), "invalid provider");
require(units > 0, "invalid units");
require(!consumedReceipts[receiptHash], "receipt already consumed");
bytes32 digest = _mintDigest(provider, units, receiptHash);
address attestor = digest.recover(signature);
require(hasRole(ATTESTOR_ROLE, attestor), "invalid attestor signature");
consumedReceipts[receiptHash] = true;
_mint(provider, units);
emit ReceiptConsumed(receiptHash, provider, units, attestor);
}
/// @notice Helper to compute the signed digest required for minting
function mintDigest(address provider, uint256 units, bytes32 receiptHash) external view returns (bytes32) {
return _mintDigest(provider, units, receiptHash);
}
function _mintDigest(address provider, uint256 units, bytes32 receiptHash) internal view returns (bytes32) {
bytes32 structHash = keccak256(abi.encode(block.chainid, address(this), provider, units, receiptHash));
return structHash.toEthSignedMessageHash();
}
}

View File

@ -0,0 +1,46 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
/// @title AITokenRegistry
/// @notice Tracks permitted providers and staking requirements for AIToken minting
contract AITokenRegistry is AccessControl {
bytes32 public constant COORDINATOR_ROLE = keccak256("COORDINATOR_ROLE");
struct ProviderInfo {
bool active;
uint256 collateral;
}
mapping(address => ProviderInfo) public providers;
event ProviderRegistered(address indexed provider, uint256 collateral);
event ProviderUpdated(address indexed provider, bool active, uint256 collateral);
constructor(address admin) {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
function registerProvider(address provider, uint256 collateral) external onlyRole(COORDINATOR_ROLE) {
require(provider != address(0), "invalid provider");
require(!providers[provider].active, "already registered");
providers[provider] = ProviderInfo({active: true, collateral: collateral});
emit ProviderRegistered(provider, collateral);
}
function updateProvider(
address provider,
bool active,
uint256 collateral
) external onlyRole(COORDINATOR_ROLE) {
require(provider != address(0), "invalid provider");
require(providers[provider].active || active, "provider not registered");
providers[provider] = ProviderInfo({active: active, collateral: collateral});
emit ProviderUpdated(provider, active, collateral);
}
function providerInfo(address provider) external view returns (ProviderInfo memory) {
return providers[provider];
}
}

View File

@ -0,0 +1,28 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
const config: HardhatUserConfig = {
solidity: {
version: "0.8.24",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
paths: {
sources: "contracts",
tests: "test",
cache: "cache",
artifacts: "artifacts"
},
networks: {
hardhat: {},
localhost: {
url: "http://127.0.0.1:8545"
}
}
};
export default config;

View File

@ -0,0 +1,27 @@
{
"name": "@aitbc/aitbc-token",
"version": "0.1.0",
"private": true,
"description": "AITBC Solidity contracts for attested receipt-based minting",
"scripts": {
"build": "hardhat compile",
"test": "hardhat test",
"lint": "prettier --check \"contracts/**/*.sol\" \"scripts/**/*.ts\" \"test/**/*.ts\"",
"format": "prettier --write \"contracts/**/*.sol\" \"scripts/**/*.ts\" \"test/**/*.ts\"",
"deploy": "hardhat run scripts/deploy.ts --network localhost"
},
"devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.10",
"@types/node": "^20.11.30",
"chai": "^4.4.1",
"hardhat": "^2.22.1",
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.9.2"
},
"dependencies": {
"@openzeppelin/contracts": "^5.0.2"
}
}

View File

@ -0,0 +1,58 @@
import { ethers } from "hardhat";
import { AIToken__factory } from "../typechain-types";
function envOrDefault(name: string, fallback?: string): string | undefined {
const value = process.env[name]?.trim();
return value && value.length > 0 ? value : fallback;
}
async function main() {
const [deployer, coordinatorCandidate] = await ethers.getSigners();
console.log("Deploying AIToken using admin:", deployer.address);
const contractFactory: AIToken__factory = await ethers.getContractFactory("AIToken");
const token = await contractFactory.deploy(deployer.address);
await token.waitForDeployment();
const contractAddress = await token.getAddress();
console.log("AIToken deployed to:", contractAddress);
const coordinatorRole = await token.COORDINATOR_ROLE();
const attestorRole = await token.ATTESTOR_ROLE();
const coordinatorAddress = envOrDefault("COORDINATOR_ADDRESS", coordinatorCandidate.address);
if (!coordinatorAddress) {
throw new Error(
"COORDINATOR_ADDRESS not provided and could not infer fallback signer address"
);
}
if (!(await token.hasRole(coordinatorRole, coordinatorAddress))) {
console.log("Granting coordinator role to", coordinatorAddress);
const tx = await token.grantRole(coordinatorRole, coordinatorAddress);
await tx.wait();
} else {
console.log("Coordinator role already assigned to", coordinatorAddress);
}
const attestorAddress = envOrDefault("ATTESTOR_ADDRESS");
if (attestorAddress) {
if (!(await token.hasRole(attestorRole, attestorAddress))) {
console.log("Granting attestor role to", attestorAddress);
const tx = await token.grantRole(attestorRole, attestorAddress);
await tx.wait();
} else {
console.log("Attestor role already assigned to", attestorAddress);
}
} else {
console.log("No ATTESTOR_ADDRESS provided; skipping attestor role grant.");
}
console.log("Deployment complete. Export AITOKEN_ADDRESS=", contractAddress);
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});

View File

@ -0,0 +1,66 @@
import { ethers } from "hardhat";
import { AIToken__factory } from "../typechain-types";
type HexString = `0x${string}`;
type EnvValue = string & {}
function requireEnv(name: string): EnvValue {
const value = process.env[name]?.trim();
if (!value) {
throw new Error(`Missing required environment variable ${name}`);
}
return value as EnvValue;
}
function parseUnits(value: string): bigint {
try {
if (value.startsWith("0x") || value.startsWith("0X")) {
return BigInt(value);
}
return BigInt(value);
} catch (error) {
throw new Error(`UNITS must be a BigInt-compatible value, received ${value}`);
}
}
function assertHex(value: string, name: string): HexString {
if (!value.startsWith("0x") && !value.startsWith("0X")) {
throw new Error(`${name} must be 0x-prefixed`);
}
return value.toLowerCase() as HexString;
}
async function main() {
const contractAddress = assertHex(requireEnv("AITOKEN_ADDRESS"), "AITOKEN_ADDRESS");
const providerAddress = requireEnv("PROVIDER_ADDRESS");
const units = parseUnits(requireEnv("UNITS"));
const receiptHash = assertHex(requireEnv("RECEIPT_HASH"), "RECEIPT_HASH");
const signature = assertHex(requireEnv("ATTESTOR_SIGNATURE"), "ATTESTOR_SIGNATURE");
const coordinatorIndex = Number(process.env.COORDINATOR_SIGNER_INDEX ?? "1");
const signers = await ethers.getSigners();
const coordinator = signers[coordinatorIndex];
if (!coordinator) {
throw new Error(
`COORDINATOR_SIGNER_INDEX=${coordinatorIndex} does not correspond to an available signer`
);
}
console.log("Using coordinator signer:", coordinator.address);
console.log("Minting receipt for provider:", providerAddress);
console.log("Units:", units.toString());
const token = AIToken__factory.connect(contractAddress, coordinator);
const tx = await token.mintWithReceipt(providerAddress, units, receiptHash, signature);
const receipt = await tx.wait();
console.log("Mint transaction hash:", receipt?.hash ?? tx.hash);
const balance = await token.balanceOf(providerAddress);
console.log("Provider balance:", balance.toString());
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});

View File

@ -0,0 +1,103 @@
import { expect } from "chai";
import { ethers } from "hardhat";
import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers";
import type { Signer } from "ethers";
import type { AIToken } from "../typechain-types";
import { AIToken__factory } from "../typechain-types";
async function deployAITokenFixture() {
const [admin, coordinator, attestor, provider, outsider] = await ethers.getSigners();
const factory = new AIToken__factory(admin);
const token = await factory.deploy(admin.address);
await token.waitForDeployment();
const coordinatorRole = await token.COORDINATOR_ROLE();
const attestorRole = await token.ATTESTOR_ROLE();
await token.grantRole(coordinatorRole, coordinator.address);
await token.grantRole(attestorRole, attestor.address);
return { token, admin, coordinator, attestor, provider, outsider };
}
async function buildSignature(
token: AIToken,
attestor: Signer,
provider: string,
units: bigint,
receiptHash: string
) {
const chainId = (await ethers.provider.getNetwork()).chainId;
const contractAddress = await token.getAddress();
const abiCoder = ethers.AbiCoder.defaultAbiCoder();
const encoded = abiCoder.encode(
["uint256", "address", "address", "uint256", "bytes32"],
[chainId, contractAddress, provider, units, receiptHash]
);
const structHash = ethers.keccak256(encoded);
return attestor.signMessage(ethers.getBytes(structHash));
}
describe("AIToken", function () {
it("mints tokens when presented a valid attestor signature", async function () {
const { token, coordinator, attestor, provider } = await loadFixture(deployAITokenFixture);
const units = 100n;
const receiptHash = ethers.keccak256(ethers.toUtf8Bytes("receipt-1"));
const signature = await buildSignature(token, attestor, provider.address, units, receiptHash);
await expect(
token
.connect(coordinator)
.mintWithReceipt(provider.address, units, receiptHash, signature)
)
.to.emit(token, "ReceiptConsumed")
.withArgs(receiptHash, provider.address, units, attestor.address);
expect(await token.balanceOf(provider.address)).to.equal(units);
expect(await token.consumedReceipts(receiptHash)).to.equal(true);
});
it("rejects reuse of a consumed receipt hash", async function () {
const { token, coordinator, attestor, provider } = await loadFixture(deployAITokenFixture);
const units = 50n;
const receiptHash = ethers.keccak256(ethers.toUtf8Bytes("receipt-2"));
const signature = await buildSignature(token, attestor, provider.address, units, receiptHash);
await token
.connect(coordinator)
.mintWithReceipt(provider.address, units, receiptHash, signature);
await expect(
token
.connect(coordinator)
.mintWithReceipt(provider.address, units, receiptHash, signature)
).to.be.revertedWith("receipt already consumed");
});
it("rejects signatures from non-attestors", async function () {
const { token, coordinator, attestor, provider, outsider } = await loadFixture(
deployAITokenFixture
);
const units = 25n;
const receiptHash = ethers.keccak256(ethers.toUtf8Bytes("receipt-3"));
const signature = await buildSignature(
token,
outsider,
provider.address,
units,
receiptHash
);
await expect(
token
.connect(coordinator)
.mintWithReceipt(provider.address, units, receiptHash, signature)
).to.be.revertedWith("invalid attestor signature");
});
});

View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "es2020",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"outDir": "dist",
"types": ["node", "mocha", "hardhat", "@nomicfoundation/hardhat-chai-matchers"],
"resolveJsonModule": true,
"moduleResolution": "node"
},
"include": ["hardhat.config.ts", "scripts", "test", "typechain-types"],
"exclude": ["dist"]
}

View File

@ -0,0 +1,324 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../../../common";
export interface AccessControlInterface extends Interface {
getFunction(
nameOrSignature:
| "DEFAULT_ADMIN_ROLE"
| "getRoleAdmin"
| "grantRole"
| "hasRole"
| "renounceRole"
| "revokeRole"
| "supportsInterface"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic: "RoleAdminChanged" | "RoleGranted" | "RoleRevoked"
): EventFragment;
encodeFunctionData(
functionFragment: "DEFAULT_ADMIN_ROLE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getRoleAdmin",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "grantRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "hasRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "renounceRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "revokeRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
decodeFunctionResult(
functionFragment: "DEFAULT_ADMIN_ROLE",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getRoleAdmin",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "renounceRole",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
}
export namespace RoleAdminChangedEvent {
export type InputTuple = [
role: BytesLike,
previousAdminRole: BytesLike,
newAdminRole: BytesLike
];
export type OutputTuple = [
role: string,
previousAdminRole: string,
newAdminRole: string
];
export interface OutputObject {
role: string;
previousAdminRole: string;
newAdminRole: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleGrantedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleRevokedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface AccessControl extends BaseContract {
connect(runner?: ContractRunner | null): AccessControl;
waitForDeployment(): Promise<this>;
interface: AccessControlInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">;
getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
grantRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
hasRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
renounceRole: TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
revokeRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
supportsInterface: TypedContractMethod<
[interfaceId: BytesLike],
[boolean],
"view"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "DEFAULT_ADMIN_ROLE"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "getRoleAdmin"
): TypedContractMethod<[role: BytesLike], [string], "view">;
getFunction(
nameOrSignature: "grantRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "hasRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
getFunction(
nameOrSignature: "renounceRole"
): TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "revokeRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "supportsInterface"
): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
getEvent(
key: "RoleAdminChanged"
): TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
getEvent(
key: "RoleGranted"
): TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
getEvent(
key: "RoleRevoked"
): TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
filters: {
"RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
RoleAdminChanged: TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
"RoleGranted(bytes32,address,address)": TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
RoleGranted: TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
"RoleRevoked(bytes32,address,address)": TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
RoleRevoked: TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
};
}

View File

@ -0,0 +1,292 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../../../common";
export interface IAccessControlInterface extends Interface {
getFunction(
nameOrSignature:
| "getRoleAdmin"
| "grantRole"
| "hasRole"
| "renounceRole"
| "revokeRole"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic: "RoleAdminChanged" | "RoleGranted" | "RoleRevoked"
): EventFragment;
encodeFunctionData(
functionFragment: "getRoleAdmin",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "grantRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "hasRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "renounceRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "revokeRole",
values: [BytesLike, AddressLike]
): string;
decodeFunctionResult(
functionFragment: "getRoleAdmin",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "renounceRole",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
}
export namespace RoleAdminChangedEvent {
export type InputTuple = [
role: BytesLike,
previousAdminRole: BytesLike,
newAdminRole: BytesLike
];
export type OutputTuple = [
role: string,
previousAdminRole: string,
newAdminRole: string
];
export interface OutputObject {
role: string;
previousAdminRole: string;
newAdminRole: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleGrantedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleRevokedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface IAccessControl extends BaseContract {
connect(runner?: ContractRunner | null): IAccessControl;
waitForDeployment(): Promise<this>;
interface: IAccessControlInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
grantRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
hasRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
renounceRole: TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
revokeRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "getRoleAdmin"
): TypedContractMethod<[role: BytesLike], [string], "view">;
getFunction(
nameOrSignature: "grantRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "hasRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
getFunction(
nameOrSignature: "renounceRole"
): TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "revokeRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getEvent(
key: "RoleAdminChanged"
): TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
getEvent(
key: "RoleGranted"
): TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
getEvent(
key: "RoleRevoked"
): TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
filters: {
"RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
RoleAdminChanged: TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
"RoleGranted(bytes32,address,address)": TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
RoleGranted: TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
"RoleRevoked(bytes32,address,address)": TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
RoleRevoked: TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
};
}

View File

@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { AccessControl } from "./AccessControl";
export type { IAccessControl } from "./IAccessControl";

View File

@ -0,0 +1,11 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as access from "./access";
export type { access };
import type * as interfaces from "./interfaces";
export type { interfaces };
import type * as token from "./token";
export type { token };
import type * as utils from "./utils";
export type { utils };

View File

@ -0,0 +1,69 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
FunctionFragment,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
} from "../../../../common";
export interface IERC1155ErrorsInterface extends Interface {}
export interface IERC1155Errors extends BaseContract {
connect(runner?: ContractRunner | null): IERC1155Errors;
waitForDeployment(): Promise<this>;
interface: IERC1155ErrorsInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
filters: {};
}

View File

@ -0,0 +1,69 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
FunctionFragment,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
} from "../../../../common";
export interface IERC20ErrorsInterface extends Interface {}
export interface IERC20Errors extends BaseContract {
connect(runner?: ContractRunner | null): IERC20Errors;
waitForDeployment(): Promise<this>;
interface: IERC20ErrorsInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
filters: {};
}

View File

@ -0,0 +1,69 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
FunctionFragment,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
} from "../../../../common";
export interface IERC721ErrorsInterface extends Interface {}
export interface IERC721Errors extends BaseContract {
connect(runner?: ContractRunner | null): IERC721Errors;
waitForDeployment(): Promise<this>;
interface: IERC721ErrorsInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
filters: {};
}

View File

@ -0,0 +1,6 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { IERC1155Errors } from "./IERC1155Errors";
export type { IERC20Errors } from "./IERC20Errors";
export type { IERC721Errors } from "./IERC721Errors";

View File

@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as draftIerc6093Sol from "./draft-IERC6093.sol";
export type { draftIerc6093Sol };

View File

@ -0,0 +1,286 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../../../../common";
export interface ERC20Interface extends Interface {
getFunction(
nameOrSignature:
| "allowance"
| "approve"
| "balanceOf"
| "decimals"
| "name"
| "symbol"
| "totalSupply"
| "transfer"
| "transferFrom"
): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment;
encodeFunctionData(
functionFragment: "allowance",
values: [AddressLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "balanceOf",
values: [AddressLike]
): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [AddressLike, AddressLike, BigNumberish]
): string;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
}
export namespace ApprovalEvent {
export type InputTuple = [
owner: AddressLike,
spender: AddressLike,
value: BigNumberish
];
export type OutputTuple = [owner: string, spender: string, value: bigint];
export interface OutputObject {
owner: string;
spender: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace TransferEvent {
export type InputTuple = [
from: AddressLike,
to: AddressLike,
value: BigNumberish
];
export type OutputTuple = [from: string, to: string, value: bigint];
export interface OutputObject {
from: string;
to: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface ERC20 extends BaseContract {
connect(runner?: ContractRunner | null): ERC20;
waitForDeployment(): Promise<this>;
interface: ERC20Interface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
allowance: TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
approve: TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">;
decimals: TypedContractMethod<[], [bigint], "view">;
name: TypedContractMethod<[], [string], "view">;
symbol: TypedContractMethod<[], [string], "view">;
totalSupply: TypedContractMethod<[], [bigint], "view">;
transfer: TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
transferFrom: TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "allowance"
): TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
getFunction(
nameOrSignature: "approve"
): TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "balanceOf"
): TypedContractMethod<[account: AddressLike], [bigint], "view">;
getFunction(
nameOrSignature: "decimals"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "name"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "symbol"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "totalSupply"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "transfer"
): TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "transferFrom"
): TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getEvent(
key: "Approval"
): TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
getEvent(
key: "Transfer"
): TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
filters: {
"Approval(address,address,uint256)": TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
Approval: TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
"Transfer(address,address,uint256)": TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
Transfer: TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
};
}

View File

@ -0,0 +1,262 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../../../../common";
export interface IERC20Interface extends Interface {
getFunction(
nameOrSignature:
| "allowance"
| "approve"
| "balanceOf"
| "totalSupply"
| "transfer"
| "transferFrom"
): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment;
encodeFunctionData(
functionFragment: "allowance",
values: [AddressLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "balanceOf",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [AddressLike, AddressLike, BigNumberish]
): string;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
}
export namespace ApprovalEvent {
export type InputTuple = [
owner: AddressLike,
spender: AddressLike,
value: BigNumberish
];
export type OutputTuple = [owner: string, spender: string, value: bigint];
export interface OutputObject {
owner: string;
spender: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace TransferEvent {
export type InputTuple = [
from: AddressLike,
to: AddressLike,
value: BigNumberish
];
export type OutputTuple = [from: string, to: string, value: bigint];
export interface OutputObject {
from: string;
to: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface IERC20 extends BaseContract {
connect(runner?: ContractRunner | null): IERC20;
waitForDeployment(): Promise<this>;
interface: IERC20Interface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
allowance: TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
approve: TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">;
totalSupply: TypedContractMethod<[], [bigint], "view">;
transfer: TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
transferFrom: TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "allowance"
): TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
getFunction(
nameOrSignature: "approve"
): TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "balanceOf"
): TypedContractMethod<[account: AddressLike], [bigint], "view">;
getFunction(
nameOrSignature: "totalSupply"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "transfer"
): TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "transferFrom"
): TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getEvent(
key: "Approval"
): TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
getEvent(
key: "Transfer"
): TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
filters: {
"Approval(address,address,uint256)": TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
Approval: TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
"Transfer(address,address,uint256)": TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
Transfer: TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
};
}

View File

@ -0,0 +1,286 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../../../../../common";
export interface IERC20MetadataInterface extends Interface {
getFunction(
nameOrSignature:
| "allowance"
| "approve"
| "balanceOf"
| "decimals"
| "name"
| "symbol"
| "totalSupply"
| "transfer"
| "transferFrom"
): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment;
encodeFunctionData(
functionFragment: "allowance",
values: [AddressLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "balanceOf",
values: [AddressLike]
): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [AddressLike, AddressLike, BigNumberish]
): string;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
}
export namespace ApprovalEvent {
export type InputTuple = [
owner: AddressLike,
spender: AddressLike,
value: BigNumberish
];
export type OutputTuple = [owner: string, spender: string, value: bigint];
export interface OutputObject {
owner: string;
spender: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace TransferEvent {
export type InputTuple = [
from: AddressLike,
to: AddressLike,
value: BigNumberish
];
export type OutputTuple = [from: string, to: string, value: bigint];
export interface OutputObject {
from: string;
to: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface IERC20Metadata extends BaseContract {
connect(runner?: ContractRunner | null): IERC20Metadata;
waitForDeployment(): Promise<this>;
interface: IERC20MetadataInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
allowance: TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
approve: TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">;
decimals: TypedContractMethod<[], [bigint], "view">;
name: TypedContractMethod<[], [string], "view">;
symbol: TypedContractMethod<[], [string], "view">;
totalSupply: TypedContractMethod<[], [bigint], "view">;
transfer: TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
transferFrom: TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "allowance"
): TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
getFunction(
nameOrSignature: "approve"
): TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "balanceOf"
): TypedContractMethod<[account: AddressLike], [bigint], "view">;
getFunction(
nameOrSignature: "decimals"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "name"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "symbol"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "totalSupply"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "transfer"
): TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "transferFrom"
): TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getEvent(
key: "Approval"
): TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
getEvent(
key: "Transfer"
): TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
filters: {
"Approval(address,address,uint256)": TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
Approval: TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
"Transfer(address,address,uint256)": TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
Transfer: TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
};
}

View File

@ -0,0 +1,4 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { IERC20Metadata } from "./IERC20Metadata";

View File

@ -0,0 +1,7 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as extensions from "./extensions";
export type { extensions };
export type { ERC20 } from "./ERC20";
export type { IERC20 } from "./IERC20";

View File

@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as erc20 from "./ERC20";
export type { erc20 };

View File

@ -0,0 +1,69 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
FunctionFragment,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
} from "../../../common";
export interface StringsInterface extends Interface {}
export interface Strings extends BaseContract {
connect(runner?: ContractRunner | null): Strings;
waitForDeployment(): Promise<this>;
interface: StringsInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
filters: {};
}

View File

@ -0,0 +1,69 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
FunctionFragment,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
} from "../../../../common";
export interface ECDSAInterface extends Interface {}
export interface ECDSA extends BaseContract {
connect(runner?: ContractRunner | null): ECDSA;
waitForDeployment(): Promise<this>;
interface: ECDSAInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
filters: {};
}

View File

@ -0,0 +1,4 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { ECDSA } from "./ECDSA";

View File

@ -0,0 +1,10 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as cryptography from "./cryptography";
export type { cryptography };
import type * as introspection from "./introspection";
export type { introspection };
import type * as math from "./math";
export type { math };
export type { Strings } from "./Strings";

View File

@ -0,0 +1,94 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BytesLike,
FunctionFragment,
Result,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
TypedContractMethod,
} from "../../../../common";
export interface ERC165Interface extends Interface {
getFunction(nameOrSignature: "supportsInterface"): FunctionFragment;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
}
export interface ERC165 extends BaseContract {
connect(runner?: ContractRunner | null): ERC165;
waitForDeployment(): Promise<this>;
interface: ERC165Interface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
supportsInterface: TypedContractMethod<
[interfaceId: BytesLike],
[boolean],
"view"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "supportsInterface"
): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
filters: {};
}

View File

@ -0,0 +1,94 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BytesLike,
FunctionFragment,
Result,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
TypedContractMethod,
} from "../../../../common";
export interface IERC165Interface extends Interface {
getFunction(nameOrSignature: "supportsInterface"): FunctionFragment;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
}
export interface IERC165 extends BaseContract {
connect(runner?: ContractRunner | null): IERC165;
waitForDeployment(): Promise<this>;
interface: IERC165Interface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
supportsInterface: TypedContractMethod<
[interfaceId: BytesLike],
[boolean],
"view"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "supportsInterface"
): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
filters: {};
}

View File

@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { ERC165 } from "./ERC165";
export type { IERC165 } from "./IERC165";

View File

@ -0,0 +1,69 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
FunctionFragment,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
} from "../../../../common";
export interface SafeCastInterface extends Interface {}
export interface SafeCast extends BaseContract {
connect(runner?: ContractRunner | null): SafeCast;
waitForDeployment(): Promise<this>;
interface: SafeCastInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
filters: {};
}

View File

@ -0,0 +1,4 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { SafeCast } from "./SafeCast";

View File

@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as contracts from "./contracts";
export type { contracts };

View File

@ -0,0 +1,131 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
FunctionFragment,
Typed,
EventFragment,
ContractTransaction,
ContractTransactionResponse,
DeferredTopicFilter,
EventLog,
TransactionRequest,
LogDescription,
} from "ethers";
export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent>
extends DeferredTopicFilter {}
export interface TypedContractEvent<
InputTuple extends Array<any> = any,
OutputTuple extends Array<any> = any,
OutputObject = any
> {
(...args: Partial<InputTuple>): TypedDeferredTopicFilter<
TypedContractEvent<InputTuple, OutputTuple, OutputObject>
>;
name: string;
fragment: EventFragment;
getFragment(...args: Partial<InputTuple>): EventFragment;
}
type __TypechainAOutputTuple<T> = T extends TypedContractEvent<
infer _U,
infer W
>
? W
: never;
type __TypechainOutputObject<T> = T extends TypedContractEvent<
infer _U,
infer _W,
infer V
>
? V
: never;
export interface TypedEventLog<TCEvent extends TypedContractEvent>
extends Omit<EventLog, "args"> {
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
}
export interface TypedLogDescription<TCEvent extends TypedContractEvent>
extends Omit<LogDescription, "args"> {
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
}
export type TypedListener<TCEvent extends TypedContractEvent> = (
...listenerArg: [
...__TypechainAOutputTuple<TCEvent>,
TypedEventLog<TCEvent>,
...undefined[]
]
) => void;
export type MinEthersFactory<C, ARGS> = {
deploy(...a: ARGS[]): Promise<C>;
};
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<
infer C,
any
>
? C
: never;
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any>
? Parameters<F["deploy"]>
: never;
export type StateMutability = "nonpayable" | "payable" | "view";
export type BaseOverrides = Omit<TransactionRequest, "to" | "data">;
export type NonPayableOverrides = Omit<
BaseOverrides,
"value" | "blockTag" | "enableCcipRead"
>;
export type PayableOverrides = Omit<
BaseOverrides,
"blockTag" | "enableCcipRead"
>;
export type ViewOverrides = Omit<TransactionRequest, "to" | "data">;
export type Overrides<S extends StateMutability> = S extends "nonpayable"
? NonPayableOverrides
: S extends "payable"
? PayableOverrides
: ViewOverrides;
export type PostfixOverrides<A extends Array<any>, S extends StateMutability> =
| A
| [...A, Overrides<S>];
export type ContractMethodArgs<
A extends Array<any>,
S extends StateMutability
> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>;
export type DefaultReturnType<R> = R extends Array<any> ? R[0] : R;
// export interface ContractMethod<A extends Array<any> = Array<any>, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> {
export interface TypedContractMethod<
A extends Array<any> = Array<any>,
R = any,
S extends StateMutability = "payable"
> {
(...args: ContractMethodArgs<A, S>): S extends "view"
? Promise<DefaultReturnType<R>>
: Promise<ContractTransactionResponse>;
name: string;
fragment: FunctionFragment;
getFragment(...args: ContractMethodArgs<A, S>): FunctionFragment;
populateTransaction(
...args: ContractMethodArgs<A, S>
): Promise<ContractTransaction>;
staticCall(
...args: ContractMethodArgs<A, "view">
): Promise<DefaultReturnType<R>>;
send(...args: ContractMethodArgs<A, S>): Promise<ContractTransactionResponse>;
estimateGas(...args: ContractMethodArgs<A, S>): Promise<bigint>;
staticCallResult(...args: ContractMethodArgs<A, "view">): Promise<R>;
}

View File

@ -0,0 +1,667 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../common";
export interface AITokenInterface extends Interface {
getFunction(
nameOrSignature:
| "ATTESTOR_ROLE"
| "COORDINATOR_ROLE"
| "DEFAULT_ADMIN_ROLE"
| "allowance"
| "approve"
| "balanceOf"
| "consumedReceipts"
| "decimals"
| "getRoleAdmin"
| "grantRole"
| "hasRole"
| "mintDigest"
| "mintWithReceipt"
| "name"
| "renounceRole"
| "revokeRole"
| "supportsInterface"
| "symbol"
| "totalSupply"
| "transfer"
| "transferFrom"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic:
| "Approval"
| "ReceiptConsumed"
| "RoleAdminChanged"
| "RoleGranted"
| "RoleRevoked"
| "Transfer"
): EventFragment;
encodeFunctionData(
functionFragment: "ATTESTOR_ROLE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "COORDINATOR_ROLE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "DEFAULT_ADMIN_ROLE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "allowance",
values: [AddressLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "balanceOf",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "consumedReceipts",
values: [BytesLike]
): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(
functionFragment: "getRoleAdmin",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "grantRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "hasRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "mintDigest",
values: [AddressLike, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "mintWithReceipt",
values: [AddressLike, BigNumberish, BytesLike, BytesLike]
): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(
functionFragment: "renounceRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "revokeRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [AddressLike, AddressLike, BigNumberish]
): string;
decodeFunctionResult(
functionFragment: "ATTESTOR_ROLE",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "COORDINATOR_ROLE",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "DEFAULT_ADMIN_ROLE",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "consumedReceipts",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "getRoleAdmin",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "mintDigest", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "mintWithReceipt",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "renounceRole",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
}
export namespace ApprovalEvent {
export type InputTuple = [
owner: AddressLike,
spender: AddressLike,
value: BigNumberish
];
export type OutputTuple = [owner: string, spender: string, value: bigint];
export interface OutputObject {
owner: string;
spender: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace ReceiptConsumedEvent {
export type InputTuple = [
receiptHash: BytesLike,
provider: AddressLike,
units: BigNumberish,
attestor: AddressLike
];
export type OutputTuple = [
receiptHash: string,
provider: string,
units: bigint,
attestor: string
];
export interface OutputObject {
receiptHash: string;
provider: string;
units: bigint;
attestor: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleAdminChangedEvent {
export type InputTuple = [
role: BytesLike,
previousAdminRole: BytesLike,
newAdminRole: BytesLike
];
export type OutputTuple = [
role: string,
previousAdminRole: string,
newAdminRole: string
];
export interface OutputObject {
role: string;
previousAdminRole: string;
newAdminRole: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleGrantedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleRevokedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace TransferEvent {
export type InputTuple = [
from: AddressLike,
to: AddressLike,
value: BigNumberish
];
export type OutputTuple = [from: string, to: string, value: bigint];
export interface OutputObject {
from: string;
to: string;
value: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface AIToken extends BaseContract {
connect(runner?: ContractRunner | null): AIToken;
waitForDeployment(): Promise<this>;
interface: AITokenInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
ATTESTOR_ROLE: TypedContractMethod<[], [string], "view">;
COORDINATOR_ROLE: TypedContractMethod<[], [string], "view">;
DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">;
allowance: TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
approve: TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">;
consumedReceipts: TypedContractMethod<[arg0: BytesLike], [boolean], "view">;
decimals: TypedContractMethod<[], [bigint], "view">;
getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
grantRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
hasRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
mintDigest: TypedContractMethod<
[provider: AddressLike, units: BigNumberish, receiptHash: BytesLike],
[string],
"view"
>;
mintWithReceipt: TypedContractMethod<
[
provider: AddressLike,
units: BigNumberish,
receiptHash: BytesLike,
signature: BytesLike
],
[void],
"nonpayable"
>;
name: TypedContractMethod<[], [string], "view">;
renounceRole: TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
revokeRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
supportsInterface: TypedContractMethod<
[interfaceId: BytesLike],
[boolean],
"view"
>;
symbol: TypedContractMethod<[], [string], "view">;
totalSupply: TypedContractMethod<[], [bigint], "view">;
transfer: TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
transferFrom: TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "ATTESTOR_ROLE"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "COORDINATOR_ROLE"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "DEFAULT_ADMIN_ROLE"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "allowance"
): TypedContractMethod<
[owner: AddressLike, spender: AddressLike],
[bigint],
"view"
>;
getFunction(
nameOrSignature: "approve"
): TypedContractMethod<
[spender: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "balanceOf"
): TypedContractMethod<[account: AddressLike], [bigint], "view">;
getFunction(
nameOrSignature: "consumedReceipts"
): TypedContractMethod<[arg0: BytesLike], [boolean], "view">;
getFunction(
nameOrSignature: "decimals"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "getRoleAdmin"
): TypedContractMethod<[role: BytesLike], [string], "view">;
getFunction(
nameOrSignature: "grantRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "hasRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
getFunction(
nameOrSignature: "mintDigest"
): TypedContractMethod<
[provider: AddressLike, units: BigNumberish, receiptHash: BytesLike],
[string],
"view"
>;
getFunction(
nameOrSignature: "mintWithReceipt"
): TypedContractMethod<
[
provider: AddressLike,
units: BigNumberish,
receiptHash: BytesLike,
signature: BytesLike
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "name"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "renounceRole"
): TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "revokeRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "supportsInterface"
): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
getFunction(
nameOrSignature: "symbol"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "totalSupply"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "transfer"
): TypedContractMethod<
[to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getFunction(
nameOrSignature: "transferFrom"
): TypedContractMethod<
[from: AddressLike, to: AddressLike, value: BigNumberish],
[boolean],
"nonpayable"
>;
getEvent(
key: "Approval"
): TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
getEvent(
key: "ReceiptConsumed"
): TypedContractEvent<
ReceiptConsumedEvent.InputTuple,
ReceiptConsumedEvent.OutputTuple,
ReceiptConsumedEvent.OutputObject
>;
getEvent(
key: "RoleAdminChanged"
): TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
getEvent(
key: "RoleGranted"
): TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
getEvent(
key: "RoleRevoked"
): TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
getEvent(
key: "Transfer"
): TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
filters: {
"Approval(address,address,uint256)": TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
Approval: TypedContractEvent<
ApprovalEvent.InputTuple,
ApprovalEvent.OutputTuple,
ApprovalEvent.OutputObject
>;
"ReceiptConsumed(bytes32,address,uint256,address)": TypedContractEvent<
ReceiptConsumedEvent.InputTuple,
ReceiptConsumedEvent.OutputTuple,
ReceiptConsumedEvent.OutputObject
>;
ReceiptConsumed: TypedContractEvent<
ReceiptConsumedEvent.InputTuple,
ReceiptConsumedEvent.OutputTuple,
ReceiptConsumedEvent.OutputObject
>;
"RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
RoleAdminChanged: TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
"RoleGranted(bytes32,address,address)": TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
RoleGranted: TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
"RoleRevoked(bytes32,address,address)": TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
RoleRevoked: TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
"Transfer(address,address,uint256)": TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
Transfer: TypedContractEvent<
TransferEvent.InputTuple,
TransferEvent.OutputTuple,
TransferEvent.OutputObject
>;
};
}

View File

@ -0,0 +1,512 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../common";
export declare namespace AITokenRegistry {
export type ProviderInfoStruct = {
active: boolean;
collateral: BigNumberish;
};
export type ProviderInfoStructOutput = [
active: boolean,
collateral: bigint
] & { active: boolean; collateral: bigint };
}
export interface AITokenRegistryInterface extends Interface {
getFunction(
nameOrSignature:
| "COORDINATOR_ROLE"
| "DEFAULT_ADMIN_ROLE"
| "getRoleAdmin"
| "grantRole"
| "hasRole"
| "providerInfo"
| "providers"
| "registerProvider"
| "renounceRole"
| "revokeRole"
| "supportsInterface"
| "updateProvider"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic:
| "ProviderRegistered"
| "ProviderUpdated"
| "RoleAdminChanged"
| "RoleGranted"
| "RoleRevoked"
): EventFragment;
encodeFunctionData(
functionFragment: "COORDINATOR_ROLE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "DEFAULT_ADMIN_ROLE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getRoleAdmin",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "grantRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "hasRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "providerInfo",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "providers",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "registerProvider",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "renounceRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "revokeRole",
values: [BytesLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "updateProvider",
values: [AddressLike, boolean, BigNumberish]
): string;
decodeFunctionResult(
functionFragment: "COORDINATOR_ROLE",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "DEFAULT_ADMIN_ROLE",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getRoleAdmin",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "providerInfo",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "providers", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "registerProvider",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "renounceRole",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "updateProvider",
data: BytesLike
): Result;
}
export namespace ProviderRegisteredEvent {
export type InputTuple = [provider: AddressLike, collateral: BigNumberish];
export type OutputTuple = [provider: string, collateral: bigint];
export interface OutputObject {
provider: string;
collateral: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace ProviderUpdatedEvent {
export type InputTuple = [
provider: AddressLike,
active: boolean,
collateral: BigNumberish
];
export type OutputTuple = [
provider: string,
active: boolean,
collateral: bigint
];
export interface OutputObject {
provider: string;
active: boolean;
collateral: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleAdminChangedEvent {
export type InputTuple = [
role: BytesLike,
previousAdminRole: BytesLike,
newAdminRole: BytesLike
];
export type OutputTuple = [
role: string,
previousAdminRole: string,
newAdminRole: string
];
export interface OutputObject {
role: string;
previousAdminRole: string;
newAdminRole: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleGrantedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace RoleRevokedEvent {
export type InputTuple = [
role: BytesLike,
account: AddressLike,
sender: AddressLike
];
export type OutputTuple = [role: string, account: string, sender: string];
export interface OutputObject {
role: string;
account: string;
sender: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface AITokenRegistry extends BaseContract {
connect(runner?: ContractRunner | null): AITokenRegistry;
waitForDeployment(): Promise<this>;
interface: AITokenRegistryInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
COORDINATOR_ROLE: TypedContractMethod<[], [string], "view">;
DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">;
getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
grantRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
hasRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
providerInfo: TypedContractMethod<
[provider: AddressLike],
[AITokenRegistry.ProviderInfoStructOutput],
"view"
>;
providers: TypedContractMethod<
[arg0: AddressLike],
[[boolean, bigint] & { active: boolean; collateral: bigint }],
"view"
>;
registerProvider: TypedContractMethod<
[provider: AddressLike, collateral: BigNumberish],
[void],
"nonpayable"
>;
renounceRole: TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
revokeRole: TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
supportsInterface: TypedContractMethod<
[interfaceId: BytesLike],
[boolean],
"view"
>;
updateProvider: TypedContractMethod<
[provider: AddressLike, active: boolean, collateral: BigNumberish],
[void],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "COORDINATOR_ROLE"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "DEFAULT_ADMIN_ROLE"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "getRoleAdmin"
): TypedContractMethod<[role: BytesLike], [string], "view">;
getFunction(
nameOrSignature: "grantRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "hasRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[boolean],
"view"
>;
getFunction(
nameOrSignature: "providerInfo"
): TypedContractMethod<
[provider: AddressLike],
[AITokenRegistry.ProviderInfoStructOutput],
"view"
>;
getFunction(
nameOrSignature: "providers"
): TypedContractMethod<
[arg0: AddressLike],
[[boolean, bigint] & { active: boolean; collateral: bigint }],
"view"
>;
getFunction(
nameOrSignature: "registerProvider"
): TypedContractMethod<
[provider: AddressLike, collateral: BigNumberish],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "renounceRole"
): TypedContractMethod<
[role: BytesLike, callerConfirmation: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "revokeRole"
): TypedContractMethod<
[role: BytesLike, account: AddressLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "supportsInterface"
): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
getFunction(
nameOrSignature: "updateProvider"
): TypedContractMethod<
[provider: AddressLike, active: boolean, collateral: BigNumberish],
[void],
"nonpayable"
>;
getEvent(
key: "ProviderRegistered"
): TypedContractEvent<
ProviderRegisteredEvent.InputTuple,
ProviderRegisteredEvent.OutputTuple,
ProviderRegisteredEvent.OutputObject
>;
getEvent(
key: "ProviderUpdated"
): TypedContractEvent<
ProviderUpdatedEvent.InputTuple,
ProviderUpdatedEvent.OutputTuple,
ProviderUpdatedEvent.OutputObject
>;
getEvent(
key: "RoleAdminChanged"
): TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
getEvent(
key: "RoleGranted"
): TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
getEvent(
key: "RoleRevoked"
): TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
filters: {
"ProviderRegistered(address,uint256)": TypedContractEvent<
ProviderRegisteredEvent.InputTuple,
ProviderRegisteredEvent.OutputTuple,
ProviderRegisteredEvent.OutputObject
>;
ProviderRegistered: TypedContractEvent<
ProviderRegisteredEvent.InputTuple,
ProviderRegisteredEvent.OutputTuple,
ProviderRegisteredEvent.OutputObject
>;
"ProviderUpdated(address,bool,uint256)": TypedContractEvent<
ProviderUpdatedEvent.InputTuple,
ProviderUpdatedEvent.OutputTuple,
ProviderUpdatedEvent.OutputObject
>;
ProviderUpdated: TypedContractEvent<
ProviderUpdatedEvent.InputTuple,
ProviderUpdatedEvent.OutputTuple,
ProviderUpdatedEvent.OutputObject
>;
"RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
RoleAdminChanged: TypedContractEvent<
RoleAdminChangedEvent.InputTuple,
RoleAdminChangedEvent.OutputTuple,
RoleAdminChangedEvent.OutputObject
>;
"RoleGranted(bytes32,address,address)": TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
RoleGranted: TypedContractEvent<
RoleGrantedEvent.InputTuple,
RoleGrantedEvent.OutputTuple,
RoleGrantedEvent.OutputObject
>;
"RoleRevoked(bytes32,address,address)": TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
RoleRevoked: TypedContractEvent<
RoleRevokedEvent.InputTuple,
RoleRevokedEvent.OutputTuple,
RoleRevokedEvent.OutputObject
>;
};
}

View File

@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { AIToken } from "./AIToken";
export type { AITokenRegistry } from "./AITokenRegistry";

View File

@ -0,0 +1,250 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
AccessControl,
AccessControlInterface,
} from "../../../../@openzeppelin/contracts/access/AccessControl";
const _abi = [
{
inputs: [],
name: "AccessControlBadConfirmation",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "account",
type: "address",
},
{
internalType: "bytes32",
name: "neededRole",
type: "bytes32",
},
],
name: "AccessControlUnauthorizedAccount",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
indexed: true,
internalType: "bytes32",
name: "previousAdminRole",
type: "bytes32",
},
{
indexed: true,
internalType: "bytes32",
name: "newAdminRole",
type: "bytes32",
},
],
name: "RoleAdminChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
indexed: true,
internalType: "address",
name: "account",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "RoleGranted",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
indexed: true,
internalType: "address",
name: "account",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "RoleRevoked",
type: "event",
},
{
inputs: [],
name: "DEFAULT_ADMIN_ROLE",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
],
name: "getRoleAdmin",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "grantRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "hasRole",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "callerConfirmation",
type: "address",
},
],
name: "renounceRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "revokeRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes4",
name: "interfaceId",
type: "bytes4",
},
],
name: "supportsInterface",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
] as const;
export class AccessControl__factory {
static readonly abi = _abi;
static createInterface(): AccessControlInterface {
return new Interface(_abi) as AccessControlInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): AccessControl {
return new Contract(address, _abi, runner) as unknown as AccessControl;
}
}

View File

@ -0,0 +1,218 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
IAccessControl,
IAccessControlInterface,
} from "../../../../@openzeppelin/contracts/access/IAccessControl";
const _abi = [
{
inputs: [],
name: "AccessControlBadConfirmation",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "account",
type: "address",
},
{
internalType: "bytes32",
name: "neededRole",
type: "bytes32",
},
],
name: "AccessControlUnauthorizedAccount",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
indexed: true,
internalType: "bytes32",
name: "previousAdminRole",
type: "bytes32",
},
{
indexed: true,
internalType: "bytes32",
name: "newAdminRole",
type: "bytes32",
},
],
name: "RoleAdminChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
indexed: true,
internalType: "address",
name: "account",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "RoleGranted",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
indexed: true,
internalType: "address",
name: "account",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "RoleRevoked",
type: "event",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
],
name: "getRoleAdmin",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "grantRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "hasRole",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "callerConfirmation",
type: "address",
},
],
name: "renounceRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "revokeRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
] as const;
export class IAccessControl__factory {
static readonly abi = _abi;
static createInterface(): IAccessControlInterface {
return new Interface(_abi) as IAccessControlInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): IAccessControl {
return new Contract(address, _abi, runner) as unknown as IAccessControl;
}
}

View File

@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export { AccessControl__factory } from "./AccessControl__factory";
export { IAccessControl__factory } from "./IAccessControl__factory";

View File

@ -0,0 +1,7 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export * as access from "./access";
export * as interfaces from "./interfaces";
export * as token from "./token";
export * as utils from "./utils";

View File

@ -0,0 +1,127 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
IERC1155Errors,
IERC1155ErrorsInterface,
} from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors";
const _abi = [
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
{
internalType: "uint256",
name: "needed",
type: "uint256",
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
],
name: "ERC1155InsufficientBalance",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "approver",
type: "address",
},
],
name: "ERC1155InvalidApprover",
type: "error",
},
{
inputs: [
{
internalType: "uint256",
name: "idsLength",
type: "uint256",
},
{
internalType: "uint256",
name: "valuesLength",
type: "uint256",
},
],
name: "ERC1155InvalidArrayLength",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "operator",
type: "address",
},
],
name: "ERC1155InvalidOperator",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "receiver",
type: "address",
},
],
name: "ERC1155InvalidReceiver",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
],
name: "ERC1155InvalidSender",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "operator",
type: "address",
},
{
internalType: "address",
name: "owner",
type: "address",
},
],
name: "ERC1155MissingApprovalForAll",
type: "error",
},
] as const;
export class IERC1155Errors__factory {
static readonly abi = _abi;
static createInterface(): IERC1155ErrorsInterface {
return new Interface(_abi) as IERC1155ErrorsInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): IERC1155Errors {
return new Contract(address, _abi, runner) as unknown as IERC1155Errors;
}
}

View File

@ -0,0 +1,111 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
IERC20Errors,
IERC20ErrorsInterface,
} from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors";
const _abi = [
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
{
internalType: "uint256",
name: "allowance",
type: "uint256",
},
{
internalType: "uint256",
name: "needed",
type: "uint256",
},
],
name: "ERC20InsufficientAllowance",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
{
internalType: "uint256",
name: "needed",
type: "uint256",
},
],
name: "ERC20InsufficientBalance",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "approver",
type: "address",
},
],
name: "ERC20InvalidApprover",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "receiver",
type: "address",
},
],
name: "ERC20InvalidReceiver",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
],
name: "ERC20InvalidSender",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
],
name: "ERC20InvalidSpender",
type: "error",
},
] as const;
export class IERC20Errors__factory {
static readonly abi = _abi;
static createInterface(): IERC20ErrorsInterface {
return new Interface(_abi) as IERC20ErrorsInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): IERC20Errors {
return new Contract(address, _abi, runner) as unknown as IERC20Errors;
}
}

View File

@ -0,0 +1,128 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
IERC721Errors,
IERC721ErrorsInterface,
} from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors";
const _abi = [
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
{
internalType: "address",
name: "owner",
type: "address",
},
],
name: "ERC721IncorrectOwner",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "operator",
type: "address",
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
],
name: "ERC721InsufficientApproval",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "approver",
type: "address",
},
],
name: "ERC721InvalidApprover",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "operator",
type: "address",
},
],
name: "ERC721InvalidOperator",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "owner",
type: "address",
},
],
name: "ERC721InvalidOwner",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "receiver",
type: "address",
},
],
name: "ERC721InvalidReceiver",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
],
name: "ERC721InvalidSender",
type: "error",
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
],
name: "ERC721NonexistentToken",
type: "error",
},
] as const;
export class IERC721Errors__factory {
static readonly abi = _abi;
static createInterface(): IERC721ErrorsInterface {
return new Interface(_abi) as IERC721ErrorsInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): IERC721Errors {
return new Contract(address, _abi, runner) as unknown as IERC721Errors;
}
}

View File

@ -0,0 +1,6 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export { IERC1155Errors__factory } from "./IERC1155Errors__factory";
export { IERC20Errors__factory } from "./IERC20Errors__factory";
export { IERC721Errors__factory } from "./IERC721Errors__factory";

View File

@ -0,0 +1,4 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export * as draftIerc6093Sol from "./draft-IERC6093.sol";

View File

@ -0,0 +1,330 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
ERC20,
ERC20Interface,
} from "../../../../../@openzeppelin/contracts/token/ERC20/ERC20";
const _abi = [
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
{
internalType: "uint256",
name: "allowance",
type: "uint256",
},
{
internalType: "uint256",
name: "needed",
type: "uint256",
},
],
name: "ERC20InsufficientAllowance",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
{
internalType: "uint256",
name: "needed",
type: "uint256",
},
],
name: "ERC20InsufficientBalance",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "approver",
type: "address",
},
],
name: "ERC20InvalidApprover",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "receiver",
type: "address",
},
],
name: "ERC20InvalidReceiver",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
],
name: "ERC20InvalidSender",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
],
name: "ERC20InvalidSpender",
type: "error",
},
{
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: "value",
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: [],
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: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transfer",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "from",
type: "address",
},
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transferFrom",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
] as const;
export class ERC20__factory {
static readonly abi = _abi;
static createInterface(): ERC20Interface {
return new Interface(_abi) as ERC20Interface;
}
static connect(address: string, runner?: ContractRunner | null): ERC20 {
return new Contract(address, _abi, runner) as unknown as ERC20;
}
}

View File

@ -0,0 +1,205 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
IERC20,
IERC20Interface,
} from "../../../../../@openzeppelin/contracts/token/ERC20/IERC20";
const _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: "value",
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: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transfer",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "from",
type: "address",
},
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transferFrom",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
] as const;
export class IERC20__factory {
static readonly abi = _abi;
static createInterface(): IERC20Interface {
return new Interface(_abi) as IERC20Interface;
}
static connect(address: string, runner?: ContractRunner | null): IERC20 {
return new Contract(address, _abi, runner) as unknown as IERC20;
}
}

View File

@ -0,0 +1,247 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
IERC20Metadata,
IERC20MetadataInterface,
} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata";
const _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: "value",
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: [],
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: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transfer",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "from",
type: "address",
},
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transferFrom",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
] as const;
export class IERC20Metadata__factory {
static readonly abi = _abi;
static createInterface(): IERC20MetadataInterface {
return new Interface(_abi) as IERC20MetadataInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): IERC20Metadata {
return new Contract(address, _abi, runner) as unknown as IERC20Metadata;
}
}

View File

@ -0,0 +1,4 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export { IERC20Metadata__factory } from "./IERC20Metadata__factory";

Some files were not shown because too many files have changed in this diff Show More