Skip to content

Commit 9f8bfe2

Browse files
authored
Replace API3 -> Api3 (except when the token is being referred) (#539)
1 parent 241ec89 commit 9f8bfe2

11 files changed

Lines changed: 38 additions & 38 deletions

File tree

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ REACT_APP_SENTRY_DSN=
1212
# Wallet Connect project ID
1313
REACT_APP_PROJECT_ID=e7e6e90622ec8e65c4d02e829a68529a
1414

15-
# The RPC URL will be visible in the browser network tab (leaking the API key). It is advised to whitelist only API3 DAO
15+
# The RPC URL will be visible in the browser network tab (leaking the API key). It is advised to whitelist only Api3 DAO
1616
# contracts making the RPC URL useless for others. To support Wallet Connect with MM wallet without errors a few
1717
# additional supporting contracts need whitelisted as well.
1818
#
1919
# Specifically, the following contracts need to be whitelisted:
20-
# 1. All API3 DAO contracts = https://github.com/api3dao/api3-dao-dashboard/blob/7cfc7157bfb2869a88ecc5f92de95d8e2de9a645/src/contract-deployments/mainnet-dao.json
20+
# 1. All Api3 DAO contracts = https://github.com/api3dao/api3-dao-dashboard/blob/7cfc7157bfb2869a88ecc5f92de95d8e2de9a645/src/contract-deployments/mainnet-dao.json
2121
# 2. Mainnet support contracts = https://github.com/wagmi-dev/viem/blob/dd8bccc77d616f973703b5e7b39ffbd0f24a4bdb/src/chains/definitions/mainnet.ts#L34
2222
REACT_APP_MAINNET_PROVIDER_URL=

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This Dockerfile builds a mainnet version for API3 DAO dashboard
1+
# This Dockerfile builds a mainnet version for Api3 DAO dashboard
22

33
FROM node:16-alpine as builder
44
ARG REACT_APP_MAINNET_PROVIDER_URL

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ You can find development instructions in a separate [dev-README](./dev-README.md
1111

1212
## Running the dashboard on Mainnet in a Docker container
1313

14-
The decentralized approach to being a DAO member is to run API3 dashboard on your local machine. For that you will just
14+
The decentralized approach to being a DAO member is to run Api3 dashboard on your local machine. For that you will just
1515
need `docker` and, optionally, `git`.
1616

1717
There are two approaches to running the dashboard locally. The first involves using the prebuilt Docker image, while the
18-
second involves building the image from source. In either case, the end result is a API3 dashboard running on port 7770
18+
second involves building the image from source. In either case, the end result is a Api3 dashboard running on port 7770
1919
of your localhost where it is safe to connect your wallet.
2020

2121
Currently, it's only possible to build the Docker image on a UNIX-like OS. If you use Windows, you can use WSL2.
@@ -83,7 +83,7 @@ dashboard and what our ENS record is pointing towards.
8383

8484
## Error Monitoring
8585

86-
Please note that the API3 core team tracks application errors on test and production environments using
86+
Please note that the Api3 core team tracks application errors on test and production environments using
8787
[Sentry](https://sentry.io). This is solely used to fix errors and improve the experience of our users.
8888

8989
**NOTE: No identifying user information is collected**

cypress/e2e/malicious-proposal-validation.cy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@ describe('Malicious proposal validation', () => {
1010
Decoded EVM script: transfer(address,int32)
1111
*/
1212
cy.exec(
13-
`yarn create-proposal --type secondary --title 'API3 DAO BD-API Team Proposal' --description 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m' --target-signature 'transfer(address,int32)' --parameters '["0xCB943E4Fb0bCf7eC3C2E6D263c275b27F07701c6", "111363670000"]' --target-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --target-value 0 --script 0x00000001556ecbb0311d350491ba0ec7e019c354d7723ce0000000e4b61d27f6000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cb943e4fb0bcf7ec3c2e6d263c275b27f07701c600000000000000000000000000000000000000000000000000000019edcabff000000000000000000000000000000000000000000000000000000000`
13+
`yarn create-proposal --type secondary --title 'Api3 DAO BD-API Team Proposal' --description 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m' --target-signature 'transfer(address,int32)' --parameters '["0xCB943E4Fb0bCf7eC3C2E6D263c275b27F07701c6", "111363670000"]' --target-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --target-value 0 --script 0x00000001556ecbb0311d350491ba0ec7e019c354d7723ce0000000e4b61d27f6000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cb943e4fb0bcf7ec3c2e6d263c275b27f07701c600000000000000000000000000000000000000000000000000000019edcabff000000000000000000000000000000000000000000000000000000000`
1414
);
1515

1616
cy.findAllByText('Governance').filter(':visible').click();
1717
// Navigate to proposal
18-
cy.findByRole('link', { name: 'API3 DAO BD-API Team Proposal' }).click();
18+
cy.findByRole('link', { name: 'Api3 DAO BD-API Team Proposal' }).click();
1919
cy.findByText(/This proposal is potentially malicious/i).should('exist');
2020
});
2121

2222
it('shows a warning if the original EVM script has an additional function call', () => {
2323
cy.increaseTimeAndRelogin(EPOCH_LENGTH + 60 * 60); // skip the genesis epoch (add 1 hour just to be sure)
2424
cy.exec(
25-
`yarn create-proposal --type secondary --title 'API3 DAO BD-API Team Proposal' --description 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m' --target-signature 'transfer(address,uint256)' --parameters '["0xCB943E4Fb0bCf7eC3C2E6D263c275b27F07701c6", "111363670000"]' --target-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --target-value 0 --script 0x00000001556ecbb0311d350491ba0ec7e019c354d7723ce0000000e4b61d27f6000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cb943e4fb0bcf7ec3c2e6d263c275b27f07701c600000000000000000000000000000000000000000000000000000019edcabff000000000000000000000000000000000000000000000000000000000556ecbb0311d350491ba0ec7e019c354d7723ce0000000e4b61d27f6000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cb943e4fb0bcf7ec3c2e6d263c275b27f07701c600000000000000000000000000000000000000000000000000000019edcabff000000000000000000000000000000000000000000000000000000000`
25+
`yarn create-proposal --type secondary --title 'Api3 DAO BD-API Team Proposal' --description 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m' --target-signature 'transfer(address,uint256)' --parameters '["0xCB943E4Fb0bCf7eC3C2E6D263c275b27F07701c6", "111363670000"]' --target-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --target-value 0 --script 0x00000001556ecbb0311d350491ba0ec7e019c354d7723ce0000000e4b61d27f6000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cb943e4fb0bcf7ec3c2e6d263c275b27f07701c600000000000000000000000000000000000000000000000000000019edcabff000000000000000000000000000000000000000000000000000000000556ecbb0311d350491ba0ec7e019c354d7723ce0000000e4b61d27f6000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cb943e4fb0bcf7ec3c2e6d263c275b27f07701c600000000000000000000000000000000000000000000000000000019edcabff000000000000000000000000000000000000000000000000000000000`
2626
);
2727

2828
cy.findAllByText('Governance').filter(':visible').click();
2929
// Navigate to proposal
30-
cy.findByRole('link', { name: 'API3 DAO BD-API Team Proposal' }).click();
30+
cy.findByRole('link', { name: 'Api3 DAO BD-API Team Proposal' }).click();
3131
cy.findByText(/This proposal is potentially malicious/i).should('exist');
3232
});
3333

3434
it('does not show a warning if the original EVM script and the decoded EVM script matches up', () => {
3535
cy.increaseTimeAndRelogin(EPOCH_LENGTH + 60 * 60); // skip the genesis epoch (add 1 hour just to be sure)
3636
cy.exec(
37-
`yarn create-proposal --type secondary --title 'API3 DAO BD-API Team Proposal' --description 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m' --target-signature 'transfer(address,uint256)' --parameters '["0xCB943E4Fb0bCf7eC3C2E6D263c275b27F07701c6", "111363670000"]' --target-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --target-value 10`
37+
`yarn create-proposal --type secondary --title 'Api3 DAO BD-API Team Proposal' --description 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m' --target-signature 'transfer(address,uint256)' --parameters '["0xCB943E4Fb0bCf7eC3C2E6D263c275b27F07701c6", "111363670000"]' --target-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --target-value 10`
3838
);
3939

4040
cy.findAllByText('Governance').filter(':visible').click();
4141
// Navigate to proposal
42-
cy.findByRole('link', { name: 'API3 DAO BD-API Team Proposal' }).click();
42+
cy.findByRole('link', { name: 'Api3 DAO BD-API Team Proposal' }).click();
4343
cy.findByText(/This proposal is potentially malicious/i).should('not.exist');
4444
});
4545
});

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/>
1616
<meta name="viewport" content="width=device-width, initial-scale=1" />
1717
<meta name="theme-color" content="#000000" />
18-
<meta name="description" content="API3 DAO staking and voting dashboard" />
18+
<meta name="description" content="Api3 DAO staking and voting dashboard" />
1919
<!--
2020
Notice the use of %PUBLIC_URL% in the tags above.
2121
It will be replaced with the URL of the `public` folder during the build.

src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const App = () => {
8585
<HelmetProvider>
8686
{/* Helmet children can be overridden in components lower down the tree */}
8787
<Helmet>
88-
<title>API3 DAO</title>
88+
<title>Api3 DAO</title>
8989
{/* Preload any important images here */}
9090
{/* https://web.dev/preload-responsive-images/ */}
9191
{(Object.keys(images) as Array<keyof typeof images>).map((image) => {

src/components/external-link/external-link.test.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,38 @@ import ExternalLink from './external-link';
33

44
describe('<ExternalLink />', () => {
55
it('accepts an URL that starts with "https://"', () => {
6-
render(<ExternalLink href="https://api3.org">API3</ExternalLink>);
7-
expect(screen.getByRole('link', { name: 'API3' })).toHaveAttribute('href', 'https://api3.org');
6+
render(<ExternalLink href="https://api3.org">Api3</ExternalLink>);
7+
expect(screen.getByRole('link', { name: 'Api3' })).toHaveAttribute('href', 'https://api3.org');
88
});
99

1010
it('accepts an URL that starts with "http://"', () => {
11-
render(<ExternalLink href="http://api3.org">API3</ExternalLink>);
12-
expect(screen.getByRole('link', { name: 'API3' })).toHaveAttribute('href', 'http://api3.org');
11+
render(<ExternalLink href="http://api3.org">Api3</ExternalLink>);
12+
expect(screen.getByRole('link', { name: 'Api3' })).toHaveAttribute('href', 'http://api3.org');
1313
});
1414

1515
it('accepts a mixed-case URL', () => {
16-
render(<ExternalLink href="Https://api3.org">API3</ExternalLink>);
17-
expect(screen.getByRole('link', { name: 'API3' })).toHaveAttribute('href', 'Https://api3.org');
16+
render(<ExternalLink href="Https://api3.org">Api3</ExternalLink>);
17+
expect(screen.getByRole('link', { name: 'Api3' })).toHaveAttribute('href', 'Https://api3.org');
1818
});
1919

2020
it('accepts an URL that is padded with whitespace', () => {
21-
render(<ExternalLink href=" https://api3.org ">API3</ExternalLink>);
22-
expect(screen.getByRole('link', { name: 'API3' })).toHaveAttribute('href', 'https://api3.org');
21+
render(<ExternalLink href=" https://api3.org ">Api3</ExternalLink>);
22+
expect(screen.getByRole('link', { name: 'Api3' })).toHaveAttribute('href', 'https://api3.org');
2323
});
2424

2525
it('rejects a javascript URL', () => {
2626
// eslint-disable-next-line no-script-url
27-
render(<ExternalLink href="javascript:alert('xss')">API3</ExternalLink>);
28-
expect(screen.getByRole('link', { name: 'API3' })).toHaveAttribute('href', 'about:blank');
27+
render(<ExternalLink href="javascript:alert('xss')">Api3</ExternalLink>);
28+
expect(screen.getByRole('link', { name: 'Api3' })).toHaveAttribute('href', 'about:blank');
2929
});
3030

3131
it('rejects a data URL', () => {
32-
render(<ExternalLink href="data:text/html,<script>alert('xss')</script>">API3</ExternalLink>);
33-
expect(screen.getByRole('link', { name: 'API3' })).toHaveAttribute('href', 'about:blank');
32+
render(<ExternalLink href="data:text/html,<script>alert('xss')</script>">Api3</ExternalLink>);
33+
expect(screen.getByRole('link', { name: 'Api3' })).toHaveAttribute('href', 'about:blank');
3434
});
3535

3636
it('rejects an URL without protocol', () => {
37-
render(<ExternalLink href="api3.org">API3</ExternalLink>);
38-
expect(screen.getByRole('link', { name: 'API3' })).toHaveAttribute('href', 'about:blank');
37+
render(<ExternalLink href="api3.org">Api3</ExternalLink>);
38+
expect(screen.getByRole('link', { name: 'Api3' })).toHaveAttribute('href', 'about:blank');
3939
});
4040
});

src/components/layout/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const BaseLayout = ({ children, title }: BaseLayoutProps) => {
5151
return (
5252
<>
5353
<Helmet>
54-
<title>{`API3 DAO | ${title}`}</title>
54+
<title>{`Api3 DAO | ${title}`}</title>
5555
</Helmet>
5656

5757
<div className={styles.layout}>

src/logic/proposals/encoding/encoding.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ describe('isEvmScriptValid', () => {
387387
const metadata = {
388388
description: 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m',
389389
targetSignature: 'transfer(address,uint256)',
390-
title: 'API3 DAO BD-API Team Proposal',
390+
title: 'Api3 DAO BD-API Team Proposal',
391391
version,
392392
};
393393
const decodedEvmScript = await decodeEvmScript(mockedProvider, script, metadata);
@@ -420,7 +420,7 @@ describe('isEvmScriptValid', () => {
420420
const metadata = {
421421
description: 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m',
422422
targetSignature: 'transfer(address,int32)',
423-
title: 'API3 DAO BD-API Team Proposal',
423+
title: 'Api3 DAO BD-API Team Proposal',
424424
version,
425425
};
426426
const decodedEvmScript = await decodeEvmScript(mockedProvider, script, metadata);
@@ -449,7 +449,7 @@ describe('isEvmScriptValid', () => {
449449
const metadata = {
450450
description: 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m',
451451
targetSignature: 'transfer(address,uint256)',
452-
title: 'API3 DAO BD-API Team Proposal',
452+
title: 'Api3 DAO BD-API Team Proposal',
453453
version,
454454
};
455455

@@ -474,7 +474,7 @@ describe('isEvmScriptValid', () => {
474474
const metadata = {
475475
description: 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m',
476476
targetSignature: 'transfer(address,uint256)',
477-
title: 'API3 DAO BD-API Team Proposal',
477+
title: 'Api3 DAO BD-API Team Proposal',
478478
version,
479479
};
480480
const decodedEvmScript = await decodeEvmScript(mockedProvider, script, metadata);
@@ -511,7 +511,7 @@ describe('isEvmScriptValid', () => {
511511
const metadata = {
512512
description: 'https://ipfs.fleek.co/ipfs/bafybeicfguu3bfhk3fyz5zn5wlujpksqxsaokse37674fhylouvsqnwd2m',
513513
targetSignature: 'transfer(address,int32)',
514-
title: 'API3 DAO BD-API Team Proposal',
514+
title: 'Api3 DAO BD-API Team Proposal',
515515
version,
516516
};
517517
const decodedEvmScript = await decodeEvmScript(mockedProvider, script, metadata);

src/logic/proposals/encoding/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Aragon voting contracts are flexible but this makes it a bit harder to work with its contracts. We have created a
3-
* simple encoding and decoding scheme (convention) for the API3 proposals. The implementation of these utilities is
3+
* simple encoding and decoding scheme (convention) for the Api3 proposals. The implementation of these utilities is
44
* inspired by https://github.com/bbenligiray/proposal-test.
55
*
66
* Check out the documentation in the source files for more documentation and details.

0 commit comments

Comments
 (0)