-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from gryphnft/2.0
namespace contract uri
- Loading branch information
Showing
7 changed files
with
93 additions
and
35 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
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,8 @@ | ||
{ | ||
"name": "GRY.PH Namespaces", | ||
"description": "Reserve your collection and profile name on a crosschain NFT marketplace. Get a subdomain at GRY.PH", | ||
"image": "https://gry.ph/images/gryph-8bit-7.png", | ||
"external_link": "https://gry.ph/gns", | ||
"seller_fee_basis_points": 1000, | ||
"fee_recipient": "0x469A288F790998E48C4869360FB60038F4d5fd48" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
//to run this on testnet: | ||
// $ npx hardhat run scripts/blacklist-gns.js | ||
|
||
const hardhat = require('hardhat') | ||
const blacklist = require('../data/blacklist.json') | ||
|
||
async function attach(name, address) { | ||
const Contract = await hardhat.ethers.getContractFactory(name) | ||
return await Contract.attach(address) | ||
} | ||
|
||
async function main() { | ||
const network = hardhat.config.networks[hardhat.config.defaultNetwork] | ||
const provider = new hardhat.ethers.providers.JsonRpcProvider(network.url) | ||
const owner = await attach('GryphNamespaces', network.contracts.namespaces) | ||
|
||
let buffer = [] | ||
for (let i = 0; i < blacklist.length; i++) { | ||
buffer.push(blacklist[i]) | ||
if (buffer.length == 10) { | ||
const gasPrice = (await provider.getGasPrice()).mul(30).toString(); //wei | ||
const GgasPrice = Math.ceil(parseInt(gasPrice) / 1000000000) | ||
const gasLimit = Math.floor(GgasPrice * 21000) | ||
|
||
console.log('Blacklisting', buffer) | ||
|
||
const queue = await owner.blacklist(buffer, { gasPrice, gasLimit }) | ||
const tx = await queue.wait() | ||
buffer = [] | ||
|
||
console.log(tx) | ||
} | ||
} | ||
|
||
if (buffer.length) { | ||
const gasPrice = (await provider.getGasPrice()).mul(30).toString(); //wei | ||
const GgasPrice = Math.ceil(parseInt(gasPrice) / 1000000000) | ||
const gasLimit = Math.floor(GgasPrice * 21000) | ||
|
||
console.log('Blacklisting', buffer) | ||
|
||
const queue = await owner.blacklist(buffer, { gasPrice, gasLimit }) | ||
const tx = await queue.wait() | ||
buffer = [] | ||
|
||
console.log(tx) | ||
} | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main().then(() => process.exit(0)).catch(error => { | ||
console.error(error) | ||
process.exit(1) | ||
}); |
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