-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
79 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ion_market_agent/agents/microchain_agent/nft_treasury_game/contracts_nft_treasury_game.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from functools import cache | ||
|
||
from prediction_market_agent_tooling.gtypes import ChecksumAddress | ||
from prediction_market_agent_tooling.tools.contract import ( | ||
ContractOwnableERC721OnGnosisChain, | ||
) | ||
from web3 import Web3 | ||
|
||
from prediction_market_agent.agents.microchain_agent.nft_treasury_game.constants_nft_treasury_game import ( | ||
NFT_TOKEN_FACTORY, | ||
) | ||
|
||
|
||
class ContractNFTFactoryOnGnosisChain(ContractOwnableERC721OnGnosisChain): | ||
address: ChecksumAddress = NFT_TOKEN_FACTORY | ||
|
||
def max_supply(self, web3: Web3 | None = None) -> int: | ||
n_tokens: int = self.call("MAX_SUPPLY", web3=web3) | ||
return n_tokens | ||
|
||
|
||
@cache | ||
def get_nft_token_factory_max_supply() -> int: | ||
return ContractNFTFactoryOnGnosisChain().max_supply() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters