this git repository is composed of two main branches and feature branches :
latest
branch is synchronized with the latest contracts deployed on mainnet.
after every mainnet deployment and/or upgrade, a pull request from dev
to latest
must be initiated and merged.
this branch is the reference for any integration with other sub-systems, i.e. frontend, subgraphs, and so on.
dev
branch is accumulating and consolidating all the new features, bug fixes and upgrades that are not yet deployed on mainnet.
mainnet deployment must be initiated from dev
branch only after the end-to-end tests have been successfully conducted on testnet.
testnet deployment must be initiated from dev
branch.
feature branches are created every time a new feature, bug fix or upgrade must be developped.
feature branches are created from dev
branch.
feature branches naming convention is abXXX-featName
where XXX is the Linear Ticket ID and featName is a brief feature description.
a feature branch can be merge to dev
only if all required units tests have been conducted and passed and after approval from relevant stakeholders that the feature, bug fix or upgrade will be fit for deployement on mainnet.
after every mainnet deployment and/or upgrade, a tag must be created
tag naming convention is vX.Y
where X & Y are digits.
we increment X
for major update while we increment Y
for small update or patches.
foundry installation procedure
create .env
file in the root directory as per .env.example
cp .env.example .env
source the .env
file (from the root directory):
source .env
forge build
execute full test campaign :
forge test -vvv
analyze test coverage :
forge coverage
deploy and verify ABSuperToken (superfluid mock token) :
forge script script/op/deploy-ABSuperToken.s.sol:DeployMockSuperToken --rpc-url optimism-goerli --broadcast --verify --etherscan-api-key ${OPTIMISM_ETHERSCAN_API_KEY}
simulate platform deployment :
forge script script/op/deploy-platform.s.sol:DeployPlatform --rpc-url optimism-goerli --sig "run(bool)" true
deploy and verify anotherblock platform contracts :
forge script script/op/deploy-platform.s.sol:DeployPlatform --rpc-url optimism-goerli --broadcast --verify --etherscan-api-key ${OPTIMISM_ETHERSCAN_API_KEY} --sig "run(bool)" false
simulate ABRoyalty deployment
forge script script/op/deploy-royalty.s.sol:DeployRoyalty --rpc-url base-goerli --sig "run(address)" <publisherAddress>
deploy standalone royalty contract for specific publisher
forge script script/op/deploy-royalty.s.sol:DeployRoyalty --rpc-url base-goerli --sig "run(address)" <publisherAddress> --broadcast --verify
deploy and verify ABSuperToken (superfluid mock token) :
forge script script/base-goerli/deploy-ABSuperToken.s.sol:DeployMockSuperToken --rpc-url base-goerli --broadcast --verify
simulate platform deployment :
forge script script/base-goerli/deploy-platform.s.sol:DeployPlatform --rpc-url base-goerli --sig "run(bool)" true
deploy and verify anotherblock platform contracts :
forge script script/base-goerli/deploy-platform.s.sol:DeployPlatform --rpc-url base-goerli --broadcast --verify --sig "run(bool)" false
simulate ABRoyalty deployment
forge script script/base-goerli/deploy-royalty.s.sol:DeployRoyalty --rpc-url base-goerli --sig "run(address)" <publisherAddress>
deploy standalone royalty contract for specific publisher
forge script script/base-goerli/deploy-royalty.s.sol:DeployRoyalty --rpc-url base-goerli --sig "run(address)" <publisherAddress> --broadcast --verify
simulate platform deployment :
forge script script/base/deploy-platform.s.sol:DeployPlatform --rpc-url base --sig "run(bool)" true
deploy and verify anotherblock platform contracts :
forge script script/base/deploy-platform.s.sol:DeployPlatform --rpc-url base --broadcast --verify --sig "run(bool)" false
simulate ABRoyalty deployment
forge script script/base/deploy-royalty.s.sol:DeployRoyalty --rpc-url base --sig "run(address)" <publisherAddress>
deploy standalone royalty contract for specific publisher
forge script script/base/deploy-royalty.s.sol:DeployRoyalty --rpc-url base --sig "run(address)" <publisherAddress> --broadcast --verify
in order for anyone to create new minting mechanism NFT contract compatible with anotherblock self-service platform, the contract must comply with below requirements :
-
the new contract shall inherit the abstract contract ERC721AB
-
the new contract state shall include two constants,
IMPLEMENTATION_VERSION
&IMPLEMENTATION_TYPE
-
the new contract shall include a function
initDrop
calling the internal function_initDrop
and contain a minimum set of parameters :- amount of share per token
- amount of genesis token to be minted
- recipient address of the genesis token(s)
- currency used to pay-out royalties
- base URI
-
the new contract shall include a custom mint function (see ERC721ABLE for reference)