code: func WaitDeployed(ctx context.Context, b DeployBackend, tx *types.Transaction) (common.Address, error) {
  	if tx.To() != nil {
  		return common.Address{}, fmt.Errorf("tx is not contract creation")
  	}
  	receipt, err := WaitMined(ctx, b, tx)
  	if err != nil {
  		return common.Address{}, err
  	}
  	if receipt.ContractAddress == (common.Address{}) {
  		return common.Address{}, fmt.Errorf("zero address")
  	}
  	// Check that code has indeed been deployed at the address.
  	// This matters on pre-Homestead chains: OOG in the constructor
  	// could leave an empty account behind.
  	code, err := b.CodeAt(ctx, receipt.ContractAddress, nil)
  	if err == nil && len(code) == 0 {
  		err = ErrNoCodeAfterDeploy
  	}
  	return receipt.ContractAddress, err
  }
docs: // WaitDeployed waits for a contract deployment transaction and returns the on-chain
  // contract address when it is mined. It stops waiting when ctx is canceled.