Merge branch 'hotfix-1.0.0' into dev

This commit is contained in:
PedroCailleret 2022-12-15 17:11:11 -03:00
commit 7b05a3199e
17 changed files with 49 additions and 49 deletions

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/10314198dd1b1c93bdb3afe5190d4fa3.json"
"buildInfo": "../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/246d885849ebe73a8f97a386ac3822ea.json"
"buildInfo": "../../../../build-info/a5fa4780a59b1f26cae53eb04fc69734.json"
}

View File

@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/b5ad8a50c0f19b8c5c9b41ffb9fb771a.json"
"buildInfo": "../../build-info/6ebe7657303cd8d4b91c2ac52d990bb5.json"
}

File diff suppressed because one or more lines are too long

View File

@ -236,7 +236,7 @@ contract P2PIX is
function release(
bytes32 lockID,
address _relayerTarget,
uint256 pixTimestamp,
bytes32 pixTimestamp,
bytes32 r,
bytes32 s,
uint8 v

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@ export interface P2PIXInterface extends utils.Interface {
"mapDeposits(uint256)": FunctionFragment;
"mapLocks(bytes32)": FunctionFragment;
"owner()": FunctionFragment;
"release(bytes32,address,uint256,bytes32,bytes32,uint8)": FunctionFragment;
"release(bytes32,address,bytes32,bytes32,bytes32,uint8)": FunctionFragment;
"reputation()": FunctionFragment;
"sellerAllowList(uint256)": FunctionFragment;
"setDefaultLockBlocks(uint256)": FunctionFragment;
@ -140,7 +140,7 @@ export interface P2PIXInterface extends utils.Interface {
values: [
PromiseOrValue<BytesLike>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BigNumberish>
@ -555,7 +555,7 @@ export interface P2PIX extends BaseContract {
release(
lockID: PromiseOrValue<BytesLike>,
_relayerTarget: PromiseOrValue<string>,
pixTimestamp: PromiseOrValue<BigNumberish>,
pixTimestamp: PromiseOrValue<BytesLike>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
v: PromiseOrValue<BigNumberish>,
@ -703,7 +703,7 @@ export interface P2PIX extends BaseContract {
release(
lockID: PromiseOrValue<BytesLike>,
_relayerTarget: PromiseOrValue<string>,
pixTimestamp: PromiseOrValue<BigNumberish>,
pixTimestamp: PromiseOrValue<BytesLike>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
v: PromiseOrValue<BigNumberish>,
@ -851,7 +851,7 @@ export interface P2PIX extends BaseContract {
release(
lockID: PromiseOrValue<BytesLike>,
_relayerTarget: PromiseOrValue<string>,
pixTimestamp: PromiseOrValue<BigNumberish>,
pixTimestamp: PromiseOrValue<BytesLike>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
v: PromiseOrValue<BigNumberish>,
@ -1089,7 +1089,7 @@ export interface P2PIX extends BaseContract {
release(
lockID: PromiseOrValue<BytesLike>,
_relayerTarget: PromiseOrValue<string>,
pixTimestamp: PromiseOrValue<BigNumberish>,
pixTimestamp: PromiseOrValue<BytesLike>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
v: PromiseOrValue<BigNumberish>,
@ -1220,7 +1220,7 @@ export interface P2PIX extends BaseContract {
release(
lockID: PromiseOrValue<BytesLike>,
_relayerTarget: PromiseOrValue<string>,
pixTimestamp: PromiseOrValue<BigNumberish>,
pixTimestamp: PromiseOrValue<BytesLike>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
v: PromiseOrValue<BigNumberish>,

View File

@ -947,8 +947,8 @@ describe("P2PIX", () => {
describe("Release", async () => {
it("should revert if lock has expired", async () => {
const messageToSign = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["pixTarget", 100, "1337"],
["string", "uint256", "bytes32"],
["pixTarget", 100, ethers.constants.HashZero],
);
const flatSig = await acc01.signMessage(
ethers.utils.arrayify(messageToSign),
@ -980,7 +980,7 @@ describe("P2PIX", () => {
const fail = p2pix.release(
lockID,
acc03.address,
"1337",
ethers.constants.HashZero,
sig.r,
sig.s,
sig.v,
@ -993,8 +993,8 @@ describe("P2PIX", () => {
});
it("should revert if lock has already been released", async () => {
const messageToSign = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["pixTarget", 100, "1337"],
["string", "uint256", "bytes32"],
["pixTarget", 100, ethers.constants.HashZero],
);
const flatSig = await acc01.signMessage(
ethers.utils.arrayify(messageToSign),
@ -1025,7 +1025,7 @@ describe("P2PIX", () => {
await p2pix.release(
lockID,
acc03.address,
"1337",
ethers.constants.HashZero,
sig.r,
sig.s,
sig.v,
@ -1033,7 +1033,7 @@ describe("P2PIX", () => {
const fail = p2pix.release(
lockID,
acc03.address,
"1337",
ethers.constants.HashZero,
sig.r,
sig.s,
sig.v,
@ -1046,8 +1046,8 @@ describe("P2PIX", () => {
});
it("should revert if signed message has already been used", async () => {
const messageToSign = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["pixTarget", 100, "1337"],
["string", "uint256", "bytes32"],
["pixTarget", 100, ethers.constants.HashZero],
);
const flatSig = await owner.signMessage(
ethers.utils.arrayify(messageToSign),
@ -1080,7 +1080,7 @@ describe("P2PIX", () => {
.release(
lockID,
acc02.address,
"1337",
ethers.constants.HashZero,
sig.r,
sig.s,
sig.v,
@ -1105,7 +1105,7 @@ describe("P2PIX", () => {
.release(
lockID2,
acc02.address,
"1337",
ethers.constants.HashZero,
sig.r,
sig.s,
sig.v,
@ -1118,8 +1118,8 @@ describe("P2PIX", () => {
});
it("should revert if ecrecovered signer is invalid", async () => {
const messageToSign = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["pixTarget", 100, "1337"],
["string", "uint256", "bytes32"],
["pixTarget", 100, ethers.constants.HashZero],
);
const flatSig = await acc03.signMessage(
ethers.utils.arrayify(messageToSign),
@ -1153,7 +1153,7 @@ describe("P2PIX", () => {
.release(
lockID,
acc02.address,
"1337",
ethers.constants.HashZero,
sig.r,
sig.s,
sig.v,
@ -1165,10 +1165,10 @@ describe("P2PIX", () => {
);
});
it("should release lock, update storage and emit events", async () => {
const endtoendID = "124";
const endtoendID = ethers.constants.HashZero;
const pixTarget = "pixTarget";
const messageToSign = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["string", "uint256", "bytes32"],
[pixTarget, 100, endtoendID],
);
// Note: messageToSign is a string, that is 66-bytes long, to sign the
@ -1277,7 +1277,7 @@ describe("P2PIX", () => {
});
// edge case test
it("should release multiple locks", async () => {
const endtoendID = "124";
const endtoendID = ethers.constants.HashZero;
const pixTarget = "pixTarget";
const root = ethers.constants.HashZero;
const acc01Key =
@ -1289,19 +1289,19 @@ describe("P2PIX", () => {
const acc03Record1 =
await p2pix.callStatic.userRecord(acc03Key);
const messageToSign1 = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["string", "uint256", "bytes32"],
[pixTarget, 100, endtoendID]);
const flatSig1 = await owner.signMessage(
ethers.utils.arrayify(messageToSign1));
const sig1 = ethers.utils.splitSignature(flatSig1);
const messageToSign2 = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["string", "uint256", "bytes32"],
[pixTarget, 50, endtoendID]);
const flatSig2 = await owner.signMessage(
ethers.utils.arrayify(messageToSign2));
const sig2 = ethers.utils.splitSignature(flatSig2);
const messageToSign3 = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["string", "uint256", "bytes32"],
[pixTarget, 25, endtoendID]);
const flatSig3 = await owner.signMessage(
ethers.utils.arrayify(messageToSign3));
@ -1496,10 +1496,10 @@ describe("P2PIX", () => {
);
});
it("should revert if lock has already been released", async () => {
const endtoendID = "124";
const endtoendID = ethers.constants.HashZero;
const pixTarget = "pixTarget";
const messageToSign = ethers.utils.solidityKeccak256(
["string", "uint256", "uint256"],
["string", "uint256", "bytes32"],
[pixTarget, 1, endtoendID],
);
const messageHashBytes =