()
| 94 | |
| 95 | #[tokio::test] |
| 96 | async fn it_gets_a_contract_code() { |
| 97 | let web3 = web3(); |
| 98 | let tx_hash = deploy_contract(true).await; |
| 99 | |
| 100 | // TODO(ddimaria): use polling or callbacks instead of waiting |
| 101 | sleep(Duration::from_millis(1000)).await; |
| 102 | |
| 103 | let receipt = web3.transaction_receipt(tx_hash).await.unwrap(); |
| 104 | let response = web3.code(receipt.contract_address.unwrap(), None).await; |
| 105 | |
| 106 | // ensure the code matches what was deployed |
| 107 | assert_eq!(response.unwrap(), [0, 1]); |
| 108 | } |
| 109 | } |
nothing calls this directly
no test coverage detected