Skip to content

Commit

Permalink
Merge branch 'master' into fix-evm-diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-defi authored Oct 18, 2024
2 parents 6f57561 + 9e6c254 commit 87257bc
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe("Lock tests", function () {

Notice that the previous code is logging the sender address and the logs coming from the transaction receipt. You are also decoding the `receipts.logs[0].data` field that contains the information emitted by the event but not in a human-readable way, since it is encoded. For that reason, you can use `AbiCoder` to decode the raw data.

By running `npx harhdat test`, you should be able to see the following:
By running `npx hardhat test`, you should be able to see the following:

```solidity
Lock tests
Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/docs/building-with-base/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ To deploy your smart contracts to Base, you need two key components:
1. A node connection to interact with the Base network
2. A funded private key to deploy the contract

Lets set up both of these:
Let's set up both of these:

### 1. Set up your node connection

Expand Down
4 changes: 2 additions & 2 deletions apps/base-docs/docs/tools/basenames-tutorial.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Basenames + Wagmi Tutorial
slug: /basenames-tutorial-using-wagmi
description: 'A tutorial that teaches how to intergrate Basenames to your wagmi/viem App'
description: 'A tutorial that teaches how to integrate Basenames to your wagmi/viem App'
author: hughescoin
keywords:
['build on base', 'viem', 'wagmi', 'frontend', 'onchain app development']
Expand Down Expand Up @@ -248,4 +248,4 @@ Congratulations! You've successfully integrated Basenames into your project. By
[OnchainKit]: https://onchainkit.xyz/
[L2ResolverAbi]: https://gist.github.com/hughescoin/adf1c90b67cd9b2b913b984a2cc98de9
[basenames.tsx]: https://gist.github.com/hughescoin/95b680619d602782396fa954e981adae
[OnchainKit repo]: https://github.com/coinbase/onchainkit/blob/main/src/identity/utils/convertReverseNodeToBytes.ts
[OnchainKit repo]: https://github.com/coinbase/onchainkit/blob/main/src/identity/utils/convertReverseNodeToBytes.ts
1 change: 1 addition & 0 deletions apps/base-docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = {
collapsible: false,
collapsed: false,
items: [
'tools/registry-api',
'tools/node-providers',
'tools/block-explorers',
'tools/network-faucets',
Expand Down
13 changes: 13 additions & 0 deletions apps/base-docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,19 @@ const footerCategories = [
{
title: 'Tools',
links: [
{
title: 'Onchain Registry',
href: '/docs/tools/registry-api/',
analyticsData: {
name: 'tools_onchain_registry',
event: {
action: ActionType.click,
componentType: ComponentType.link,
context: 'explore_documentation',
},
importance: AnalyticsEventImportance.high,
},
},
{
title: 'Node Providers',
href: '/docs/tools/node-providers',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ import IdentityWrapper from '../components/IdentityWrapper';

Example code snippets are available for:

- [IdentityWrapper componenet](https://gist.github.com/hughescoin/5e5cd6cbfb3c6d1cada0a9d206b003c6)
- [IdentityWrapper component](https://gist.github.com/hughescoin/5e5cd6cbfb3c6d1cada0a9d206b003c6)
- [Page.tsx](https://gist.github.com/hughescoin/49afc9e999d69d372a67186e804e693b)

## Conclusion
Expand Down
10 changes: 9 additions & 1 deletion apps/web/app/AppProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { connectorsForWallets, RainbowKitProvider } from '@rainbow-me/rainbowkit
import {
coinbaseWallet,
metaMaskWallet,
phantomWallet,
rainbowWallet,
uniswapWallet,
walletConnectWallet,
Expand Down Expand Up @@ -44,7 +45,14 @@ const connectors = connectorsForWallets(
[
{
groupName: 'Recommended',
wallets: [coinbaseWallet, metaMaskWallet, uniswapWallet, rainbowWallet, walletConnectWallet],
wallets: [
coinbaseWallet,
metaMaskWallet,
uniswapWallet,
rainbowWallet,
phantomWallet,
walletConnectWallet,
],
},
],
{
Expand Down
11 changes: 11 additions & 0 deletions apps/web/public/images/partners/phantom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/web/public/images/partners/rentality.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export function validateTextRecordValue(textRecordKey: UsernameTextRecordKeys, v
}

export function textRecordHintForDisplay(textRecordKey: UsernameTextRecordKeys) {
if (textRecordKey === UsernameTextRecordKeys.Url) {
if (
[UsernameTextRecordKeys.Url, UsernameTextRecordKeys.Url2, UsernameTextRecordKeys.Url3].includes(
textRecordKey,
)
) {
return 'Must be a valid https url';
}
if (
Expand Down Expand Up @@ -78,7 +82,13 @@ export default function UsernameTextRecordInlineField({
[onChange, textRecordKey],
);

const inputType = textRecordKey === UsernameTextRecordKeys.Url ? 'url' : 'text';
const inputType = [
UsernameTextRecordKeys.Url,
UsernameTextRecordKeys.Url2,
UsernameTextRecordKeys.Url3,
].includes(textRecordKey)
? 'url'
: 'text';
return (
<Fieldset inline>
<Label htmlFor={usernameSocialHandleFieldId} className="w-full max-w-[6rem] text-sm">
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/SearchAddressInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function SearchAddressInput({ onChange }: SearchAddressInputProps
const { basenameChain } = useBasenameChain();

const { data: basenameAddress, isLoading: basenameAddressIsLoading } = useEnsAddress({
name: value,
name: value.toLowerCase(),
universalResolverAddress: USERNAME_L2_RESOLVER_ADDRESSES[basenameChain.id],
chainId: basenameChain.id,
query: {
Expand All @@ -45,7 +45,7 @@ export default function SearchAddressInput({ onChange }: SearchAddressInputProps
/* 3. User enters an ENS name */
const validEnsName = isEnsName(value);
const { data: ensAddress, isLoading: ensAddressIsLoading } = useEnsAddress({
name: value,
name: value.toLowerCase(),
chainId: mainnet.id,
query: {
enabled: validEnsName,
Expand Down
15 changes: 12 additions & 3 deletions apps/web/src/data/ecosystem.json
Original file line number Diff line number Diff line change
Expand Up @@ -4164,10 +4164,10 @@
{
"name": "Rentality",
"tags": [
"social"
"other"
],
"description": "Rentality is a Web 3.0 car rental service designed for the growing US crypto community seeking financial freedom. By using blockchain smart contracts at the core of our operations, we remove intermediaries, making our service much more cost efficient than our Web 2.0 competitors.",
"url": "https://app.rentality.xyz/",
"description": "Rentality is a Web 3.0 car rental service provider, specifically catering to the needs of the growing US crypto community.",
"url": "https://rentality.xyz/",
"imageUrl": "/images/partners/rentality.png"
},
{
Expand Down Expand Up @@ -4205,5 +4205,14 @@
"description": "Gun Game is a Russian Roulette game played via Telegram on Base. Games have instant onchain settlement, all gas is abstracted away from users, and more games and features are in development!",
"url": "https://gungame.tech/",
"imageUrl": "/images/partners/gungame.jpg"
},
{
"name": "Phantom",
"tags": [
"wallet"
],
"description": "The friendly crypto wallet built for DeFi & NFTs.",
"url": "https://phantom.app/",
"imageUrl": "/images/partners/phantom.svg"
}
]
2 changes: 2 additions & 0 deletions apps/web/src/hooks/useReadBaseEnsTextRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export default function useReadBaseEnsTextRecords({
[UsernameTextRecordKeys.Discord]: '',
[UsernameTextRecordKeys.Keywords]: '',
[UsernameTextRecordKeys.Url]: '',
[UsernameTextRecordKeys.Url2]: '',
[UsernameTextRecordKeys.Url3]: '',
[UsernameTextRecordKeys.Github]: '',
[UsernameTextRecordKeys.Email]: '',
[UsernameTextRecordKeys.Phone]: '',
Expand Down
20 changes: 20 additions & 0 deletions apps/web/src/utils/usernames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export enum UsernameTextRecordKeys {
Description = 'description',
Keywords = 'keywords',
Url = 'url',
Url2 = 'url2',
Url3 = 'url3',
Email = 'email',
Phone = 'phone',
Avatar = 'avatar',
Expand All @@ -93,6 +95,8 @@ export const textRecordsSocialFieldsEnabled = [
UsernameTextRecordKeys.Farcaster,
UsernameTextRecordKeys.Github,
UsernameTextRecordKeys.Url,
UsernameTextRecordKeys.Url2,
UsernameTextRecordKeys.Url3,
];

export const textRecordsSocialFieldsEnabledIcons: Partial<Record<UsernameTextRecordKeys, string>> =
Expand All @@ -101,6 +105,8 @@ export const textRecordsSocialFieldsEnabledIcons: Partial<Record<UsernameTextRec
[UsernameTextRecordKeys.Farcaster]: 'farcaster',
[UsernameTextRecordKeys.Github]: 'github',
[UsernameTextRecordKeys.Url]: 'website',
[UsernameTextRecordKeys.Url2]: 'website',
[UsernameTextRecordKeys.Url3]: 'website',
};

// Users might add their handle as @myProfile, which breaks on some website
Expand Down Expand Up @@ -135,6 +141,8 @@ export const formatSocialFieldUrl = (key: UsernameTextRecordKeys, handleOrUrl: s
case UsernameTextRecordKeys.Github:
return `https://github.com/${sanitizeHandle(handleOrUrl)}`;
case UsernameTextRecordKeys.Url:
case UsernameTextRecordKeys.Url2:
case UsernameTextRecordKeys.Url3:
if (!/^https?:\/\//i.test(handleOrUrl)) {
return `https://${handleOrUrl}`;
}
Expand All @@ -152,6 +160,8 @@ export const formatSocialFieldForDisplay = (key: UsernameTextRecordKeys, handleO
return sanitizeHandle(handleOrUrl);

case UsernameTextRecordKeys.Url:
case UsernameTextRecordKeys.Url2:
case UsernameTextRecordKeys.Url3:
return handleOrUrl.replace(/^https?:\/\//, '').replace(/\/$/, '');
default:
return '';
Expand All @@ -162,6 +172,8 @@ export const textRecordsKeysEnabled = [
UsernameTextRecordKeys.Description,
UsernameTextRecordKeys.Keywords,
UsernameTextRecordKeys.Url,
UsernameTextRecordKeys.Url2,
UsernameTextRecordKeys.Url3,
UsernameTextRecordKeys.Github,
UsernameTextRecordKeys.Email,
UsernameTextRecordKeys.Phone,
Expand All @@ -179,6 +191,8 @@ export const textRecordsKeysForDisplay = {
[UsernameTextRecordKeys.Description]: 'Bio',
[UsernameTextRecordKeys.Keywords]: 'Skills',
[UsernameTextRecordKeys.Url]: 'Website',
[UsernameTextRecordKeys.Url2]: 'Website',
[UsernameTextRecordKeys.Url3]: 'Website',
[UsernameTextRecordKeys.Github]: 'Github',
[UsernameTextRecordKeys.Email]: 'Email',
[UsernameTextRecordKeys.Phone]: 'Phone',
Expand All @@ -196,6 +210,8 @@ export const textRecordsKeysPlaceholderForDisplay = {
[UsernameTextRecordKeys.Description]: 'Tell us about yourself',
[UsernameTextRecordKeys.Keywords]: 'Skills',
[UsernameTextRecordKeys.Url]: 'www.name.com',
[UsernameTextRecordKeys.Url2]: 'www.thingyoubuilt.com',
[UsernameTextRecordKeys.Url3]: 'www.workyoureproudof.com',
[UsernameTextRecordKeys.Github]: 'Username',
[UsernameTextRecordKeys.Email]: 'Personal email',
[UsernameTextRecordKeys.Phone]: '+1 415 ..',
Expand All @@ -217,6 +233,7 @@ export const textRecordsEngineersKeywords = [
'Typescript',
'Go',
'Game development',
'Data',
];
export const textRecordsCreativesKeywords = [
'UI/UX',
Expand All @@ -229,6 +246,9 @@ export const textRecordsCreativesKeywords = [
'Graphic design',
'Animation',
'Visual design',
'Design',
'Digital art',
'Photography',
];
export const textRecordsCommunnicationKeywords = [
'Community',
Expand Down

0 comments on commit 87257bc

Please sign in to comment.