-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgraded to newest hardhat, fixed up dependencies and tests
- Loading branch information
Showing
16 changed files
with
10,579 additions
and
29,571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Provider, Signer } from "ethers"; | ||
import type { DATAv2 } from "./typechain/contracts/DATAv2"; | ||
export declare const abi: ({ | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
inputs: { | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
})[], bytecode: string; | ||
export type { DATAv2 }; | ||
export declare function getTokenAt(address: string, signerOrProvider: Provider | Signer): DATAv2; | ||
export declare function deployToken(signer: Signer): Promise<DATAv2>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deployToken = exports.getTokenAt = exports.bytecode = exports.abi = void 0; | ||
const ethers_1 = require("ethers"); | ||
const dataV2json = __importStar(require("./artifacts/contracts/DATAv2.sol/DATAv2.json")); | ||
exports.abi = dataV2json.abi, exports.bytecode = dataV2json.bytecode; | ||
function getTokenAt(address, signerOrProvider) { | ||
return new ethers_1.Contract(address, exports.abi, signerOrProvider); | ||
} | ||
exports.getTokenAt = getTokenAt; | ||
async function deployToken(signer) { | ||
const factory = new ethers_1.ContractFactory(exports.abi, exports.bytecode, signer); | ||
const contract = await factory.deploy(); | ||
await contract.waitForDeployment(); | ||
return contract; | ||
} | ||
exports.deployToken = deployToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.