Skip to content

Updated List Records and List Minter Contracts for the Ethereum Follow Protocol

License

Notifications You must be signed in to change notification settings

ethereumfollowprotocol/ListRecordsV2

Repository files navigation

EFP logo


Start new PR in StackBlitz Codeflow discord chat x account

Ethereum Follow Protocol ListRecordsV2

A native Ethereum protocol for following and tagging Ethereum accounts.

ListRecordsV2

Updated List Records and List Minter Contracts for the Ethereum Follow Protocol. These new EFP contracts update two key parts of the list minting process: slot construction and list storage location assignment.

Slot Construction

The updated list records contract now checks the first 20bytes of a slot to confirm that it matches the address of the message sender in the 'claimListManager' function. This effectively prevents all other accounts from 'front-running' the claiming of a slot, as any accounts attempting to claim the slot for themselves will be blocked unless the address calling the function matches the address specified in the slot

List Storage Location Assignment

An additional check was added to the easyMint and easyMintTo functions to ensure that list records are stored in the appropriate contract. If a list records contract was deployed with an address that is identical to a previous deployment on another chain, a user could potentially have their list records stored in an unintended location. This update adds a check to ensure that the chain id specified in the list storage location matches the current chain before storing the list records, if the list records are stored on the native chain (Base).

Important links

Getting started with development

Prerequisites

Installation

git clone https://github.com/ethereumfollowprotocol/ListRecordsV2.git && cd ListRecordsV2

Note

If vscode extensions behave weirdly or you stop getting type hints, run CMD+P and type > Developer: Restart Extension Host to restart the extension host.

# upgrade bun to make sure you have the latest version then install dependencies
bun upgrade && bun install

Env vars

Copy .env-example to .env and provide the values for PRIVATE_KEY, ETH_RPC_URL, TESTNET_RPC_URL, and ETHERSCAN_API_KEY

cp .env-example .env

Build

To build, run

bun run build

Build artifacts are stored in out/.

Test

To build and test, run

bun run test

Test Coverage

To generate a test coverage report and lcov.info file

bun run coverage

Testnet setup

To create a new instance of anvil using the ETH_RPC_URL as the forked data source

bun run testnet

Deploy Contracts

To deploy the contracts using the ETH_RPC_URL as the target chain, deployed from the public address having PRIVATE_KEY

bun run deploy

About

Updated List Records and List Minter Contracts for the Ethereum Follow Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published