Skip to content

Commit

Permalink
Merge pull request #190 from OpenZeppelin/plat-3534-upgrade-client-pa…
Browse files Browse the repository at this point in the history
…ckages-to-ethers-v6

Upgrade client packages to ethers v6
  • Loading branch information
tirumerla authored Dec 7, 2023
2 parents 0f8e8cb + da43dba commit 02baf97
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 3,251 deletions.
2,864 changes: 0 additions & 2,864 deletions examples/create-monitor/package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion examples/create-monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.0.0",
"@openzeppelin/defender-sdk": "1.6.0",
"dotenv": "^16.3.1"
}
}
4 changes: 2 additions & 2 deletions examples/ethers-signer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ async function main() {
const sig = await signer.signMessage('0xdead');
console.log(`Signature is ${sig}`);

const sigAddress = ethers.utils.verifyMessage('Funds are safu!', sig);
const sigAddress = ethers.verifyMessage('Funds are safu!', sig);
console.log(`Signature address is ${sigAddress} matching relayer address ${mined.from}`);

const typedSig = await signer._signTypedData(domain, types, value);
console.log(`Typed data signature is ${typedSig}`);

const typedSigAddress = ethers.utils.verifyTypedData(domain, types, value, typedSig);
const typedSigAddress = ethers.verifyTypedData(domain, types, value, typedSig);
console.log(`Typed data signature address is ${typedSigAddress} matching relayer address ${mined.from}`);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ethers-signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"dependencies": {
"@openzeppelin/defender-sdk": "1.6.0",
"dotenv": "^16.3.1",
"ethers": "^5.6.1"
"ethers": "^6.9.0"
}
}
4 changes: 2 additions & 2 deletions examples/simulate-proposal/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('dotenv').config();

const { Defender } = require('@openzeppelin/defender-sdk');
const { utils } = require('ethers');
const { Interface } = require('ethers');

const contractABI = require('./abi/demoflash.json');

Expand Down Expand Up @@ -38,7 +38,7 @@ async function main() {

console.log(`Created proposal (${proposal.proposalId})`);

const contractInterface = new utils.Interface(contractABI);
const contractInterface = new Interface(contractABI);
// encode function data
const data = contractInterface.encodeFunctionData(proposal.functionInterface.name, proposal.functionInputs);

Expand Down
2 changes: 1 addition & 1 deletion examples/simulate-proposal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"dependencies": {
"@openzeppelin/defender-sdk": "1.6.0",
"dotenv": "^16.3.1",
"ethers": "^5.7.2"
"ethers": "^6.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/proposal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@openzeppelin/defender-sdk-base-client": "^1.6.0",
"axios": "^1.4.0",
"ethers": "^5.7.2",
"ethers": "^6.9.0",
"lodash": "^4.17.21"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/proposal/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseApiClient } from '@openzeppelin/defender-sdk-base-client';
import { isArray } from 'lodash';
import { Interface } from 'ethers/lib/utils';
import { Interface } from 'ethers';
import {
ExternalApiCreateProposalRequest as CreateProposalRequest,
PartialContract,
Expand Down
Loading

0 comments on commit 02baf97

Please sign in to comment.