Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Apr 7, 2024
1 parent 08edace commit b12f129
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
18 changes: 17 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ const config: HardhatUserConfig = {
accounts: [process.env.PRIVATE_KEY!],
saveDeployments: true,
zksync: false
},
baseTestnet: {
chainId: 84532,
url: 'https://sepolia.base.org',
accounts: [process.env.PRIVATE_KEY!],
saveDeployments: true,
zksync: false
}
},
etherscan: {
Expand All @@ -91,7 +98,8 @@ const config: HardhatUserConfig = {
sepolia: process.env.ETHERSCAN_KEY!,
mainnet: process.env.ETHERSCAN_KEY!,
zetachainTestnet: process.env.ZETASCAN_API_KEY!,
zetachain: process.env.ZETASCAN_API_KEY!
zetachain: process.env.ZETASCAN_API_KEY!,
baseTestnet: process.env.BASE_SEPOLIA_API_KEY!
},
customChains: [
{
Expand All @@ -109,6 +117,14 @@ const config: HardhatUserConfig = {
apiURL: 'https://zetachain.blockscout.com/api',
browserURL: 'https://zetachain.blockscout.com/'
}
},
{
network: 'baseTestnet',
chainId: 84532,
urls: {
apiURL: 'https://api-sepolia.basescan.org/api',
browserURL: 'https://sepolia.basescan.org'
}
}
]
},
Expand Down
10 changes: 5 additions & 5 deletions src/ActuallyMetIRL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract ActuallyMetIRL is Ownable {

error ConfirmationAddressMismatch();

event DidMetIRL(address partyA, address partyB, uint64 attestationId);
event DidMeetIRL(address partyA, address partyB, uint64 attestationId);

constructor() Ownable(_msgSender()) { }

Expand All @@ -32,7 +32,7 @@ contract ActuallyMetIRL is Ownable {
metIRLMapping[_msgSender()] = partyB;
}

function confirmMetIRL(address partyA) external returns (uint64) {
function confirmMetIRL(address partyA, bytes memory data) external returns (uint64) {
address partyB = _msgSender();
if (metIRLMapping[partyA] == partyB) {
// B has confirm A's claim of having met them IRL
Expand All @@ -50,10 +50,10 @@ contract ActuallyMetIRL is Ownable {
dataLocation: DataLocation.ONCHAIN,
revoked: false,
recipients: recipients,
data: ""
});
data: data // SignScan assumes this is from `abi.encode(...)`
});
uint64 attestationId = spInstance.attest(a, "", "", "");
emit DidMetIRL(partyA, partyB, attestationId);
emit DidMeetIRL(partyA, partyB, attestationId);
return attestationId;
} else {
revert ConfirmationAddressMismatch();
Expand Down

0 comments on commit b12f129

Please sign in to comment.