From 4f47e85c69d63fda17cfc2d958ff4ef6a8d2ac7d Mon Sep 17 00:00:00 2001 From: stadolf Date: Sun, 7 Jan 2024 20:22:40 +0100 Subject: [PATCH] fixtures use new IPNFT test metadata, should serve faster than arweave peers with Pinata to get the content Signed-off-by: stadolf --- deploy/001-ipfs-config.sh | 9 ++++++++- script/dev/Ipnft.s.sol | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/deploy/001-ipfs-config.sh b/deploy/001-ipfs-config.sh index bf2bb819..8cbb0d3b 100755 --- a/deploy/001-ipfs-config.sh +++ b/deploy/001-ipfs-config.sh @@ -17,8 +17,15 @@ ipfs config --json Gateway.HTTPHeaders.Access-Control-Expose-Headers '["Location ipfs config --json Gateway.HTTPHeaders.Access-Control-Allow-Credentials '["true"]' # https://web3.storage/docs/reference/peering/ -# allows us to also pull w3s content from our local machine +# allows us to also pull w3s / pinata content from our local machine ipfs config --json Peering.Peers '[{"ID": "bafzbeibhqavlasjc7dvbiopygwncnrtvjd2xmryk5laib7zyjor6kf3avm","Addrs": ["/dnsaddr/elastic.dag.house"]}]' +ipfs config --json Peering.Peers '[{"ID": "QmWaik1eJcGHq1ybTWe7sezRfqKNcDRNkeBaLnGwQJz1Cj","Addrs": ["/dnsaddr/fra1-1.hostnodes.pinata.cloud"]}]' +ipfs config --json Peering.Peers '[{"ID": "QmNfpLrQQZr5Ns9FAJKpyzgnDL2GgC6xBug1yUZozKFgu4","Addrs": ["/dnsaddr/fra1-2.hostnodes.pinata.cloud"]}]' +ipfs config --json Peering.Peers '[{"ID": "QmPo1ygpngghu5it8u4Mr3ym6SEU2Wp2wA66Z91Y1S1g29","Addrs": ["/dnsaddr/fra1-3.hostnodes.pinata.cloud"]}]' +ipfs config --json Peering.Peers '[{"ID": "QmRjLSisUCHVpFa5ELVvX3qVPfdxajxWJEHs9kN3EcxAW6","Addrs": ["/dnsaddr/nyc1-1.hostnodes.pinata.cloud"]}]' +ipfs config --json Peering.Peers '[{"ID": "QmPySsdmbczdZYBpbi2oq2WMJ8ErbfxtkG8Mo192UHkfGP","Addrs": ["/dnsaddr/nyc1-2.hostnodes.pinata.cloud"]}]' +ipfs config --json Peering.Peers '[{"ID": "QmSarArpxemsPESa6FNkmuu9iSE1QWqPX2R3Aw6f5jq4D5","Addrs": ["/dnsaddr/nyc1-3.hostnodes.pinata.cloud"]}]' + #https://github.com/ipfs/kubo/blob/master/docs/config.md#implicit-defaults-of-gatewaypublicgateways #axios is confused with local ipfs subdomains diff --git a/script/dev/Ipnft.s.sol b/script/dev/Ipnft.s.sol index 7d500b14..c06fab56 100644 --- a/script/dev/Ipnft.s.sol +++ b/script/dev/Ipnft.s.sol @@ -56,13 +56,14 @@ contract FixtureIpnft is CommonScript { vm.startBroadcast(from); uint256 reservationId = ipnft.reserve(); - bytes32 messageHash = - ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(from, to, reservationId, "ar://cy7I6VoEXhO5rHrq8siFYtelM9YZKyoGj3vmGwJZJOc"))); + bytes32 messageHash = ECDSA.toEthSignedMessageHash( + keccak256(abi.encodePacked(from, to, reservationId, "ipfs://bafkreigmssfgo5t3ig2ghx4zk2syrezpv46cbirdg4aah5ma4gvvesxevi")) + ); (uint8 v, bytes32 r, bytes32 s) = vm.sign(deployerPk, messageHash); ipnft.mintReservation{ value: 0.001 ether }( - to, reservationId, "ar://cy7I6VoEXhO5rHrq8siFYtelM9YZKyoGj3vmGwJZJOc", "BIO-00001", abi.encodePacked(r, s, v) + to, reservationId, "ipfs://bafkreigmssfgo5t3ig2ghx4zk2syrezpv46cbirdg4aah5ma4gvvesxevi", "CAT-101", abi.encodePacked(r, s, v) ); vm.stopBroadcast();