MCPcopy
hub / github.com/raiden-network/raiden / token

Method token

raiden/network/proxies/proxy_manager.py:111–125  ·  view source on GitHub ↗

Return a proxy to interact with a token.

(self, token_address: TokenAddress, block_identifier: BlockIdentifier)

Source from the content-addressed store, hash-verified

109 self._one_to_n_creation_lock = Semaphore()
110
111 def token(self, token_address: TokenAddress, block_identifier: BlockIdentifier) -> Token:
112 """Return a proxy to interact with a token."""
113 if not is_binary_address(token_address):
114 raise ValueError("token_address must be a valid address")
115
116 with self._token_creation_lock:
117 if token_address not in self.address_to_token:
118 self.address_to_token[token_address] = Token(
119 jsonrpc_client=self.client,
120 token_address=token_address,
121 contract_manager=self.contract_manager,
122 block_identifier=block_identifier,
123 )
124
125 return self.address_to_token[token_address]
126
127 def custom_token(
128 self, token_address: TokenAddress, block_identifier: BlockIdentifier

Callers 15

setup_raidenFunction · 0.95
__init__Method · 0.80
add_tokenMethod · 0.80
token_addressMethod · 0.80
token_addressMethod · 0.80
depositMethod · 0.80
approve_and_depositMethod · 0.80
withdrawMethod · 0.80
token_addressMethod · 0.80
test_close_regressionFunction · 0.80
test_batch_unlockFunction · 0.80
test_channel_withdrawFunction · 0.80

Calls 1

TokenClass · 0.90

Tested by 6

setup_raidenFunction · 0.76
test_close_regressionFunction · 0.64
test_batch_unlockFunction · 0.64
test_channel_withdrawFunction · 0.64
test_settled_lockFunction · 0.64
test_automatic_disputeFunction · 0.64