diff --git a/cdp-agentkit-core/cdp_agentkit_core/actions/wow/constants.py b/cdp-agentkit-core/cdp_agentkit_core/actions/wow/constants.py index 7170ff5a2..1f76de4f8 100644 --- a/cdp-agentkit-core/cdp_agentkit_core/actions/wow/constants.py +++ b/cdp-agentkit-core/cdp_agentkit_core/actions/wow/constants.py @@ -188,3 +188,6 @@ def get_factory_address(network: str) -> str: f"Invalid network: {network}. Valid networks are: {', '.join(WOW_FACTORY_CONTRACT_ADDRESSES.keys())}" ) return WOW_FACTORY_CONTRACT_ADDRESSES[network] + + +GENERIC_TOKEN_METADATA_URI = "ipfs://QmY1GqprFYvojCcUEKgqHeDj9uhZD9jmYGrQTfA9vAE78J" diff --git a/cdp-agentkit-core/cdp_agentkit_core/actions/wow/create_token.py b/cdp-agentkit-core/cdp_agentkit_core/actions/wow/create_token.py index 845249cb5..ce7612e31 100644 --- a/cdp-agentkit-core/cdp_agentkit_core/actions/wow/create_token.py +++ b/cdp-agentkit-core/cdp_agentkit_core/actions/wow/create_token.py @@ -4,7 +4,11 @@ from pydantic import BaseModel, Field from cdp_agentkit_core.actions import CdpAction -from cdp_agentkit_core.actions.wow.constants import WOW_FACTORY_ABI, get_factory_address +from cdp_agentkit_core.actions.wow.constants import ( + GENERIC_TOKEN_METADATA_URI, + WOW_FACTORY_ABI, + get_factory_address, +) WOW_CREATE_TOKEN_PROMPT = """ This tool will create a Zora Wow ERC20 memecoin using the WoW factory. This tool takes the token name and token symbol. It is only supported on Base Sepolia and Base Mainnet. @@ -38,9 +42,6 @@ def wow_create_token(wallet: Wallet, name: str, symbol: str) -> str: """ factory_address = get_factory_address(wallet.network_id) - # Generic JSON metadata for all tokens - token_uri = "ipfs://QmY1GqprFYvojCcUEKgqHeDj9uhZD9jmYGrQTfA9vAE78J" - invocation = wallet.invoke_contract( contract_address=factory_address, method="deploy", @@ -48,7 +49,7 @@ def wow_create_token(wallet: Wallet, name: str, symbol: str) -> str: args={ "_tokenCreator": wallet.default_address.address_id, "_platformReferrer": "0x0000000000000000000000000000000000000000", - "_tokenURI": token_uri, + "_tokenURI": GENERIC_TOKEN_METADATA_URI, "_name": name, "_symbol": symbol, }, diff --git a/cdp-agentkit-core/tests/actions/wow/test_create_token.py b/cdp-agentkit-core/tests/actions/wow/test_create_token.py index 633b4ff89..e8b8f8d46 100644 --- a/cdp-agentkit-core/tests/actions/wow/test_create_token.py +++ b/cdp-agentkit-core/tests/actions/wow/test_create_token.py @@ -2,7 +2,11 @@ import pytest -from cdp_agentkit_core.actions.wow.constants import WOW_FACTORY_ABI, get_factory_address +from cdp_agentkit_core.actions.wow.constants import ( + GENERIC_TOKEN_METADATA_URI, + WOW_FACTORY_ABI, + get_factory_address, +) from cdp_agentkit_core.actions.wow.create_token import ( WowCreateTokenInput, wow_create_token, @@ -12,7 +16,6 @@ MOCK_SYMBOL = "TEST" MOCK_NETWORK_ID = "base-sepolia" MOCK_WALLET_ADDRESS = "0x1234567890123456789012345678901234567890" -MOCK_TOKEN_URI = "ipfs://QmY1GqprFYvojCcUEKgqHeDj9uhZD9jmYGrQTfA9vAE78J" def test_create_token_input_model_valid(): @@ -63,7 +66,7 @@ def test_create_token_success(wallet_factory, contract_invocation_factory): args={ "_tokenCreator": MOCK_WALLET_ADDRESS, "_platformReferrer": "0x0000000000000000000000000000000000000000", - "_tokenURI": MOCK_TOKEN_URI, + "_tokenURI": GENERIC_TOKEN_METADATA_URI, "_name": MOCK_NAME, "_symbol": MOCK_SYMBOL, }, @@ -94,7 +97,7 @@ def test_create_token_api_error(wallet_factory): args={ "_tokenCreator": MOCK_WALLET_ADDRESS, "_platformReferrer": "0x0000000000000000000000000000000000000000", - "_tokenURI": MOCK_TOKEN_URI, + "_tokenURI": GENERIC_TOKEN_METADATA_URI, "_name": MOCK_NAME, "_symbol": MOCK_SYMBOL, },