diff --git a/README.md b/README.md index d5eaac0..b427c5a 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ import { EAS } from "@ethereum-attestation-service/eas-sdk"; const eas = new EAS(EASContractAddress); eas.connect(provider); -const data = ethers.utils.formatBytes32String('0x1234'); +const data = ethers.encodeBytes32String('0x1234'); const transaction = await eas.timestamp(data); @@ -226,8 +226,8 @@ import { EAS } from "@ethereum-attestation-service/eas-sdk"; const eas = new EAS(EASContractAddress); eas.connect(provider); -const data1 = ethers.utils.formatBytes32String('0x3e23b395b2bd2d37dd0f6e4148ac6b9e7ed22f2215107958f95cc1489e4e6289'); -const data2 = ethers.utils.formatBytes32String('0x6776de8122c352b4d671003e58ca112aedb99f34c629a1d1fe3b332504e2943a'); +const data1 = ethers.encodeBytes32String('0x3e23b395b2bd2d37dd0f6e4148ac6b9e7ed22f2215107958f95cc1489e4e6289'); +const data2 = ethers.encodeBytes32String('0x6776de8122c352b4d671003e58ca112aedb99f34c629a1d1fe3b332504e2943a'); const transaction = await eas.multiTimestamp([data1, data2]); @@ -245,7 +245,7 @@ import { EAS } from "@ethereum-attestation-service/eas-sdk"; const eas = new EAS(EASContractAddress); eas.connect(provider); -const data = ethers.utils.formatBytes32String('0x6776de8122c352b4d671003e58ca112aedb99f34c629a1d1fe3b332504e2943a'); +const data = ethers.encodeBytes32String('0x6776de8122c352b4d671003e58ca112aedb99f34c629a1d1fe3b332504e2943a'); const transaction = await eas.revokeOffchain(data); @@ -261,8 +261,8 @@ import { EAS } from "@ethereum-attestation-service/eas-sdk"; const eas = new EAS(EASContractAddress); eas.connect(provider); -const data1 = ethers.utils.formatBytes32String('0x6776de8122c352b4d671003e58ca112aedb99f34c629a1d1fe3b332504e2943a'); -const data2 = ethers.utils.formatBytes32String('0x3e23b395b2bd2d37dd0f6e4148ac6b9e7ed22f2215107958f95cc1489e4e6289'); +const data1 = ethers.encodeBytes32String('0x6776de8122c352b4d671003e58ca112aedb99f34c629a1d1fe3b332504e2943a'); +const data2 = ethers.encodeBytes32String('0x3e23b395b2bd2d37dd0f6e4148ac6b9e7ed22f2215107958f95cc1489e4e6289'); const transaction = await eas.multiRevokeOffchain([data1, data2]);