Skip to content

Commit

Permalink
feat: create updateAdapter script & update TransformationAdapter depl…
Browse files Browse the repository at this point in the history
…oyment
  • Loading branch information
0xMasayoshi committed Oct 4, 2022
1 parent aaf3bbe commit d758fd6
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 22 deletions.
42 changes: 21 additions & 21 deletions deployments/goerli/TransformationAdapter.json

Large diffs are not rendered by default.

270 changes: 270 additions & 0 deletions deployments/goerli/solcInputs/4cdb95148abdf6f3fe75c6d0b6b1f691.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shoyunft/contracts",
"version": "2.0.4",
"version": "2.0.5",
"description": "ShoyuNFT",
"main": "contracts/Shoyu.sol",
"author": "0xMasayoshi",
Expand Down
25 changes: 25 additions & 0 deletions scripts/updateAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { getNamedAccounts, deployments } = require("hardhat");
const readlineSync = require("readline-sync");

async function main() {
const adapterId = readlineSync.question("Adapter Id: ");
const newAdapterAddress = readlineSync.question("New Adapter Address: ");
const { deployer } = await getNamedAccounts();
const { execute } = deployments;
console.log("Submitting tx...");
const receipt = await execute(
"AdapterRegistry",
{ from: deployer },
"setAdapterAddress",
adapterId,
newAdapterAddress
);
console.log("Executed in tx with hash", receipt.transactionHash);
}

main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});

0 comments on commit d758fd6

Please sign in to comment.