Skip to content

Conversation

@rohan-agarwal-coinbase
Copy link
Contributor

@rohan-agarwal-coinbase rohan-agarwal-coinbase commented Sep 30, 2024

What changed? Why?

  • Created smart_contract class to track the state/deployment of a contract
  • Added deploy_token, deploy_nft, deploy_multi_token to wallet_address and wallet

Testing

  • Added unit tests
  • E2E tests in repl succeed
>>> multi = address.deploy_multi_token("https://example.com/{id}.json")
>>> multi.wait()
SmartContract: (smart_contract_id: d1d9eb7e-98c6-4fa9-b7b8-bd5b77f78359, wallet_id: 3bc6c9f6-145e-4b4c-bcdc-f34269832979, network_id: base-sepolia, contract_address: 0x4Af7B644508bBCfcC1c4Dd336663c4988E8A0Be6, type: erc1155, transaction_hash: 0xdf103f58aad689108e78dd666886a10d7693f8c83f8360a49158e91c52ad54cf, transaction_link: https://sepolia.basescan.org/tx/0xdf103f58aad689108e78dd666886a10d7693f8c83f8360a49158e91c52ad54cf, status: complete)
>>> nft = address.deploy_nft("MYNFT", "MNFT", "https://example.com/metadata/")
>>> nft.wait()
SmartContract: (smart_contract_id: 7fd57318-5be8-4993-95d1-bc55426262d8, wallet_id: 3bc6c9f6-145e-4b4c-bcdc-f34269832979, network_id: base-sepolia, contract_address: 0x0f168B7235E823804861960A7F9A4A5aA011Fb36, type: erc721, transaction_hash: 0xabdb8047c84677fac32f59f558e618b11ab6b056017883b79cf0a29bdf500023, transaction_link: https://sepolia.basescan.org/tx/0xabdb8047c84677fac32f59f558e618b11ab6b056017883b79cf0a29bdf500023, status: complete)
>>> token = address.deploy_token("MYTOKEN", "MYT", "10")
>>> token.wait()
SmartContract: (smart_contract_id: 57ffb274-9182-4e12-bd39-f26176d3139a, wallet_id: 3bc6c9f6-145e-4b4c-bcdc-f34269832979, network_id: base-sepolia, contract_address: 0x2827F10B13c02c3D8A59DA23949dB84894A335CD, type: erc20, transaction_hash: 0xa2cc93168dd95b1afa63f5c542f2d6cfe39876cf208b2ca92f4311b8077d7861, transaction_link: https://sepolia.basescan.org/tx/0xa2cc93168dd95b1afa63f5c542f2d6cfe39876cf208b2ca92f4311b8077d7861, status: complete)

Tested that wallet can also deploy successfully

>>> multi2 = wallet1.deploy_multi_token("https://example.com/{id}.json")
>>> multi2.wait()
SmartContract: (smart_contract_id: 868b3f3e-2f88-4b39-ad59-816d271fadf3, wallet_id: 3bc6c9f6-145e-4b4c-bcdc-f34269832979, network_id: base-sepolia, contract_address: 0xdc2EB173853e831626f841A19c2A5b3899888277, type: erc1155, transaction_hash: 0xb51cd87df63425557cfa56ff6ae00890b07f676e10319cefad23152a49ec45eb, transaction_link: https://sepolia.basescan.org/tx/0xb51cd87df63425557cfa56ff6ae00890b07f676e10319cefad23152a49ec45eb, status: complete)

@cb-heimdall
Copy link

cb-heimdall commented Sep 30, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@rohan-agarwal-coinbase rohan-agarwal-coinbase marked this pull request as ready for review October 1, 2024 02:12
@rohan-agarwal-coinbase rohan-agarwal-coinbase merged commit 45d04c1 into master Oct 1, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants